How to find $ \tan \left(\frac{x}{2}\right) $ knowing that $\cos \left(x\right)+\sin \left(x\right)=\frac{7}{5} $ Good evening to everyone. I don't know how to find $ \tan \left(\frac{x}{2}\right) $ knowing that $$\cos \left(x\right)+\sin \left(x\right)=\frac{7}{5} $$ and x$\in (0,\frac{\pi}{3})$ Here's what I've tried:
$$\tan \left(\frac{x}{2}\right) = \frac{1-\cos \left(x\right)}{\frac{7}{5}- \cos \left(x\right)}$$ But I don't know what to do from here. Can someone explain to me how to solve this? Thanks for any answers.
 A: Since $$\sin { x } =2\sin { \frac { x }{ 2 }  } \cos { \frac { x }{ 2 }  } \\ \cos { x } =\cos ^{ 2 }{ \frac { x }{ 2 }  } -\sin ^{ 2 }{ \frac { x }{ 2 }  } $$
so 

$$\cos  \left( x \right) +\sin  \left( x \right) =\frac { 7 }{ 5 } \\ 5\left( \cos ^{ 2 }{ \frac { x }{ 2 } -\sin ^{ 2 }{ \frac { x }{ 2 }  }  }  \right) +10\sin { \frac { x }{ 2 }  } \cos { \frac { x }{ 2 }  } =7\left( \cos ^{ 2 }{ \frac { x }{ 2 } +\sin ^{ 2 }{ \frac { x }{ 2 }  }  }  \right) \\ 12\sin ^{ 2 }{ \frac { x }{ 2 } - } 10\sin { \frac { x }{ 2 }  } \cos { \frac { x }{ 2 }  } +2\cos ^{ 2 }{ \frac { x }{ 2 } =0 } \\ 6\tan ^{ 2 }{ \frac { x }{ 2 } -5\tan { \frac { x }{ 2 } +1 } =0 } \\ \tan { \frac { x }{ 2 } =\frac { 5\pm 1 }{ 12 }  }  $$

A: Since:
$$ \cos(x)=\frac{1-\tan^2\left(\frac{x}{2}\right)}{1+\tan^2\left(\frac{x}{2}\right)},\qquad\sin(x) =\frac{2\tan\left(\frac{x}{2}\right)}{1+\tan^2\left(\frac{x}{2}\right)}\tag{1}$$
we get:
$$ \left(1-\tan\left(\frac{x}{2}\right)\right)^2 = \frac{7}{5}\left(1+\tan^2\left(\frac{x}{2}\right)\right)\tag{2}$$
and $\tan\left(\frac{x}{2}\right)\color{red}{\in\left\{\frac{1}{2},\frac{1}{3}\right\}}$ can be found by solving a quadratic equation.
As an alternative, we may simply consider the (right) triangle with side lenghts $3,4,5$ and find its (unit) inradius.
A: Hint: $$\cos^2(x) = 1-\sin(x)^2 = 1 - \left(\frac{7}{5} - \cos(x)\right)^2$$ 
Expand and solve for $\cos(x)$.
A: Another approach:
$$\sqrt{2}\cos\left(x + \frac{\pi}{4}\right) = \cos(x) + \sin(x)$$
Thus, 
$$\cos(x) + \sin(x) = \frac{7}{5} \rightarrow \sqrt{2}\cos\left(x + \frac{\pi}{4}\right) = \frac{7}{5}$$
And hence 
$$x + \frac{\pi}{4} = \arccos\left(\frac{7}{5\sqrt{2}}\right)  \rightarrow x = \arccos\left(\frac{7}{5\sqrt{2}}\right) - \frac{\pi}{4}$$
Thus, 
$$\tan\left(\frac{x}{2}\right) = \tan\left(\frac{1}{2}\arccos\left(\frac{7}{5\sqrt{2}}\right) - \frac{\pi}{8} \right) $$
Now from here there is some nasty algebra to arrive at the final answer. So, in observing the results as given above, I think it's interesting to note the identify that comes out from my clearly overly complicated approach:
$$\tan\left(\frac{1}{2}\arccos\left(\frac{7}{5\sqrt{2}}\right) - \frac{\pi}{8} \right) = \frac{5 \pm 1}{12}$$
A: \begin{align}
   \cos x +\sin x &= \frac 75 \\
   \cos^2 x + 2 \cos x \sin x + \sin^2 x &= \frac{49}{25} \\
   2 \cos x \sin x &= \frac{24}{25} \\
\hline
   \cos^2 x - 2 \cos x \sin x + \sin^2 x &= 1 - 2 \cos x \sin x \\
   (\cos x - \sin x)^2 &= \dfrac{1}{25} \\
   \cos x - \sin x &= \pm \frac 15 \\
\hline
   (\cos x, \sin x) &\in \left\{ \left(\frac 45, \frac 35\right), 
                         \left(\frac 35, \frac 45\right) \right\} \\
\hline
   \tan \frac x2 &= \frac{\sin x}{1 + \cos x} \\
   \tan \frac x2 &\in \left\{\frac 39, \frac 48\right\} \\
   \tan \frac x2 &\in \left\{\frac 13, \frac 12\right\}
\end{align}
