<s>[INST] Find the points on the given curve where the tangent line is horizontal or vertical $r=e^θ $ $($ Assume $0 ≤ θ ≤ 2π.)$
Apparently I keep getting this answer wrong. I dont know if i need to use $n $ in the answer or not...
 [/INST] As $r=\sqrt{x^2+y^2}$ and $\theta=\arctan \frac yx$
Differentiating  $$\sqrt{x^2+y^2}=e^{\arctan \frac yx}$$ wrt $x,$
$$\frac{x+y\frac{dy}{dx}}{\sqrt{x^2+y^2}}$$
$$=e^{\arctan \frac yx}\cdot\frac1{1+\left(\frac yx\right)^2}\cdot\frac{\left(x\frac{dy}{dx}-y\right)}{x^2}$$
$$=\sqrt{x^2+y^2}\frac{\left(x\frac{dy}{dx}-y\right)}{x^2+y^2} \text { as } e^{\arctan \frac yx}=\sqrt{x^2+y^2}$$
$$\implies  \frac{x+y\frac{dy}{dx}}{\sqrt{x^2+y^2}}=\sqrt{x^2+y^2}\frac{\left(x\frac{dy}{dx}-y\right)}{x^2+y^2}$$
$$\implies \frac{dy}{dx}=\frac{x+y}{x-y}$$
For horizontal tangent, $\frac{dy}{dx}=0\implies x+y=0\implies \theta=\arctan (-1)=n\pi-\frac{\pi}4$ where $n$ is any integer.
As $0\le \theta\le 2\pi,n=1,2$
Similarly for vertical tangent, $\frac{dx}{dy}=0\implies x-y=0\implies \theta=\arctan (1)=m\pi+\frac{\pi}4$ where $m$ is any integer.
As $0\le \theta\le 2\pi,m=0,1$
</s>