9

Let $t=1+\sin x$ in the following integral, then we encounter something weird!!

Note: $t(x)=1+\sin x$, so $t(0)=1+\sin0=1+0=1$ and $t(\pi)=1+\sin\pi=1+0=1$

$$2=\int_0^{\pi}\frac{{\rm d}x}{1+\sin x}=\int_{1}^{1}(*){\rm d}t=0??$$ It was actually asked to me by one of my friend(s).

enter image description here

RE60K
  • 17,716

2 Answers2

8

You have omitted a very important part of the change of variables. What happens to $dx$? In particular, you know that $dt = \cos x dx$, but you have no $\cos x$ term in your integrand. Trying to incorporate it is a bit challenging, and your problem lies within this.

Extremely important is that the relationship between $dt$ and $\cos x dx$ changes halfway through the integral, and the two halves do not cancel.

In particular, $\cos x=\pm\sqrt{1-\sin^2x}=\pm\sqrt{1-(t-1)^2}=\pm\sqrt{2t-t^2}$. You change which branch of the square root you use halfway through the integral. You cannot substitute both $\pm$ at the same time. For part of the integral, you do one, for the rest, you do the other, choosing the signs that make sense. This is why you must split on $x = \pi/2$. This sign change makes it so the two halves add instead of canceling. You are acting as if there is no sign change and they cancel.

  • $\cos x=\pm\sqrt{1-\sin^2x}=\pm\sqrt{1-(t-1)^2}=\pm\sqrt{2t-t^2}$ – RE60K Jan 02 '15 at 10:23
  • And you change which branch of the square root you use halfway through the integral. You cannot substitute both $\pm$ at the same time. For part of the integral, you do one, for the rest, you do the other, choosing the signs that make sense. This is why you must split on $x = \pi/2$. This sign change makes it so the two halves add instead of canceling. You are acting as if there is no sign change and they cancel. – davidlowryduda Jan 02 '15 at 10:26
  • thanks please add this useful comment to yoru answer! – RE60K Jan 02 '15 at 10:26
2

Hint. The function $\displaystyle x \mapsto 1+\sin x$ is not a one-to-one correspondence, since its derivative $\displaystyle x \mapsto \cos x$ changes its sign on $[0,\pi]$, you have $\cos x\geq0$ on $[0,\pi/2]$ and $\cos x\leq0$ on $[\pi/2,\pi]$.

Your change of variable, as written, is not a valide one, it is better to separate the initial interval into $[0,\pi/2]$ and $[\pi/2,\pi]$.

Olivier Oloa
  • 120,989