When does integration via u-substitution break down, equal limits of integration

bounds-of-integrationdefinite integralsintegration

Edited: changed $\displaystyle\int_{a}^{b}f(g(t))g'(t) \, dt = \int_{g(a)}^{g(b)}f(x) \, dx$ TO $\displaystyle\int_{a}^{b}f(t) \, dt = \int_{f(a)}^{f(b)}u \, \frac{du}{f'(f^{-1}(u))}$

I am wondering about this idea in general, but for concreteness let's say I am attempting to numerically integrate the following:

$$
\int_{-\pi}^{\pi} K\left(\sqrt{1-\frac{1}{4}\left(\sqrt{3}\varepsilon+\cos(x)\right)^2}\right)dx=\int_{-\pi}^{\pi} K\left(\alpha\right)dx
$$

Where $K$ is the elliptic integral of the first kind, $-\sqrt{3}<\varepsilon<\sqrt{3}$ is a parameter and for compactness I've defined $\alpha\equiv \sqrt{1-\frac{1}{4}\left(\sqrt{3}\varepsilon+\cos(x)\right)^2}$.

Let's say I want to make a change in variables before trying to crunch this numerically, for whatever reason. Let's also say I have settled on the substitution $u^3=\alpha-1$.

My question is how do I determine the bounds on the new integral? I know (thought I knew?) that in general I just solve $u^3=\alpha-1$ for $x=\pi$ and $x=-\pi$ to get my new bounds. In this case however, that results in both bounds being the same. No problem, I notice the integrand is symmetric in $x$ so I can do twice the integral from $0$ to $\pi$, which gives me different $u$-bounds. My question then is when are we allowed to apply:
$$
\int_{a}^{b}f(t) \, dt = \int_{f(a)}^{f(b)}u \, \frac{du}{f'(f^{-1}(u))}\quad \text{ with } \ u=f(t) \to dt=\frac{du}{f'(f^{-1}(u))}
$$

if it doesn't work when $u(a)=u(b)$? Furthermore, even going from $0$ to $\pi$ I run into the same problem when $\varepsilon=0$. I could again exploit symmetry to break up the integral, or scrap this idea entirely and try a different substitution, but I am looking for a more general method here or some insight into where this failure comes from. For example, if I let $|\varepsilon|\ll1$ my bounds in $u$ are different, but just barely. I would expect this to fail as well even though the bounds are different. It seems like there must be some need to take into account the shape of $g(t)$, perhaps $g'(t)\geq0$ or $g'(t)\leq0$ for $a<t<b$ or something like that? Any insight is appreciated, thanks in advance!

Best Answer

The change of variables result

$$\tag{*}\int_{a}^{b}f(g(t))g'(t) \, dt = \int_{g(a)}^{g(b)}f(x) \, dx$$

is sometimes proved in texts with the hypotheses that $f$ is continuous on $g([a,b])$ and $g$ has a continuous derivative $g'$ on $[a,b]$ which is never zero. In this case, $g$ is strictly increasing or decreasing and the issue that $g(a) = g(b)$ never arises.

However, the condition that $g'(x) \neq 0$ can be discarded and (*) is still valid. This holds even if $g(a) = g(b)$ where the integral must be zero.

For a proof, note that $t \mapsto f(g(t))g'(t)$ is continuous and we can define

$$F(x) = \int_{g(a)}^x f(t) \, dt,\\G(x) = \int_a^x f(g(t))g'(t) \, dt$$

Thus, $F'(x) = f(x)$, $G'(x) = f(g(x)) g'(x)$ and by the chain rule

$$\frac{d}{dx}F(g(x)) = f(g(x))g'(x) = G'(x)$$

It follows that $F(g(x)) - G(x)$ is a constant. Since $F(g(a)) = G(a) = 0$ the constant is zero and for all $x \in [a,b]$ we have

$$G(x) = \int_a^x f(g(t))g'(t) \, dt = \int_{g(a)}^{g(x)} f(t) \, dt = F(g(x))$$

This is true, in particular for $x = b$ where we recover (*) even if $g(a) = g(b)$.

Also there are even weaker conditions on $f$ and $g$ where this result is true.

Revised question

The question is how does "u-substitution" as a variant of the change-of-variables theorem break down when applied to $\int_a^b f(t) \, dt$ using the formal approach: $ u = f(t), \,\, du = f'(t) \, dt$.

In defining $u = f(t)$ and proceeding with the substitution we require that $f$ is injective (the inverse function $f^{-1}$ exists with range containing [a,b]).

We then can apply the usual formula for the derivative of the inverse function to $t = f^{-1}(u)$ and obtain

$$dt = \frac{d}{du}[f^{-1}(u)] \, du = \frac{1}{f'(f^{-1}(u))} \, du,$$

and

$$\int_a^b f(t) \, dt = \int_{f^{-1}(a)}^{f^{-1}(b)} \frac{u}{f'(f^{-1}(u))} \, du$$

This is is what I believe you intended to write. It is only valid if the derivative in the denominator on the RHS is never zero and

$$f([f^{-1}(a), f^{-1}(b)]) = [a,b].$$

Related Question