12 May 2026

Let us begin with the medium integral, since I believe it is actually more challenging and interesting:

Compute the following integral: $$ {\rm I} = \lint_0^{\pi/2} \frac{x\sin x\cos x}{\sin^4 x + \cos^4 x} \diff x. $$

Proposed by the user "Phalit Sehgal" on the website dailyintegral.com.

The key step is to notice the symmetry of the trigonometric functions on $[0, 2\pi]$, and from there apply King's rule to remove the linear term: $$ {\rm I} = \lint_0^{\pi/2} \frac{(\pi/2 - x)\sin(\pi/2 - x)\cos(\pi/2 - x)}{\sin^4(\pi/2 - x) + \cos^4(\pi/2 - x)} \diff x = \frac{\pi}{2}\lint_0^{\pi/2} \frac{\sin x\cos x}{\sin^4 x + \cos^4 x} \diff x - {\rm I} \implies {\rm I} = \frac\pi4 \lint_0^{\pi/2} \frac{\sin x\cos x}{\sin^4 x + \cos^4 x} \diff x. $$ With the double-angle sine formula the numerator becomes $\sin(2x)/2$, whereas the denominator requires a bit more work. From the cosine of a double angle it follows that $$ \begin{align*} \cos(2x) = \cos^2 x - \sin^2 x &\implies \begin{cases} \sin^2 x &= (1 - \cos(2x))/2\\ \cos^2 x &= (1 + \cos(2x))/2\\ \end{cases}\\ &\implies \sin^4 x + \cos^4 x = \frac14 [(1 - \cos(2x))^2 + (1 + \cos(2x))^2] = \frac12 (1 + \cos^2(2x)); \end{align*} $$ putting everything together a final $t$-substitution completes the problem: $$ {\rm I} = \frac\pi4 \lint_0^{\pi/2} \frac{\sin(2x)}{1 + \cos^2(2x)} \diff x = \left\{\begin{aligned} t &= \cos (2x)\\ \diff t &= -2\sin(2x)\diff x \end{aligned}\right\} = \frac\pi8 \lint_{-1}^1 \frac{\diff t}{1 + t^2} = \color{green}\boxed{\frac{\pi^2}{16}.} $$

Now for the "hard" one:

Evaluate the following expression: $$ a^2 \lint_0^\infty \frac{\sin(xy)}{x(x^2 + a^2)} \diff x - \frac{\partial^2}{\partial y^2}\lint_0^\infty \frac{\sin(xy)}{x(x^2 + a^2)} \diff x. $$

Proposed by the user "Ege A." on the website dailyintegral.com.

Leibniz's rule allows us to move the partial derivative into the integral, and after doing that the expression heavily simplifies: $$ \begin{align*} a^2 \lint_0^\infty \frac{\sin(xy)}{x(x^2 + a^2)} \diff x - \frac{\partial^2}{\partial y^2}\lint_0^\infty \frac{\sin(xy)}{x(x^2 + a^2)} \diff x &= \lint_0^\infty \frac{a^2\sin(xy)}{x(x^2 + a^2)}\diff x - \lint_0^\infty\frac{\partial^2}{\partial y^2}\left(\frac{\sin(xy)}{x(x^2+a^2)}\right)\diff x\\ &= \lint_0^\infty \frac{\cancel{(x^2 + a^2)}\sin(xy)}{x\cancel{(x^2 + a^2)}} \diff x = \lint_0^\infty \frac{\sin(xy)}{x} \diff x. \end{align*} $$ After the obvious change of variables, this becomes the famous Dirichlet integral, whose value is widely known: $$ \lint_0^\infty \frac{\sin(xy)}{x} \diff x = \left\{\begin{aligned} t &= xy\\ \diff t &= y\diff x \end{aligned}\right\} = \lint_0^{\pm \infty} \frac{\sin t}{t} \diff t = \color{green}\boxed{\frac\pi2.} $$