<s>[INST] 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.
 [/INST] \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}
</s>