TITLE: If $\sin x + \cos x = \frac{\sqrt{3} + 1}{2}$ then $\tan x + \cot x=?$
QUESTION [6 upvotes]: Hello :)
I hit a problem.
If $\sin x + \cos x = \frac{\sqrt{3} + 1}{2}$, then how much is $\tan x  + \cot x$?

REPLY [5 votes]: Another more general approach is to solve your equation for $x$. Since it is
linear in $\sin x$ and $\cos x$ it can be transformed into a quadratic
equation in $\tan \frac{x}{2}$ (see this answer): 
$$\sin x+\cos x=\frac{1+\sqrt{3}}{2}\Leftrightarrow \frac{2\tan \frac{x}{2}}{%
1+\tan ^{2}\frac{x}{2}}+\frac{1-\tan ^{2}\frac{x}{2}}{1+\tan ^{2}\frac{x}{2}}%
=\frac{1+\sqrt{3}}{2}$$
$$\Leftrightarrow 2\tan \frac{x}{2}+1-\tan ^{2}\frac{x}{2}=\left( 1+\tan ^{2}%
\frac{x}{2}\right) \frac{1+\sqrt{3}}{2}.$$
Set $y=\tan \frac{x}{2}$
$$2y+1-y^{2}=\frac{1+\sqrt{3}}{2}+\frac{1+\sqrt{3}}{2}y^{2}\Leftrightarrow \left( 1+\frac{1+\sqrt{3}}{2}\right) y^{2}-2y-1+\frac{1+%
\sqrt{3}}{2}=0$$
and solve for $y$
$$y_{1}=\frac{1}{3}\sqrt{3},y_{2}=2-\sqrt{3}$$
Hence
$$x_{1}=2\arctan \frac{1}{3}\sqrt{3}=\frac{1}{3}\pi $$
or
$$x_{2}=2\arctan \left( 2-\sqrt{3}\right) =\frac{1}{6}\pi .$$
And finally
$$\tan \frac{1}{3}\pi +\cot \frac{1}{3}\pi =\frac{4}{3}\sqrt{3}$$
or
$$\tan \frac{1}{6}\pi +\cot \frac{1}{6}\pi =\frac{4}{3}\sqrt{3}.$$