Solve trigonometric equation $\tan\theta + \sec\theta =2\cos \theta$ 
$$\tan\theta + \sec\theta =2\cos \theta,\quad 0\le \theta\le 2\pi$$Find all the possible solutions for the equations. 

Multiply both sides by $\sec\theta - \tan \theta$.
$$\implies (\tan\theta + \sec\theta)(\sec\theta - \tan\theta) = (\sec\theta -\tan\theta)2\cos \theta$$
$$\implies 1 = 2 -2\sin \theta$$ $$\implies \sin \theta=\frac12 \implies \theta = \arcsin\frac12$$Such a solution gets me two solutions $\frac{\pi}6$ and $\frac{5\pi}6$. But when I Wolfram it, I am supposed to get one more solution i.e $\frac{3\pi}2$, but at $\frac{3\pi}2$ $\tan \theta$ and $\sec\theta$ aren't defined.
 A: Start with 
$$\tan(\theta) + \sec(\theta) = 2\cos(\theta).$$
Multiply both sides by $\cos(\theta)$ to get
$$\sin(\theta) + 1 = 2\cos^2(\theta);$$
be warned that extraneous roots could be introduced where $\cos(\theta) = 0$, so you will hve to check these two roots separately.
Now use the Pythagorean identity to get
$$\sin(\theta) + 1 = 2 - 2\sin^2(\theta).$$
This is a quadratic-in-drag. Solve it; then check  the two other places where $\cos(\theta) = 0$ separately.  Beware of any domain considerations.
A: $$\sec\theta+\tan\theta=2\cos\theta=\frac2{\sec\theta}$$
$$\implies \sec\theta-\tan\theta=\frac1{\sec\theta+\tan\theta}=\frac{\sec\theta}2$$
$$\implies \sec\theta\left(1-\frac12\right)=\tan\theta$$
$$\implies \frac{\tan\theta}{\sec\theta}=\frac12\iff \sin\theta=\frac12=\sin\frac\pi6$$
$$\implies \theta=n\pi+(-1)^n\frac\pi6\text{ where }n \text{ is any integer}$$
If $n$ is even $=2m$(say), $\theta=2m\pi+\frac\pi6$
As $0\le \theta\le2\pi, 0\le2m\pi+\frac\pi6\le2\pi\implies 0\le 12m+1\le12\implies m=0$
Similarly, if $n$ is odd $=2m+1$(say), $\theta=(2m+1)\pi-\frac\pi6\implies m=0$
