Why do we need an invertible function to use $u$-substitution?

797 Views Asked by At

I found many proofs online for

$$\int_{w(a)}^{w(b)}f(x)dx=\int_a^bf(w(t))w’(t)dt.$$

But the fact that $w$ is invertible is neither used, nor mentioned in the hypotheses (example: ProofWiki).

So, my question: is this a required condition? Does this depend on the number of variables?

EDIT (for GEdgar):

What if I want to evaluate $$\int_{sin(-\pi)}^{sin(\pi)} f(x) dx$$ Would the substitution $$x = sin(t)$$ be mathematically correct?

4

There are 4 best solutions below

3
On BEST ANSWER

$\newcommand{d}{\,\mathrm d}$In your edit, I think you are asking if

$$ \int_{\sin(-\pi)}^{\sin(\pi)} f(x) \d x = \int_{-\pi}^{\pi} f(\sin(t)) \cos(t) \d t. $$

The integral on the left evaluates as $$ \int_{0}^{0} f(x) \d x = 0. $$

For the integral on the right, notice that $\sin(\pi - t) = \sin(t)$ while $\cos(\pi - t) = -\cos(t)$, so $f(\sin(\pi - t)) \cos(\pi - t) = -f(\sin(t)) \cos(t).$ We can use this to show that $$ \int_{0}^{\pi/2} f(\sin(t)) \cos(t) \d t = -\int_{\pi/2}^{\pi} f(\sin(t)) \cos(t) \d t $$ and that $$ \int_{-\pi/2}^{0} f(\sin(t)) \cos(t) \d t = -\int_{-\pi}^{-\pi/2} f(\sin(t)) \cos(t) \d t $$ So by writing $\int_{-\pi}^{\pi} f(\sin(t)) \cos(t) \d t$ as the sum of four integrals over the intervals $[-\pi,-\pi/2]$, $[-\pi/2,0]$, $[0,\pi/2]$, and $[\pi/2,\pi]$, it comes out to zero.


In the general case, regarding the original question, no, the function $w$ does not need to be invertible. We know this because the proof is completed without relying upon any assumption that $w$ is invertible.

Adapting the definite-integral part of the ProofWiki theorem to your choices of names of variables and functions,

Let $w$ be a real function which has a derivative on the closed interval $[a,b]$.

Let $I$ be an open interval which contains the image of $[a,b]$ under $w$.

Let $f$ be a real function which is continuous on $I.$

$$ \int_{w(a)}^{w(b)} f (x) \d x = \int_a^b f(w(t)) w'(t) \d t.$$

If the function $w$ on $[a,b]$ is not invertible then you can find $a'$ and $b'$ in $[a,b]$ such that such that $w(a')=w(b'),$ and the theorem holds when we substitute $a'$ and $b'$ for $a$ and $b.$ Hence we show that the integral of $f(w(t))w'(t)$ over the interval $[a',b']$ is zero.

What can happen if $w$ is not invertible is that while integrating the right-hand side of the equation from $a$ to $b,$ it happens that $w(t)$ -- which corresponds to $x$ on the left-hand side -- revisits one or more of the values it has already taken. This is not a problem, because the integral between those visits is zero. If you really want, you can replace a non-invertible function $w$ with another function by cutting $w$ into pieces, discarding the "repeating" pieces and translating the remaining pieces so that they define an invertible function over a suitable (smaller) interval. But you don't have to.


Where you can go wrong with this if you are not careful is that typically you start with the left-hand side of the equation and you want to transform it into the right-hand side. You actually have some given interval of integration $[A,B]$ on the left and you need a function $w$ on some interval $[a,b]$ such that $w(a) = A$ and $w(b) = B,$ along with the other properties specified in the theorem. It's easy to get tripped up by the part where $w(a) = A$ and $w(b) = B,$ especially since we very often define $w$ implicitly rather than explicitly.

For example (stealing the example shamelessly from another answer with a few changes in names of variables and functions), if you try to integrate $\int_{-\pi}^{\pi} g(\sin x) \d x$ using the substitution $t = \sin x$, you're actually relying on the existence of a function $w$ and an interval $[a,b]$ on which that function is differentiable such that $w(a) = -\pi$ and $w(b) = \pi$ and such that you can write $x = w(t) = w(\sin x)$.

The problem here -- which does relate to invertibility, though not in exactly the way you asked -- is that the desired function $w$ simply does not exist. An obvious candidate is $w(t) = \arcsin(t),$ but that neither allows to write $w(a) = -\pi$ nor $w(b) = \pi.$ Another candidate is $w(t) = \pi - \arcsin(t),$ since $\sin(\pi - \arcsin(t)) = \sin(\arcsin(t)) = t,$ and this allows you to write $w(b) = \pi$ but not $w(a) = -\pi.$ Yet another candidate, $w(t) = -\pi - \arcsin(t),$ allows you to write $w(a) = -\pi$ but not $w(b) = \pi.$

Where invertibility comes into this is that in order to have a function $w$ that satisfies the conditions in the theorem, essentially you are looking for an inverse of the sine function (to find $x$ such that $t = \sin x$), there is (of course) no inverse function that can map the range of the sine back to its entire domain, and there is no differentiable function that can map the range back to pieces of the domain of the sine including both $-\pi$ and $\pi.$

If you rewrite the integral as a sum of integrals over the intervals $[-\pi,-\pi/2]$, $[-\pi/2,\pi/2]$, and $[\pi/2,\pi]$, then you can use a different $w$ on each interval and apply the theorem correctly.

2
On

Beginning students (and symbolic algebra packages) have to beware.
Maple says if I take $$ \int_{-\pi}^{\pi} f(\sin \theta) \;d\theta \tag{1}$$ and change variables $s = \sin\theta$, I get $$ \int_0^0\frac{f(s)\;ds}{\sqrt{1-s^2}\;} = 0 \tag{2}$$ Of course $(1)$ can easily be nonzero.


Technically: Although Maple may think $\cos \theta = \sqrt{1-\sin^2\theta\;}$, in fact that is true on only part of the interval $[-\pi,\pi]$. On other parts of the interval, $\cos \theta = -\sqrt{1-\sin^2\theta\;}$

1
On

Invertibility is unnecessary. To quote the theorem statement in your link:

Let $\phi$ be a real function which has a derivative on the closed interval $[a,\,b]$. Let $I$ be an open interval which contains the image of $[a,\,b]$ under $\phi$. Let $f$ be a real function which is continuous on $I$. Then:$$\int_{\phi \left({a}\right)}^{\phi\left({b}\right)} f \left({t}\right) \ \mathrm d t = \int_a^b f\left({\phi \left({u}\right)}\right) \phi^\prime\left({u}\right) \mathrm d u.$$

$\phi$ being invertible is an important special case. If $\phi$ meets the above conditions but isn't invertible, we effectively have to add $\phi^\prime$ values. In this example, the values of $u$ consistent with a given value of $\phi(u)$ sum to $\phi+c$ for $c$ constant (proof is an exercise; note the symbols $\phi,\,u$ are changed respectively in that link to $u,\,x$). Thus the branches of $\phi^\prime$ sum to an invisible factor of $1$.

Now let's consider the example you asked about. The image of $[-\pi,\,\pi]$ under $\sin u$ is $[-1,\,1]$, so$$\int_{\sin(-\pi)}^{\sin\pi}f(t)dt=\int_{-\pi}^\pi f(\sin u)\cos udu$$if $f$ is continuous on an open interval $\supset[-1,\,1]$. In fact, both sides are $0$ for such $f$, since the left-hand side's limits are both $0$. By contrast, in @GEdgar's example something subtle happens. Let's write$$\int_{-\pi}^\pi f(\sin\theta)d\theta=\int_{-\pi}^{-\pi/2} f(\sin\theta)d\theta+\int_{-\pi/2}^{0} f(\sin\theta)d\theta+\int_0^{\pi/2} f(\sin\theta)d\theta+\int_{\pi/2}^\pi f(\sin\theta)d\theta.$$I split it into four pieces not because I wanted invertibility, but because expressing $\sin^\prime\theta=\cos\theta$ as a function of $\sin\theta$ gives a $\theta$-dependent $\pm$ sign in $\cos\theta=\pm\frac{1}{\sqrt{1-\sin^2\theta}}$. To wit,$$\begin{align}\int_{-\pi}^\pi f(\sin\theta)d\theta&=\int_0^{-1}\frac{-f(x)dx}{\sqrt{1-x^2}}+\int_{-1}^0\frac{f(x)dx}{\sqrt{1-x^2}}+\int_0^1\frac{f(x)dx}{\sqrt{1-x^2}}+\int_1^0\frac{-f(x)dx}{\sqrt{1-x^2}}\\&=2\int_{-1}^0\frac{f(x)dx}{\sqrt{1-x^2}}+2\int_0^1\frac{f(x)dx}{\sqrt{1-x^2}}\\&=2\int_{-1}^1\frac{f(x)dx}{\sqrt{1-x^2}}.\end{align}$$

2
On

Given the integral $$\int_{x=a}^{b}f(x)\mathrm dx,$$ you want to change its parameters by using the substitution $$x=u(t).$$

So you need to find out the corresponding limits for $x=a$ and $x=b.$ This requires you to solve, say, $$a=u(t)$$ for $t.$ You can then see that no such unique value of $t$ exists if there is no inverse function $x\mapsto t.$

This is one of the obvious reasons that $t\mapsto x$ must be invertible.