5

Evaluate: $$\int_0^{\pi} \frac{x}{1+\sin^2{x}}dx$$

My attempt:

Let $I = \int_0^{\pi} \frac{x}{1+\sin^2{x}}dx$

Using Identity: $$\int_0^af(x)dx=\int_0^af(a-x)dx$$ I got: $$I=\int_0^{\pi} \frac{\pi -x}{1+\sin^2{(\pi -x})}dx$$

$$I=\frac{\pi}{2}\int_0^{\pi} \frac{dx}{1+\sin^2{x}}$$

Dividing numerator and denominator by $\cos^2x$

$$I=\frac{\pi}{2}\int_0^{\pi} \frac{\sec^2x}{\sec^2x+\tan^2x}dx$$

$$I=\frac{\pi}{2}\int_0^{\pi} \frac{\sec^2x}{1+2\tan^2x}dx$$ Using Substitution method, let: $$t =\sqrt2\tan x$$ $$\frac{dt}{\sqrt2} =\sec^2xdx$$ The limits also change upon substitution, so the integral I get is: $$I=\frac{\pi}{2\sqrt2}\int_0^{0} \frac{1}{1+t^2}dt$$ But the answer isn't $I(0)-I(0)=0$.

So where did my solution go wrong? I do know that I could have changed the upper limit of the integral to be $\frac{\pi}{2}$, and somehow it all works out. But why doesn't the integral work in the way I did?

Blue
  • 75,673
  • $\int_{0}^{a}f(x)\mathrm{d}x=\int_{0}^{a}f(a-x)\mathrm{d}x$ – wolfqz Feb 02 '24 at 12:03
  • 3
    Regarding the substitution: as $x$ runs from $0$ to $\pi$, your $t$ goes from $0$ to $+\infty$, then jumps to $-\infty$, and goes back to $0$. Thus you get $\int_{-\infty}^\infty$, not $\int_0^0$. In general, you can't blindly apply a substitution to integration bounds (unless the substitution is monotonic). – metamorphy Feb 02 '24 at 13:02
  • @metamorphy, Thank You, it finally makes sense now. – Crustocean 01 Feb 02 '24 at 13:21
  • Another way to prepare your integral for that substitution is to translate to the symmetric interval $\left[-\frac\pi2,\frac\pi2\right]$ by substituting $x\to x+\frac\pi2$, so$$I=\pi \int_0^\tfrac\pi2 \frac{dx}{1+\cos^2x}$$ – user170231 Feb 02 '24 at 19:08
  • Use https://math.stackexchange.com/questions/439851/evaluate-the-integral-int-frac-pi2-0-frac-sin3x-sin3x-cos3x/439856#439856 – lab bhattacharjee Feb 03 '24 at 15:20

4 Answers4

2

It is easy to prove that: $$\int_0^{\pi}{xf\left( \sin x \right)}dx=\pi \int_0^{\frac{\pi}{2}}{f\left( \sin x \right)}dx$$ then $$ \begin{align*} &\int_0^{\pi}{\frac{x}{1+\sin ^2x}}dx \\ &=\pi \int_0^{\frac{\pi}{2}}{\frac{1}{1+\sin ^2x}}dx \\ &=\pi \int_0^{\frac{\pi}{2}}{\frac{1}{2\tan ^2x+1}}d\tan x \\ &=\frac{\pi}{\sqrt{2}}\mathrm{arc}\tan \frac{\tan x}{\sqrt{2}}\mid_{0}^{\frac{\pi}{2}} \\ &=\frac{\pi ^2}{2\sqrt{2}} \end{align*} $$

0

As a hint : divide into two equal integral $$\int_0^{\pi} \frac{x}{1+sin^2{x}}=\int_0^{\frac{\pi}{2}} \frac{x}{1+sin^2{x}}dx +\int_{\frac{\pi}{2}}^{\pi} \frac{x}{1+sin^2{x}}dx\\=2\int_0^{\frac{\pi}{2}} \frac{x}{1+sin^2{x}}dx $$ zero is cause of symmetry in the interval enter image description here

Khosrotash
  • 24,922
  • As I said, I already know about that method, answer should be pi squared by 2*root(2), I just want to know why is it necessary to convert the limit to pi by 2. It appears solvable in the way I approached but I cannot figure out why can't I solve it. – Crustocean 01 Feb 02 '24 at 12:02
  • @Crustocean01: I added a picture that shows why $\int=F(\pi)-F(0)=0-0$ you did not anything wrong ,but the function symmetry on the interval causes zero , if you take twice on $[0,\pi/2]$ then your substitution works – Khosrotash Feb 02 '24 at 12:08
  • Could you please elaborate what symmetry has to do with the integral becoming zero, also shouldn't the function have x in the numerator? – Crustocean 01 Feb 02 '24 at 12:18
  • 1
    @Crustocean01: it is a periodic function with $T=\pi$ so the integral of the function is periodic too, so the $F(\pi)-F(0)=0$ it doesn't about symmetry at all, but symmetry helps you to find it's value. – Khosrotash Feb 02 '24 at 12:27
  • So it becomes mandatory to change limit from [0,pi] to [0,pi/2] in such integrals involving periodicity? I thought these properties of definite integrals were typically used to make complex problems simpler, but here it appears to be the only way to get the required solution. – Crustocean 01 Feb 02 '24 at 12:37
  • The integrals over $[0,\pi/2]$ and $[\pi/2,\pi]$ of the function ${x\over 1+\sin^2x}$ are not equal. The first one is less than the second one. – Ryszard Szwarc Feb 02 '24 at 21:58
0

The mistake made when OP make the substitution:

Let

$$t =\sqrt2\tan x$$ $$\frac{dt}{\sqrt2} =\sec^2xdx$$ The limits also change upon substitution, so the integral I get is: $$I=\frac{\pi}{2\sqrt2}\int_0^{0} \frac{1}{1+t^2}dt$$

where the domain of the substitution $t =\sqrt2\tan x$ should be $[-\frac{\pi}2, \frac{\pi}2]$ is bijective so that its inverse exists. To make the substitution works, we could use the symmetry of sine function on $[0,\pi]$ to reduce the integration interval as: $$\begin{aligned}I&=\frac{\pi}{2}\int_0^{\pi} \frac{\sec^2x}{1+2\tan^2x}dx= \pi\int_0^{\frac \pi2} \frac{\sec^2x}{1+2\tan^2x}dx \\&= \pi \int_0^{\infty} \frac{d t}{1+2 t^2} \quad (\textrm{ via }t=\sqrt 2 \tan x)\\&= \frac{\pi}{\sqrt{2}}\left[\tan ^{-1} \sqrt{2} t\right]_0^{\infty} = \frac{\pi^2}{2 \sqrt{2}} \end{aligned}$$

Lai
  • 20,421
0

An alternative to symmetry is to use method of residues.

Use $\sin(x) = \dfrac{e^{ix} - e^{-ix}}{2i}$ and map a contour defined by $C$, which corresponds to the unit circle (positive). So, define $z = e^{ix},\, dz = iz\cdot dx$. The integral then becomes

$$I = \frac{1}{2} \cdot \frac{\pi}{2}\int_{C}{\frac{1}{1 + \left(\frac{z - 1/z}{2i}\right)^2}}{\cdot\frac{dz}{iz}} =\frac{i\pi}{4}\int_{C}{\frac{4z}{z^4 - 6z^2 + 1}}{dz}$$

Observe that $z^4 - 6z^2 + 1 = (z + \sqrt{2} + 1)(z - \sqrt{2} - 1)(z + \sqrt{2} - 1)(z - \sqrt{2} + 1)$. There are $2$ simple poles inside our semi-circle, $z = \pm(\sqrt{2} - 1)$. Hence,

$$I = 2\pi i \cdot\frac{i\pi}{4} \cdot \sum{Res(f(z), z_k)} \\=\frac{-\pi^2}{2} \left( Res_{z \to \sqrt{2} - 1}(f(z)) + Res_{z \to -\sqrt{2} + 1}(f(z))\right) \\=\frac{-\pi^2}{2} \left(\lim_{z \to \sqrt{2} - 1}{\frac{4z(z - \sqrt{2} + 1)}{z^4 - 6z^2 + 1}} + \lim_{z \to -\sqrt{2} + 1}{\frac{4z(z + \sqrt{2} - 1)}{z^4 - 6z^2 + 1}}\right) \\= \frac{-\pi^2}{2}\left(\frac{-\sqrt{2}}{4} + \frac{-\sqrt{2}}{4}\right) \\ = \frac{\pi^2\sqrt{2}}{4}$$

Dstarred
  • 2,487