# Why is it not true that ∫π0sin(x)dx=0\int_0^{\pi} \sin(x)\; dx = 0?

I know the following is not right, but what is the problem. So we want to calculate
$$∫π0sin(x)dx \int_0^{\pi} \sin(x) \; dx$$
If one does a substitution $$u=sin(x)u = \sin(x)$$, then one gets
$$∫sin(π)=0sin(0)=0somethingdu=0. \int_{\sin(0) = 0}^{\sin(\pi) = 0} \text{something}\; du = 0.$$
We know that $$∫aaf(x)dx=0\int_a^a f(x) \; dx = 0$$ for all functions $$xx$$, so why doesn’t this work for the above?

I get that the “something” “can’t be found” because $$du=cos(x)dxdu = \cos(x)\,dx$$. But does it really matter what the $$dudu$$ is when one is integrating from $$00$$ to $$00$$?

Edit: I don’t know what a “diffeomorphism” is. I am just in basic calculus.

This is a very good question and not one that many students ask. Let’s see what happens when we do as you are suggesting. Letting $$u=sinxu = \sin x$$, we get

$$du=cosxdx=±√1−sin2xdx=±√1−u2dx.du = \cos x\,dx = \pm\sqrt{1-\sin^2 x}\,dx = \pm\sqrt{1-u^2}\,dx.$$

Thus the integral becomes

$$∫sinxdx=∫±u√1−u2du.\int \sin x\,dx = \int \frac{\pm u}{\sqrt{1-u^2}}\,du.$$

Notice I did not put any limits of integration in here. When $$x∈[0,π2]x\in[0,\frac{\pi}{2}]$$, cosine is non-negative, so we can use the positive root. However when $$x∈(π2,π]x\in(\frac{\pi}{2},\pi]$$, cosine is negative so we have to use the negative root. Meaning our one integral splits into two different integrals:

$$∫π0sinxdx=∫u(π/2)u(0)u√1−u2du+∫u(π)u(π/2)−u√1−u2du.\int_0^{\pi} \sin x\,dx = \int_{u(0)}^{u(\pi/2)} \frac{u}{\sqrt{1-u^2}}\,du + \int_{u(\pi/2)}^{u(\pi)} \frac{-u}{\sqrt{1-u^2}}\,du.$$

Note that $$u(0)=0u(0) = 0$$, $$u(π/2)=1u(\pi/2) = 1$$ and $$u(π)=0u(\pi) = 0$$ so we get

$$∫π0sinxdx=∫10u√1−u2du−∫01u√1−u2du=2∫10u√1−u2du.\int_0^{\pi} \sin x\,dx = \int_0^1 \frac{u}{\sqrt{1-u^2}}\,du - \int_1^0 \frac{u}{\sqrt{1-u^2}}\, du = 2\int_0^1 \frac{u}{\sqrt{1-u^2}}\,du.$$

Note that this is a positive number. The reason for why it doesn’t work out is exactly as Baloown is suggesting. What you suggest does not apply here and is partially reflected in the occurrence of the $$±\pm$$ roots. What the actual case is that the forward direction for $$uu$$-substitution always works (meaning substituting $$x= somethingx = \text{ something}$$) – it is the backwards case is where the issues lie (substituting $$something =f(x)\text{something } = f(x)$$).