# 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.

• Check the question, please. The function $f(x)=\cos x+\sin x$ achieves its maximum $\sqrt2$ at $x=\pi/4$. The fraction $7/5$ is very close to $\sqrt2$, so there are two possible values for $x$ near $\pi/4$. Those lead to two different values for $\tan (x/2)$. Note that $f(\pi/6)=f(\pi/3)<7/5$, so there is one solution $x\in(\pi/4,\pi/3)$ and another in $(\pi/6,\pi/3)$. – Jyrki Lahtonen Jul 20 '16 at 18:48

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 } }$$

• Getting a negative value for $\tan(x/2)$ does not sound realistic at all. – hmakholm left over Monica Jul 20 '16 at 18:52
• @HenningMakholm,it was typo thanks for mentioned – haqnatural Jul 20 '16 at 18:54
• Sorry can you explain to me how did you pass from $12\sin^2 \left(\frac{x}{2}\right) - 10 \sin \left(\frac{x}{2}\right) + 2\cos ^2\left(\frac{x}{2}\right)$ to $6\tan ^2\left(\frac{x}{2}\right) -5\tan\left(\frac{x}{2}\right) +1$? I didn't understand too well. – T4yl0r Jul 20 '16 at 19:18
• sure ,by dividing both side to $2\cos ^{ 2 }{ \frac { x }{ 2 } }$ you will get the result – haqnatural Jul 20 '16 at 19:20
• @Bettani thanks :) – T4yl0r Jul 20 '16 at 19:26

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.

Hint: $$\cos^2(x) = 1-\sin(x)^2 = 1 - \left(\frac{7}{5} - \cos(x)\right)^2$$ Expand and solve for $\cos(x)$.

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}$$

\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}