1

I am trying to solve a definite integral of a positive function, but I keep getting 0. Integral

mike
  • 667
  • 2
    Check the following link out. It should help. https://math.stackexchange.com/questions/1489577/why-is-it-not-true-that-int-0-pi-sinx-dx-0/1489594#1489594 – Cameron Williams Jul 10 '19 at 02:31
  • You need to break up the domain into pieces where sinx is increasing or decreasing. Sign swicthing is needed for those pieces where it is decreasing. – herb steinberg Jul 10 '19 at 02:40

2 Answers2

2

On using $ \int^a_{-a} f(x) dx = 2 \int^a_0 f(x) dx$ and $ \int^{2a}_0 f(x) dx = \int^a_0 f(x) dx + \int^a_0 f(2a - x) dx$

$$I = \int^{\pi}_{-\pi} \dfrac{1}{1 + \sin^2 (x)} dx = 4 \int^{\pi /2}_0 \dfrac{1}{1 + \sin^2 (x) } dx $$

Multiply, both denominator and numerator by $\sec^2 (x)$ , Use $\sec^2 (x) = \tan^2 (x) + 1$, and substitute $\sqrt{2} \tan x = u$, Following integral would be obtained $$ I = 2 \sqrt{2} \int^{\infty}_0 \dfrac{du}{1 + u^2} = 2 \sqrt{2} \cfrac{\pi}{2} = \sqrt{2} \pi $$

The problem with your substition is that, you've took $du = \cos(x) dx = \color{red} {+} \sqrt{1 - \sin^2 x} dx $, but the right way is $du = \cos(x) dx = \color{red} {\pm} \sqrt{1 - \sin^2 x} dx $ and then substitute the required limits.

xrfxlp
  • 1,505
0

You can also note that $$\int_{-\pi}^{\pi}\frac{dx}{1+\sin^2 x}=2\int_0^\pi\frac{dx}{1+\sin^2 x}$$ because $$\int_{-\pi}^0\frac{dx}{1+\sin^2x}$$ becomes $$\int_0^\pi \frac{dt}{1+\sin^2t}$$ when you use the substitution $x=-t$.

Then, you can feel free to proceed with the integral as you desire.

clathratus
  • 17,161