# How do you graph r=2-2costheta?

Nov 10, 2016

graph{(x^2+y^2+2x)^2-4x^2-4y^2=0 [-7.024, 5.46, -3.147, 3.097]}

${\left({x}^{2} + {y}^{2}\right)}^{2} + 4 x \left({x}^{2} + {y}^{2}\right) - 4 {y}^{2} = 0$

#### Explanation:

$\cos \theta = \frac{x}{r}$

$r = 2 - 2 \frac{x}{r} \setminus \setminus \implies \setminus \setminus {r}^{2} + 2 x = 2 r \setminus \setminus \implies \setminus \setminus {r}^{4} + 4 {x}^{2} + 4 x {r}^{2} - 4 {r}^{2} = 0$

${r}^{2} = {x}^{2} + {y}^{2}$

${\left({x}^{2} + {y}^{2}\right)}^{2} + \cancel{4 {x}^{2}} + 4 x \left({x}^{2} + {y}^{2}\right) - \cancel{4 {x}^{2}} - 4 {y}^{2} = 0$

To drow the graph observe

• the graph is simmetric over $\theta$ so over x axis
• for $\theta = 0 , r = 0$ so the point (0;0)\ \ belongs to the graph
• for $\theta = - \pi , r = 4$ so the point (-4;0)\ \ belongs to the graph
• for $\theta = \pm \frac{\pi}{2} , r = 2$ so the point (0;+-2)\ \ belongs to the graph
• ${r}^{2} - 2 r + 2 x = 0 , \implies r = 1 \pm \sqrt{1 - 2 x}$ so $x = \frac{1}{2} , r = 1 , y = \sqrt{{r}^{2} - {x}^{2}} = \pm \frac{\sqrt{3}}{2}$ is an extrem point
• Using implicit differentiation on the curve equation with some calculus one can get that $y ' \left(x\right) = 0$ only when $\left(x + 1\right) {r}^{2} + 2 {x}^{2} = 0$ and using $r = 1 \pm \sqrt{1 - 2 x}$

$\left(x + 1\right) \left(1 + 1 - 2 x \pm 2 \sqrt{1 - 2 x}\right) + 2 {x}^{2} = 0$
$2 \left(x + 1\right) \left(1 - x \pm \sqrt{1 - 2 x}\right) + 2 {x}^{2} = 0$
$\left(1 - {x}^{2}\right) \pm \left(x + 1\right) \sqrt{1 - 2 x} + {x}^{2} = 0$
$\sqrt{1 - 2 x} = \frac{1}{x + 1}$
$\left(1 - 2 x\right) {\left(x + 1\right)}^{2} = 1$
${x}^{2} + 2 x + 1 - 2 {x}^{3} - 4 {x}^{2} - 2 x = 1$
$2 {x}^{3} + 3 {x}^{2} = 0$
$x = - \frac{3}{2} \left(\implies r = 3\right)$ or $x = 0$

The graph has horizontal tangent in (0;0) and in (-3/2;+-3sqrt3/2)

Alternatively one can implicitly differentiate ${r}^{2} + 2 x = 2 r$
using that $\left({r}^{2}\right) ' = 2 x + 2 y y '$ and $r ' = \frac{x + y y '}{r}$ so
$r \left(x + 1\right) - x = \left(1 - r\right) y y ' \setminus \setminus \setminus \implies \setminus \setminus \setminus y ' = 0$ only when $r = \frac{x}{x + 1}$ that again is satisfied $x = 0$ or $x = - \frac{3}{2}$