I know the following is not right, but what is the problem. So we want to calculate

∫π0sin(x)dx

If one does a substitution u=sin(x), then one gets

∫sin(π)=0sin(0)=0somethingdu=0.

We know that ∫aaf(x)dx=0 for all functions x, so why doesn’t this work for the above?I get that the “something” “can’t be found” because du=cos(x)dx. But does it really matter what the du is when one is integrating from 0 to 0?

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

**Answer**

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=sinx, we get

du=cosxdx=±√1−sin2xdx=±√1−u2dx.

Thus the integral becomes

∫sinxdx=∫±u√1−u2du.

Notice I did not put any limits of integration in here. When x∈[0,π2], cosine is non-negative, so we can use the positive root. However when x∈(π2,π], 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.

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

∫π0sinxdx=∫10u√1−u2du−∫01u√1−u2du=2∫10u√1−u2du.

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 ± roots. What the actual case is that the *forward* direction for u-substitution always works (meaning substituting x= something) – it is the backwards case is where the issues lie (substituting something =f(x)).

**Attribution***Source : Link , Question Author : John Doe , Answer Author : Cameron Williams*