7

I am trying to evaluate this definite integral problem. $$\int_0^\pi\frac{\mathrm dx}{1+\cos^2x}$$

Dividing the numerator and the denominator by $\cos^2x$, the integrand becomes $$\int_0^\pi\frac{\sec^2x\,\mathrm dx}{\sec^2x+1}=\int_0^\pi\frac{\sec^2x\mathrm dx}{\tan^2x+2}$$

Now with the substitution $u=\tan x$, the definite integral reduces to $$\int_0^0\frac{\mathrm du}{u^2+2}=0?$$

But using the property of definite integrals we know, $$\int_0^{2a}f(x)\mathrm dx=\int_0^a(f(x)+f(2a-x))\mathrm dx$$

Applying this property to our function, the integral becomes $$2\int_0^\frac\pi2\frac{\sec^2x\,\mathrm dx}{\tan^2x+2}\mathrm dx=2\int_0^\infty\frac{\mathrm du}{u^2+2}=\frac{\pi}{\sqrt{2}} \ !!$$

Getting different answers in both cases. What am I doing wrong?

Integreek
  • 8,530
Arnab
  • 71
  • 1
    For the substitution $u=$ tan $x$, you need to consider that tan $x \rightarrow \infty$ as $x \rightarrow \pi/2$. Hence, you need to break the integral into $x = 0$ to $\frac{\pi}{2}^-$ and $x = \frac{\pi}{2}^+$ to $\pi$ – bigbang May 05 '21 at 08:21
  • 2
    Your substitution needs to be injective. – Zack May 05 '21 at 09:02

2 Answers2

2

The substitution you used in the first approach is not valid. $\tan x$ is not even defined on $[0,\pi]$.

2

This is a nice question. This link contains a beautiful answer related to your question given by Professor Blatter. Honestly, this is one of my most favorite answers on this site. I hope this helps.

Why should the substitution be injective when integrating by substitution?