# How to integrate $\int \frac{1}{\sin^4x + \cos^4 x} \,dx$?

How to integrate $$\int \frac{1}{\sin^4x + \cos^4 x} \,dx$$

I tried the following approach: $$\int \frac{1}{\sin^4x + \cos^4 x} \,dx = \int \frac{1}{\sin^4x + (1-\sin^2x)^2} \,dx = \int \frac{1}{\sin^4x + 1- 2\sin^2x + \sin^4x} \,dx \\ = \frac{1}{2}\int \frac{1}{\sin^4x - \sin^2x + \frac{1}{2}} \,dx = \frac{1}{2}\int \frac{1}{(\sin^2x - \frac{1}{2})^2 + \frac{1}{4}} \,dx$$

The substitution $t = \tan\frac{x}{2}$ yields 4th degree polynomials and a $\sin$ substitution would produce polynomials and expressions with square roots while Wolfram Alpha's solution doesn't look that complicated. Another approach: $\sin^4x + \cos^4 x = (\sin^2 x + \cos^2x)(\sin^2 x + \cos^2 x) - 2\sin^2 x\cos^2 x = 1 - 2\sin^2 x\cos^2 x = (1-\sqrt2\sin x \cos x)(1+\sqrt2\sin x \cos x)$
and then I tried substituting: $t = \sin x \cos x$ and got $$\int\frac{t\,dt}{2(1-2t^2)\sqrt{1-4t^2}}$$

Another way would maybe be to make two integrals: $$\int \frac{1}{\sin^4x + \cos^4 x} \,dx = \int \frac{1}{(1-\sqrt2\sin x \cos x)(1+\sqrt2\sin x \cos x)} \,dx = \\ \frac{1}{2}\int \frac{1}{1-\sqrt2\sin x \cos x} \,dx + \frac{1}{2}\int\frac{1}{1+\sqrt2\sin x \cos x} \,dx$$

... and again I tried $t = \tan\frac{x}{2}$ (4th degree polynomial) and $t=\sqrt2 \sin x \cos x$ and I get $\frac{\sqrt 2}{2} \int \frac{\,dt}{(1-t)\sqrt{1-2t^2}}$ for the first one.

Any hints?

• Have you tried the Weierstrass substitution? Jun 4, 2014 at 19:44
• Using the en.wikipedia.org/wiki/… will transform the integrand to the simpler $\frac1{a+b\cos4t}$.
– user65203
Jun 4, 2014 at 19:48
• Notice $$\sin^4 x + \cos^4x = 1 - 2\sin^2x\cos^2x = 1 - \frac12\sin^2(2x) = \frac14(3+\cos4x)$$ Introduce $t = \tan2x$, we get $$\int\frac{dx}{\sin^4 x + \cos^4x} = \int \frac{4}{3 + \frac{1-t^2}{1+t^2}}\frac{dt}{2(1+t^2)} = \int\frac{dt}{2+t^2} = \frac{1}{\sqrt{2}}\tan^{-1}\left(\frac{t}{\sqrt{2}}\right) + \text{const.}$$ Jun 4, 2014 at 19:55

Simplify the denominator in the following way: $$\sin^4x+\cos^4x=(\sin^2x+\cos^2x)^2-2\sin^2x\cos^2x=1-\frac{\sin^2(2x)}{2}=\frac{1+\cos^2(2x)}{2}=\frac{2+\tan^2(2x)}{2\sec^2(2x)}$$ Hence, the integral you are dealing with is: $$\int \frac{2\sec^2(2x)}{2+\tan^2(2x)}\,dx$$ I guess the next step is pretty obvious now. ;)

• May I ask how you got: $\frac{2+\tan^2(2x)}{2\sec^2(2x)}$ ? Did you use Wolfram Alpha, "try and error", a certain trick, a specific algorithm, ... ? I verified for myself that this is true but how to "come up" with something like this? Jun 13, 2014 at 9:04
• @Shirohige: I used only the basic trigonometric identities. First factor out $\cos^2x$ from the numerator and use that $\cos^2x=\frac{1}{\sec^2x}$. Then write $\sec^2x$ in the numerator as $1+\tan^2x$. Jun 13, 2014 at 14:01

Another approach:

We have $$\frac{1}{\sin^4x+\cos^4x},\tag1$$ Multiply $(1)$ by $\dfrac{\tan^4x}{\tan^4x}$ we obtain $$\frac{\tan^4x}{\sin^4x(1+\tan^4x)}=\frac{\sec^4x}{1+\tan^4x}=\frac{(1+\tan^2x)\sec^2x}{1+\tan^4x}.\tag2$$ Letting $t=\tan x$, the integral turns out to be \eqalign { \int\frac{1+t^2}{1+t^4}\ dt&=\frac12\int\left[\frac{1}{t^2-\sqrt2t+1}+\frac{1}{t^2+\sqrt2t+1}\right]\ dt\\ &=\frac12\int\left[\frac{1}{\left(t-\dfrac1{\sqrt2}\right)^2+\dfrac34}+\frac{1}{\left(t+\dfrac1{\sqrt2}\right)^2+\dfrac34}\right]\ dt.\tag3 } Using substitution $u=\dfrac{\sqrt3}2\left(t-\dfrac1{\sqrt2}\right)$ and $v=\dfrac{\sqrt3}2\left(t+\dfrac1{\sqrt2}\right)$, the integral in $(3)$ can easily be evaluated.

Another way to evaluate $\displaystyle\int\frac{1+t^2}{1+t^4}\ dt$ is dividing the integrand by $\dfrac{t^2}{t^2}$, we obtain \eqalign { \int\frac{1+\dfrac1{t^2}}{t^2+\dfrac1{t^2}}\ dt&=\int\frac{1+\dfrac1{t^2}}{\left(t-\dfrac1{t}\right)^2+2}\ dt. } Now let $u=t-\dfrac1{t}\;\Rightarrow\;du=\left(1+\dfrac1{t^2}\right)\ dt$, the integral turns out to be $$\int\frac{1}{u^2+2}\ du.\tag4$$ The evaluation of the integral $(4)$ can follow @achillehui's comment.
Convert the exponential powers to multiple angles. From deMoivre's theorem, with $$n\in\mathbb{N}$$: \begin{align} \left( e^{i \theta} \right)^{n} &= e^{i n\theta} \\ \left( \cos \theta + i \sin \theta \right)^{n} &= \cos n\theta + i \sin n\theta \end{align} These intermediate formulas may help: \begin{align} \cos 2\theta &= \cos^{2} \theta - \sin^{2} \theta \\ \sin 2\theta &= 2 \cos \theta \sin 2 \theta \\ \end{align} Reduce the denominator $$\sin ^4(x)+\cos ^4(x) = \frac{1}{4} (\cos (4 x)+3)$$ The primitive is $$\int \frac{1}{\cos^{4}x + \sin^{4}x} \, dx = \int \frac{1}{\cos (4 x)+3} \, dx = \left(4 \sqrt{2}\right)^{-1}\arctan \left(\frac{\tan (2 x)}{\sqrt{2}}\right)$$
\begin{aligned} \sin ^{4} x+\cos ^{4} x &=\left(\sin ^{2} x+\cos ^{2} x\right)^{2}-2 \sin ^{2} x \cos ^{2} x \\ &=1-2 \sin ^{2} x \cos ^{2} x \\ \int \frac{d x}{\sin ^{4} x+\cos ^{4} x} &=\int \frac{d x}{1-2 \sin ^{2} x \cos ^{2} x} \\ &=\int \frac{\sec ^{4} x}{\sec ^{4} x-2 \tan ^{2} x} d x \\ &\stackrel{t=\tan x}{=} \int \frac{1+t^{2}}{\left(1+t^{2}\right)^{2}-2 t^{2}} d t, \\ &=\int \frac{1+t^{2}}{t^{4}+1} d t \\ &=\int \frac{1+\frac{1}{t^{2}}}{t^{2}+\frac{1}{t^{2}}} d t \\ &=\int \frac{d\left(1-\frac{1}{t}\right)}{\left(t-\frac{1}{t}\right)^{2}+2} \\ &=\frac{1}{\sqrt{2}} \tan^{-1}\left(\frac{t-\frac{1}{t}}{\sqrt{2}}\right)+C \\ &=\frac{1}{\sqrt{2}} \tan ^{-1}\left(\frac{\tan x-\cot x}{\sqrt{2}}\right)+C \end{aligned}