Getting different answers for a definite Integral using different approaches.

68 Views Asked by At

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

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

Now with a substitution like - $$u = \tan x$$

The definite integral reduces to, $$\int_0^0 \frac{du}{u^{2}+2} = 0 \ ?$$

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

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

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

*I am new to MathJax. Any syntax error is regretted.

2

There are 2 best solutions below

0
On

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

0
On

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?