# 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. – Henning Makholm 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}$$