# Integrate $\left(\frac{\cos^3x\>+\>\sin^3x}{\cos^4x\>+\>\sin^4x}\right)^2$ over $[-\frac\pi4,\frac\pi4]$

I encountered the task of evaluate the definite integral, $$\int_{-\frac\pi4}^{\frac\pi4}\left(\frac{\cos^3x+\sin^3x}{\cos^4x+\sin^4x}\right)^2dx$$

which came about when I had answered a post as to whether there is an analytical solution to the area of an enclosed loop in polar space. After some laborious expansion and substitutions, I was happy to arrive at the algebraic expression $$\frac{3\sqrt2}{8}\pi$$, yet unhappy about the lengthy computation spent.

I wonder there may be some efficient procedure out there and would love to know.

• Using this site integral-calculator.com you will get a step-by-step solution to your problem. – Dinno Koluh Nov 2 '19 at 15:24
• @DinnoKoluh - Thanks for the note. I did try and it was no less tedious. I believe those integrators follow prescribed algorithms and may not be smarter. – Quanto Nov 2 '19 at 15:43

## 2 Answers

$$\int_{-\pi/4}^{\pi/4}\left(\frac{\sin^3 x+\cos^3 x}{\sin^4 x+\cos^4 x}\right)^2\,dx\stackrel{x\mapsto\arctan t}{=}\int_{-1}^{1}\frac{(1+t^3)^2}{(1+t^4)^2}\,dt\stackrel{\text{sym}}{=}2\int_{0}^{1}\frac{1+t^6}{(1+t^4)^2}\,dt$$ and the RHS (due to the sub $$t\mapsto 1/t$$) can also be expressed as $$\int_{0}^{+\infty}\frac{1+t^6}{(1+t^4)^2}\,dt = 2\int_{0}^{+\infty}\frac{dt}{(1+t^4)^2}$$ which only depends on values of the Beta function, after letting $$\frac{1}{1+t^4}=u$$.
By the same principle $$\int_{-\pi/4}^{\pi/4}\left(\frac{\sin^{2n-1}x+\cos^{2n-1}x}{\sin^{2n} x+\cos^{2n} x}\right)^2\,dx = \frac{\pi(2n-1)}{4n^2\sin\frac{\pi}{2n}}$$ for any $$n>1$$.

• Is there really an even symmetry, especially in the numerator? – Allawonder Nov 2 '19 at 16:29
• @Allawonder: I have checked everything. $(1+t^3)^2+(1-t^3)^2$ equals $2(1+t^6)$, that is the point: $$\int_{-1}^{1}\frac{(1+t^3)^2}{(1+t^4)^2}\,dt = \int_{0}^{1}\frac{(1+t^3)^2}{(1+t^4)^2}\,dt+\int_{0}^{1}\frac{(1\color{red}{-}t^3)^2}{(1+t^4)^2}\,dt.$$ – Jack D'Aurizio Nov 2 '19 at 16:35
• Oh, yes, now that is clear. – Allawonder Nov 2 '19 at 16:37
• @JackD'Aurizio - The terse reduction is great. Now, I'm more impressed with the generalization. – Quanto Nov 2 '19 at 22:26
• @bjorn93: through $t\mapsto 1/t$, $$\int_{0}^{+\infty}\frac{dt}{(1+t^4)^2}=\int_{0}^{+\infty}\frac{t^6 dt}{(1+t^4)^2}.$$ – Jack D'Aurizio Nov 3 '19 at 15:03

If it's any help, the integrand may be simplified as follows, after setting $$c=\cos x$$ and $$s=\sin x$$:

In the denominator, we have that $$2(c^4+s^4)=2[(c^2)^2+(s^2)^2]=(c^2+s^2)^2+(c^2-s^2)^2=1+\cos^22x=1+\frac12(1+\cos 4x)=\frac32+\frac12\cos 4x.$$ Squaring gives $$\frac94+\frac32\cos4x+\frac14\cos^24x=\frac94+\frac32\cos4x+\frac18(1+\cos 8x)=\frac{19}{8}+\frac32\cos4x+\frac18\cos8x.$$

And now for the numerator, we have $$c^3+s^3=(c+s)(c^2+s^2-cs)=(c+s)(1-\frac12\sin 2x).$$ Squaring gives $$(c^2+s^2+2cs)(1-\sin 2x+\frac14\sin^22x)=(1+\sin 2x)[1-\sin 2x+\frac18(1-\cos 4x)]=(1+\sin 2x)(\frac98-\sin 2x-\frac18\cos 4x).$$ Expanding and simplifying gives $$\frac12+\frac{3}{16}\sin 2x-\frac{1}{16}\sin 6x+\frac38\cos 4x.$$

Thus your integrand becomes $$\frac{\frac12+\frac{3}{16}\sin 2x-\frac{1}{16}\sin 6x+\frac38\cos 4x}{\frac{19}{8}+\frac32\cos4x+\frac18\cos8x},$$ or more simply $$\frac{8+\sin 2x-\sin 6x+6\cos 4x}{38+24\cos4x+2\cos8x}.$$

It is either possible to notice a further simplification, or just use an appropriate substitution a la Weierstrass.