Find $\tan x $ if $\sin x+\cos x=\frac12$ It is given that $0 < x < 180^\circ$ and $\sin x+\cos x=\frac12$, Find $\tan x $. 
I tried all identities I know but I have no idea how to proceed.  Any help would be appreciated. 

Divide through by $\cos x$ to get
\begin{align}
\tan x + 1 & = \frac 12 \sec x \tag{1}\\
\text{Square both sides: } \qquad\qquad\tan^2 x + 2 \tan x + 1 & = \frac 14 \sec^2 x = \frac{1}{4} (\tan^2 x + 1) \\
3 \tan^2 x + 8 \tan x + 3 & = 0 \\
\tan x & = \frac{-8 \pm \sqrt{28}}{6} = \frac{-4 \pm \sqrt{7}}{3}.
\end{align}
Check the two solutions with the original equation before squaring (equation $(1)$). Because $x \in [0,  \pi]$ and $\tan x < 0$ in both cases, we know that $\sin x \ge 0$ and $\cos x \le 0$, so $\sec x \le 0$.
If $\tan x = \frac{-4 + \sqrt{7}}3$, then $\tan x + 1 = \frac{-1 + \sqrt{7}}3 > 0$, contradicting $(1)$ and $\sec x \le 0$.
If $\tan x = \frac{-4 - \sqrt{7}}3$, then $\tan x + 1 = \frac{-1 - \sqrt{7}}3 < 0$. This looks good.

If you want to be more sure, compute $\sin x$ and $\cos x$ from the chosen $\tan x$:
\begin{align}
\sin x & = \frac{4 + \sqrt 7}{\sqrt{3^2 + (-4 - \sqrt{7})^2}} \\
& = \frac{4 + \sqrt 7}{\sqrt{32 + 8\sqrt 7}} = \frac{1}{4}\sqrt{8 + 2\sqrt{7}}
= \frac{1}{4}(1 + \sqrt{7}) \\
\cos x & = -\sqrt{1 - \sin^2 x} = -\frac{1}{4}\sqrt{8 - 2\sqrt 7} = \frac{1}{4}(1 - \sqrt{7}).
\end{align}
It's obvious that $\sin x + \cos x = \frac 12$, $\sin x \ge 0$ and $\cos x \le 0$.
