[Math] Vertical tangent line for r = 1 + cos($\theta$)

calculus

Mainly trying to determine where I'm going wrong.
Here is what I have done so far:

$$r = 1 + cos(\theta)$$

We know that: $x = r cos(\theta)$ and $y = r cos(\theta)$

So:

$$x = (1 + cos(\theta))cos(\theta)$$
$$x = cos(\theta) + cos^2(\theta)$$
$$\frac{dx}{d\theta} = -sin(\theta)-2cos(\theta)sin(\theta)$$

Set $\frac{dx}{d\theta}$ to $0$

$$-sin(\theta)-2cos(\theta)sin(\theta)=0$$

$$-sin(\theta)(1+2cos(\theta))=0$$

So $\theta$ = $0, \pi, \frac{2\pi}{3},\frac{4\pi}{3}$

$r = 2$ when $\theta = 0$, $r = 0$ when $\theta = \pi$, $r = \frac{1}{2}$ when $\theta = \frac{2\pi}{3},\frac{4\pi}{3}$

So the vertical tangent lines, when plugged into $x=rcos(\theta)$ are: $x=2$, $x=0$, and $x=-\frac{1}{4}$

This answer is wrong though, and I'm not entirely sure why. Can anyone point out what I am doing wrong?

Best Answer

The points where the parametric curve described by $(x,y) = (r\cos\theta, r\sin\theta)$ has a vertical tangent line are calculated as the solutions to

$$ \frac{dx}{dy} = 0 = \frac{dx/d\theta}{dy/d\theta} \tag{1} $$

It is important to emphasize that both $dx/d\theta$ and $dy/d\theta$ must exist and satisfy Eq. (1) for the tangent line to exist. From Eq. (1) we get that

$$ 0 = \frac{dx}{d\theta} = \frac{d}{d\theta}(1 + \cos\theta)\cos\theta = -(1 + 2 \cos\theta) \sin\theta $$

Which implies $\theta = \{0, \pi, 2\pi/3, 4\pi/3\}$. Note, however that

$$ \left.\frac{dy}{d\theta}\right|_{\theta = \pi} = 0 $$

Therefore, according to Eq. (1) $dx/dy = 0/0$ which is not determined! The slope of the parametric curve $(x, y)$ at $(0,0)$ ($\theta = \pi$) does not exist. For the other solutions we get

\begin{eqnarray} \theta = 0 &:& x = 2,\; y = 0 \\ \theta = 2\pi/3 &:& x = -1/4,\; y = \sqrt{3}/4 \\ \theta = 4\pi/3 &:& x = -1/4,\; y = -\sqrt{3}/4 \\ \end{eqnarray}