[Math] Converting an equation from Cartesian to Polar form

polar coordinates

I'm trying to convert

$x^2 +y^2 =(2-x)^2$

into a polar equation in the form $r=f(\theta)$. The answer is apparently

$r=\frac{2}{1+cos(\theta)}$,

but I can't seem to get this.

Best Answer

The easiest way to remember the formulas for converting polar to rectangular coordinates and vice versa is to draw the right triangle at the origin with sides $x$ and $y$, hypotenuse $r$, and angle $\theta$. From there, it's easy to see that: $$x^2 + y^2 = r^2$$ $$x = r\cos\left(\theta\right)$$$$y = r\sin\left(\theta\right)$$

Using these equations to solve for $r$, $$x^2 + y^2 = (2-x)^2$$ $$r^2 = (2-x)^2$$ $$ r = 2-x$$ $$ r = 2 - r\cos\left(\theta\right)$$ $$ r + r\cos\left(\theta\right) = 2$$ $$ r(1 + \cos\left(\theta\right)) = 2$$ $$ r = \frac{2}{1 + \cos\left(\theta\right)}$$