Problem with value of integral

106 Views Asked by At

I calculate $\int \frac{dx}{\sin^2x+1}=\frac{1}{\sqrt{2}}\arctan(\sqrt{2}\tan x)+c.$ And then I want to calculate $$\int_{0}^{\pi} \frac{dx}{\sin^2x+1}$$. But $\tan\pi=\tan0=0$. So it seems that $\int_{0}^{\pi} \frac{dx}{\sin^2x+1}=0$, but it's not true. Where is mistake in my justification ?

2

There are 2 best solutions below

2
On BEST ANSWER

Hint: $$\int_0^\pi \frac{dx}{1+\sin(x)^2}=2\int_0^{\pi/2}\frac{dx}{1+\sin(x)^2}$$ And $\arctan \infty=\pi/2$. Can you take it from here?

0
On

I made the same mistake before. Refer to [Integral][Please identify problem] $\displaystyle\int \cfrac{1}{1+x^4}\>\mathrm{d} x$

The reason of the problem is that $\arctan(\sqrt{2}\tan x)$ has a jump but the integral should be continuous, so in the two branches of the function (splitted by the jump point), you need to pick 2 different constants to make it continuous. It also apply to similar situations.