# Difficult integral involving trigonometric and hypertrigonometric functions

This is definitely the most difficult integral that I've ever seen. Of course, I'm not able to solve this. Could you help me?

$$\int { \sin { x\cos { x } \cosh { \left( \ln { \sqrt { \frac { 1 }{ 1-\sin { x } } } +\tanh ^{ -1 }{ \left( \sin x \right) +\tanh ^{ -1 }{ \left( \cos { x } \right) } } } \right) } } dx }$$

• Start by writing $\text{arctanh}(z)$ as $\frac{1}{2}\log\left(\frac{1+z}{1-z}\right)$ and collecting the arguments of the logarithms. – Jack D'Aurizio Aug 28 at 21:05
• It may also be useful to note that $\cosh\log z = \frac{1}{2}(z+z^{-1})$. You should keep in mind that for integrals that look as hopeless as this, it is almost always the case that the integrand has just been disguised by simple manipulations. The real challenge probably has nothing to do with integration, but rather with your skill at simplifying the integrand first. – MPW Aug 28 at 21:11
• Did you try anything at all? If so you showed no effort. At least try to simplify the integrand. You already have two hints. If you follow them, you should have an almost rational function of circular functions. The remaining simplification would depend on some knowledge of trigonometry, of course. Finally, you can always try the Weierstrass substitution. Good luck and let's know where you're stuck instead. – Allawonder Aug 28 at 21:19
• Please write an informative question title... one that helps others find this problem and its solution. – David G. Stork Aug 28 at 21:57
• Allawonder I've tried to use the hint that Jack suggested, it was my first try. Writing arctanh(x) in that way it's not very good. The final result is not a rational function. – Leprep98 Aug 28 at 21:58

Using the fact that $$\cosh t = \frac{1}{\sqrt{1-\tanh^2 t}}$$ and $$\sinh t = \frac{\tanh t}{\sqrt{1-\tanh^2 t}}$$ $$\cosh(a+b+c) = \cosh a \cosh b \cosh c + \sinh a \sinh b \cosh c + \sinh a \cosh b \sinh c + \cosh a \sinh b \sinh c$$ the integrand simplifies to $$\int dx \left[\cosh\left(\log\left(\frac{1}{\sqrt{1-\sin x}}\right)\right)\left(1+\sin x \cos x\right) + \sinh\left(\log\left(\frac{1}{\sqrt{1-\sin x}}\right)\right)\left(\sin x + \cos x \right) \right]$$ Next we'll substitute $$x = 2z+\frac{\pi}{2}$$: $$\int 2dz \left[\cosh\left(\log\left(\frac{1}{\sqrt{1-\cos 2z}}\right)\right)\left(1-\sin 2z \cos 2z\right) + \sinh\left(\log\left(\frac{1}{\sqrt{1-\cos 2z}}\right)\right)\left(\cos 2z - \sin 2z \right) \right]$$ $$= \frac{1}{\sqrt2}\int dz (2\sin z + \csc z )(1-\sin 2z \cos 2z)-(2\sin z - \csc z )(\cos 2z - \sin 2z)$$ $$= \frac{1}{\sqrt2}\int dz\left[4\sin^2 z \cos z(1-\cos 2z) - 2\cos z(1+2\cos 2z)+2\sin z(1-\cos 2z)+ \csc z(1+\cos 2z) \right]$$ $$=\frac{1}{\sqrt{2}} \int(8\sin^4 z + 4 \sin^ z - 4)\cos z - (4\cos^2 z - 2)\sin z + 2 \csc z dz$$ $$= \sqrt{2}\left(\frac{4}{5}\sin^5 z + \frac{2}{3}\sin^3 z - 2 \sin z + \frac{2}{3}\cos^3 z - 2\cos z - \log|\csc z + \cot z|\right)$$ Therefore our final answer is $$\sqrt{2}\left(\frac{4}{5}\sin^5 \left(\frac{x}{2}-\frac{\pi}{4}\right) + \frac{2}{3}\sin^3 \left(\frac{x}{2}-\frac{\pi}{4}\right) - 2 \sin \left(\frac{x}{2}-\frac{\pi}{4}\right) + \frac{2}{3}\cos^3 \left(\frac{x}{2}-\frac{\pi}{4}\right) - 2\cos \left(\frac{x}{2}-\frac{\pi}{4}\right) - \log{\left|\csc \left(\frac{x}{2}-\frac{\pi}{4}\right) + \cot \left(\frac{x}{2}-\frac{\pi}{4}\right)\right|}\right) + C$$
Edit: We can simplify this a bit further with some trig shenanigans. Applying the angle subtraction formulas, we get: $$\frac{1}{5}\left(\sin \left(\frac{x}{2}\right)-\cos\left(\frac{x}{2}\right)\right)^5 + \frac{1}{3}\left(\sin \left(\frac{x}{2}\right)-\cos\left(\frac{x}{2}\right)\right)^3 - 2 \left(\sin \left(\frac{x}{2}\right)-\cos\left(\frac{x}{2}\right)\right) + \frac{1}{3}\left(\sin \left(\frac{x}{2}\right)+\cos\left(\frac{x}{2}\right)\right)^3 - 2\left(\sin \left(\frac{x}{2}\right)+\cos\left(\frac{x}{2}\right)\right) - \sqrt{2}\log{\left|\frac{\sqrt{2}+\cos\left(\frac{x}{2}\right)+\sin\left(\frac{x}{2}\right)}{\sin\left(\frac{x}{2}\right)-\cos\left(\frac{x}{2}\right)}\right|} + C$$ $$=\frac{1}{5}\left(\sin \left(\frac{x}{2}\right)-\cos\left(\frac{x}{2}\right)\right)^5 + \frac{2}{3}\sin \left(\frac{x}{2}\right)\left(\sin^2 \left(\frac{x}{2}\right)+3\cos^2\left(\frac{x}{2}\right)\right) - 4 \sin \left(\frac{x}{2}\right) - \sqrt{2}\log{\left|\frac{\sqrt{2}+\cos\left(\frac{x}{2}\right)+\sin\left(\frac{x}{2}\right)}{\sin\left(\frac{x}{2}\right)-\cos\left(\frac{x}{2}\right)}\right|} + C$$ $$=\frac{1}{5}\left(\sin \left(\frac{x}{2}\right)-\cos\left(\frac{x}{2}\right)\right)^5 + \frac{2}{3}\sin \left(\frac{x}{2}\right)\cos x - \frac{8}{3} \sin \left(\frac{x}{2}\right) - \frac{1}{\sqrt{2}}\log{\left(\frac{3+2\sqrt{2}(\cos\left(\frac{x}{2}\right)+\sin\left(\frac{x}{2}\right))+\sin x}{1-\sin x}\right)} + C$$ And I think I will stop there.
$$-\frac{\sqrt{\frac{1}{1-\sin (x)}} \sqrt{\sin ^2(2 x)} \csc^2(x) \\ \left(-90 \sin \left(\frac{x}{2}\right)+35 \sin \left(\frac{3 x}{2}\right)-3 \sin \left(\frac{5 x}{2}\right)+15 \cos \left(\frac{3 x}{2}\right)+3 \cos \left(\frac{5 x}{2}\right)+30 \cos \left(\frac{x}{2}\right) \left(4 \sqrt{\frac{1}{\cos (x)+1}} \log \left(\tan \left(\frac{x}{2}\right)-1\right)-4 \sqrt{\frac{1}{\cos (x)+1}} \log \left(2 \sqrt{\frac{1}{\cos (x)+1}}+\tan \left(\frac{x}{2}\right)+1\right)+1\right)\right)}{60 \left(\csc \left(\frac{x}{2}\right)+\sec \left(\frac{x}{2}\right)\right)}$$