<s>[INST] Derivation of the graph of $r=\frac{1}{\sin(\theta)}$ When playing around with desmos, I found a very interesting function:
$r=\frac{1}{\sin(\theta)}$
The graph of this function is a straight line with constant value $y=1$
I tried to prove this, however I failed:
Assuming $r=\sqrt {x^2+y^2}$ and $\theta = \arctan(\frac{y}{x})$ hold, we get:
$\sqrt {x^2+y^2} = \frac{1}{\sin(\arctan(\frac{y}{x}))}$
$\sqrt {x^2+y^2} = \frac{1}{\frac{\frac{y}{x}}{1+\frac{y^2}{x^2}}}$
$\sqrt {x^2+y^2} = \frac{1+\frac{y^2}{x^2}}{\frac{y}{x}}$ |$*\frac{y}{x}$
$\sqrt {\frac{y^2}{x^2}(x^2+y^2)} = 1+\frac{y^2}{x^2}$
$\sqrt {y^2 + \frac{y^4}{x^2}} = 1+\frac{y^2}{x^2}$ |$^2$
$y^2+\frac{y^4}{x^2} = 1+2\frac{y^2}{x^2}+\frac{y^4}{x^4}$ |$*x^4$
$x^4 y^2 + x^2 y^4 = x^4 + 2x^2 y^2 + y^4$
$(x^2 y^2)(x^2+y^2)=(x^2+y^2)^2$ |$:(x^2+y^2)$
$x^2 y^2 = x^2+y^2$ |$-y^2$
$x^2 y^2 - y^2 = x^2$
$(x^2 - 1) y^2 = x^2$ |$:(x^2-1)$
$y^2 = \frac{x^2}{x^2-1}$
$y = \sqrt{\frac{x^2}{x^2-1}}$
The graph of this function is obviously not a straight line with $y=1$.
Where did my calculation go wrong and what would be the actual derivation?
 [/INST] I found the error myself! It lies within my very first step:
$\frac{1}{\sin(\arctan(\frac{y}{x}))}$ is not equal to $\frac{1}{\frac{\frac{y}{x}}{1+\frac{y^2}{x^2}}}$ but rather to $\frac{1}{\frac{\frac{y}{x}}{\sqrt{1+\frac{y^2}{x^2}}}}$
From there, the derivation is straightforward:
$\sqrt{x^2+y^2} = \frac{\sqrt{1+\frac{y^2}{x^2}}}{\frac{y}{x}}$
$\sqrt {y^2 + \frac{y^4}{x^2}} = \sqrt{1+\frac{y^2}{x^2}}$
$y^2 + \frac{y^4}{x^2} = 1+\frac{y^2}{x^2}$
$y^2 (1+\frac{y^2}{x^2}) = 1+\frac{y^2}{x^2}$
$y^2=1$
$y=\pm1$
</s>