# Integrals from Brasilian Math Olympiad 2019

The following integrals are the Brasilian Mathematical Olympiad in 2019.

Show that $$\displaystyle\int_1^2\frac{e^x(x-1)}{x(x+e^x)}\,dx=\ln\left(\frac{2+e^2}{2+2e}\right)$$ and $$\displaystyle\int_0^{\pi/2}\frac{x\sin(2x)}{1+\cos(2x)^2}\,dx=\frac{\pi^2}{16}$$.

I tried to use traditional methods, but these integrals are very difficult. Has someone any suggestion? Thanks a lot.

• As a "test-taker's answer" for the first one, the fact that $F(2) - F(1) = \ln \left(\frac{2 + e^2}{2 + 2e}\right)$ is a big hint that $F(x)$ is probably $\ln \left(\frac{x + e^x}{x + xe}\right)$ (such that $F(2) = \ln \left(\frac{2 + e^2}{2 + 2e}\right)$ and $F(1) = 0$); and it's straightforward to confirm that that is in fact the case, by taking its derivative, $F^\prime(x) = \frac{e^x(x-1)}{x(x+e^x)}$. – ruakh Sep 28 at 1:38

$$\int_1^2\frac{e^x(x-1)}{x(x+e^x)}dx=\int_1^2 \frac{e^x\left(\frac{1}{x}-\frac{1}{x^2}\right)}{1+\frac{e^x}{x}}dx=\ln\left(1+\frac{e^x}{x}\right)\bigg|_1^2 =\ln\left(\frac{1+\frac{e^2}{2}}{1+e}\right)$$

For the second one, let $$\frac{\pi}{2}-x=t$$ to get: $$\mathcal J=\int_0^{\pi/2}\frac{x\sin(2x)}{1+\cos^2(2x)}dx=\int_{\pi/2}^0 \frac{\left(\frac{\pi}{2}-t\right)\sin(2t)}{1+\cos^2(2t)}(-dt)\overset{t=x}=\int_0^\frac{\pi}{2}\frac{\left(\frac{\pi}{2}-x\right)\sin(2x)}{1+\cos^2(2x)}dx$$ Now add them up to get: $$2\mathcal J=\frac{\pi}{2}\int_0^\frac{\pi}{2}\frac{\sin(2x)}{1+\cos^2(2x)}dx\Rightarrow \mathcal J=-\frac{\pi}{8}\arctan(\cos(2x))\bigg|_0^\frac{\pi}{2}=\frac{\pi^2}{16}$$

• Your last integral has the wrong bounds of integration after substitution. Just take out the negative. – Andrew Chin Sep 24 at 14:42
• If $x\to0$ in $\frac{\pi}2-x=t$, then what is $t\to$? – Andrew Chin Sep 24 at 14:43
• @AndrewChin Are you overlooking $dt=-dx$? – saulspatz Sep 24 at 14:45
• Oh that's what I overlooked – Andrew Chin Sep 24 at 14:46

For the second integral, use $$\int_a^bf(x) = \int_a^bf(a+b-x)$$ and add these together to get $$I = \int_0^\frac\pi2 {\frac \pi4\sin(2x)\over1+\cos(2x)^2}$$. Substituting with $$\cos(2x) = t$$ gives the solution easily.

• this answer would be a lot more impressive if it was written by a dog – clathratus Sep 26 at 22:03

Hint: $$\int \frac {2\sin (2x)}{1+\cos^2(2x)}dx=-\arctan (\cos(2x))$$ (you can show this by substitution)