# When a change of variable results in equal limits of integration

Okay, here is something that's been bugging me for a while. Say we want to find $I = \displaystyle\int\nolimits_{a}^{b}f(g(t))g'(t)\,\mathrm dt$. If we substitute $x = g(t)$, then $I = \displaystyle\int_{g(a)}^{g(b)}f(x)\,\mathrm dx$. But what do we do in the case where $g(a) = g(b)$? How do we interpret that? For example, if $x = \sin{t}$, $a = 0$, and $b = \pi$, then $g(a) = \sin(0) = \sin(\pi) = g(b)$. It would appear that the integral would be zero, but I find it isn't.

EDIT/Added: I now realised the form I've given was very limiting. I should say my intention was to ask, as in the title, what to do when a given substitution makes both limits the the same.

-
If $g(t)=\sin\;t$, then your integral is antisymmetric about $t=\pi/2$, so... – J. M. May 6 '11 at 17:12
anti-symmetric, my friend. antisymmetric. – J. M. May 6 '11 at 17:24
"what to do when a given substitution makes both limits the the same." - you'd then want to check if your integrand is antisymmetric about the midpoint of the interval you're integrating on. – J. M. May 6 '11 at 17:52
On the nose, except the integral in the symmetric case should be over the interval $[g(a),m]$. :) – J. M. May 6 '11 at 18:30
Alright, give me a few; what I've written isn't elaborate enough as a full answer... – J. M. May 6 '11 at 18:40

Usually, when you find that some substitution you've done has made the lower and upper limits identical, it's always a good idea to check if your integrand is symmetric or antisymmetric about the midpoint of the integration interval. For the specific case of

$$\int_0^\pi f(\sin(t))\cos(t)\,\mathrm dt$$

instead of doing the substitution $u=\sin\,t$ which sets both limits of integration identical, you might instead try the simpler substitution $t=v+\frac{\pi}{2}$, which turns your integral into

$$\int_{0-\frac{\pi}{2}}^{\pi-\frac{\pi}{2}} f\left(\sin\left(v+\frac{\pi}{2}\right)\right)\cos\left(v+\frac{\pi}{2}\right)\,\mathrm dv$$

or

$$-\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} f\left(\cos\,v\right)\sin\,v\,\mathrm dv$$

Now, noting that $f\left(\cos\,v\right)\sin\,v$ is odd ($f\left(\cos(-v)\right)\sin(-v)=-f\left(\cos v\right)\sin v$), the integral can be split like so

$$-\left(\int_{-\frac{\pi}{2}}^0 f\left(\cos\,v\right)\sin\,v\,\mathrm dv+\int_0^{\frac{\pi}{2}} f\left(\cos\,v\right)\sin\,v\,\mathrm dv\right)$$

and then we can do the following:

$$-\left(\int_{\frac{\pi}{2}}^0 f\left(\cos(-v)\right)(-\sin(-v))\,\mathrm dv+\int_0^{\frac{\pi}{2}} f\left(\cos\,v\right)\sin\,v\,\mathrm dv\right)$$

$$-\left(-\int_0^{\frac{\pi}{2}} f\left(\cos\,v\right)\sin\,v\,\mathrm dv+\int_0^{\frac{\pi}{2}} f\left(\cos\,v\right)\sin\,v\,\mathrm dv\right)$$

and you can now see that the integral is supposed to be zero, which is consistent with the result from the substitution that made both integration limits the same.

-

You haven't said what $f$ is. Once you fill in all the parts of the first integral $\int_a^b f(g(t))g'(t)dt$, you can check that the change of variable formula is true - for example, $$\int_0^\pi \sin(t)\cos(t)dt=0=\int_0^0 xdx$$

-
Chronoles, take, for example, $\int_{0}^{\pi}\cos^2{x}\sin{x}\;{dx}$ – Lyrebird May 6 '11 at 17:25
That's not of the form $f(g(t))g^\prime(t)$... anyway, your example is symmetric about $x=\pi/2$. – J. M. May 6 '11 at 17:30
@Student: You should keep your $x$'s and $t$'s separate. I assume you mean to ask about the case of $f(x)=x^2$, $g(t)=-\cos(t)$ (so that $g'(t)=\sin(t)$). But in this case, $g(\pi)=1\neq -1=g(0)$, so we would not expect the integral to equal 0. – Zev Chonoles May 6 '11 at 17:33
Oh, dear! Apologies for sloppiness. I was having problem with in general when a given substitution makes the limits the same, but I didn't realise that the form I've given was so limiting. – Lyrebird May 6 '11 at 17:40