# $u$-substitution always evaluates to $0$

Consider the integral

$$\int_a^b f(x) \,dx$$

now make the $u$-substitution $u \mapsto c + (x-a)(x-b)$. The resulting integral is

$$\int_c^c h(u) \,du$$

where $h(u)$ is the integrand $f$ after the substitution, however, regardless of $f$ the integral $\int_c^c du = 0$. Looking at the definition Wikipedia provides I believe the substitution meets every condition. It's differentiable and has a integrable derivative, because it's a polynomial. So what's wrong with this substitution such that it always results in $0$?

• It needs to be bijective – Brevan Ellefsen Jun 16 '17 at 16:10
• @BrevanEllefsen : I think the OP want to use the formula $\int_{\phi(a)}^{\phi(b)}f(t)\,dt=\int_a^bf(\phi(t))\phi'(t)\,dt$, which is right even if $\phi$ is only $\mathcal{C}^1$ ? – Balloon Jun 16 '17 at 16:14
• @Baloown Yes, that seems correct, as long as $\phi$ is integrable. The reason for the issue here is clearly the lack of a bijection, which you explain well in your answer :) – Brevan Ellefsen Jun 16 '17 at 16:17

The formula of change of variables is, for $\phi\in\mathcal{C}^1$, $$\int_{\phi(a)}^{\phi(b)}f(t)\,dt=\int_a^bf(\phi(t))\phi'(t)\,dt,$$ so to get what you write, you should have that $f$ is written as a function of the form $$\tilde{f}\circ \text{“your function''}\times\text{“the derivative of your function''},$$ or to inverse "your function", which is of course not possible since it is not bijective.

EDIT : More precisely, if you want to change both the integrand and the boundaries, you have to find $\tilde{a}\in\phi^{-1}(a)$ and $\tilde{b}\in\phi^{-1}(b)$ to finally write $$\int_a^bf(t)\,dt=\int_\tilde{a}^\tilde{b}f(\phi(t))\phi'(t)\,dt,$$ and if $a\neq b$ then $\tilde{a}\neq\tilde{b}$ (else $a=\phi(\tilde{a})=\phi(\tilde{b})=b$), and you can't conclude a priori that the right integral is $0$ using the same boundaries argument.

• what needs to be bijective? certainly not $\phi(x)$, because to solve $\int x \cos(x^2 + 1) \,dx$, we would use $\phi(x) = x^2 +1$ as a substitution which is not bijective. – Dando18 Jun 16 '17 at 16:17
• @Dando18 within certain intervals it is bijective. There are a lot of potential caveats here in that anti-derivatives can actually vary on different intervals where substitutions work differently – Brevan Ellefsen Jun 16 '17 at 16:18
• is $c+(x-a)(x-b)$ not bijective on certain intervals? – Dando18 Jun 16 '17 at 16:19
• @Dando18: I think that you are trying to use the formula $$\int_a^bf(t)\,dt=\int_{\phi^{-1}(a)}^{\phi^{-1}(b)}f(\phi(t))\phi'(t)\,dt,$$ which allows you to change both integrand and boundaries, but as you see explicitely in the formula in this case you have to consider a $\phi$ which is invertible. – Balloon Jun 16 '17 at 16:20
• @Dando18 What is required is that the substitution be bijective on the interval you are integrating on. Your work above shows that your function isn't bijective, so we are done. Well, sorta. There are very specific cases where we can do this when our function is not bijective, but those are extremely tricky and nuanced and best handled in my opinion by splitting the domain into bijective sections – Brevan Ellefsen Jun 16 '17 at 16:21

The formula $$\int_{g(a)}^{g(b)} f(x) \, dx=\int_{a} ^{b} f(g(t)) g'(t) \, dt$$ holds without $g$ being bijective. But as you can see the substitution has to be of the form $x=g(t)$ and you are trying to make a substitution using $t=h(x)$ and this would require that $h$ is invertible to put it in the form $x=h^{-1}(t)$ so that the above Rule for change of variables applies. Your substitution does not have this property and hence the conclusion obtained is wrong.

It is better to understand the theorems completely before applying them. And more often than not most people remember only the conclusions of the theorems rather than their hypotheses. By habit one should avoid this and understand how the hypotheses lead to conclusions and what happens when one of the hypotheses is not satisfied.

• Fantastic observation. – Brevan Ellefsen Jun 17 '17 at 4:55
• @BrevanEllefsen : I have seen many such questions here and most answers deal with bijective nature of substitution which is not really necessary (at least not in the way the change of variables is stated as a theorem). People don't often use the theorem as stated. – Paramanand Singh Jun 17 '17 at 5:15

Assume $a<b$.

If $u=c+(x-a)(x-b)$. Then

\begin{align} u&=x^2-(a+b)x+ab+c\\ &=\left(x-\frac{a+b}{2}\right)^2+ab-\left(\frac{a+b}{2}\right)^2+c\\ &=\left(x-\frac{a+b}{2}\right)^2-\left(\frac{a-b}{2}\right)^2+c\\ x&=\frac{a+b}{2}\pm\sqrt{\left(\frac{a-b}{2}\right)^2-c-u} \end{align}

When $\displaystyle x<\frac{a+b}{2}$, $\displaystyle x=\frac{a+b}{2}-\sqrt{\left(\frac{a-b}{2}\right)^2-c-u}$ and

$$\frac{du}{dx}=2x-(a+b)=-\sqrt{(a-b)^2-4c-4u}$$

When $\displaystyle x\ge\frac{a+b}{2}$, $\displaystyle x=\frac{a+b}{2}+\sqrt{\left(\frac{a-b}{2}\right)^2-c-u}$ and

$$\frac{du}{dx}=2x-(a+b)=\sqrt{(a-b)^2-4c-4u}$$

When $\displaystyle x=\frac{a+b}{2}$, $\displaystyle u=c-\left(\frac{a-b}{2}\right)^2$

Therefore,

\begin{align} \int_a^bf(x)dx&=\int_a^{\frac{a+b}{2}}f(x)dx+\int_{\frac{a+b}{2}}^bf(x)dx\\ &=\int_0^{c-\left(\frac{a-b}{2}\right)^2}\left[\frac{f\left(\frac{a+b}{2}-\sqrt{\left(\frac{a-b}{2}\right)^2-c-u}\right)}{-\sqrt{(a-b)^2-4c-4u}}\right]du\\ &\qquad +\int_{c-\left(\frac{a-b}{2}\right)^2}^0\left[\frac{f\left(\frac{a+b}{2}+\sqrt{\left(\frac{a-b}{2}\right)^2-c-u}\right)}{\sqrt{(a-b)^2-4c-4u}}\right]du \end{align}

It looks quite complicated. But my point is that the definite integral should be broken into two parts with different integrands.

\begin{align} u & = c + (x-a)(x-b) \\[10pt] &= c + \left( x - \frac{a+b} 2 \right)^2 + \left( \frac{a-b} 2 \right)^2 & & \text{(completing the square)} \\[12pt] & \text{When } x = a \text{ or } x=b \text{ then } u = c. \\ & \text{When } x = \frac{a+b}2 \text{ then } u = c+ \left( \frac{a+b} 2 \right)^2. \end{align} $$\int_a^b f(x)\,dx = \int_a^{(a+b)/2} f(x) \,dx + \int_{(a+b)/2}^c f(x)\, dx\quad\longleftarrow \text{two terms}$$ $$du = 2\left( x - \frac{a+b} 2 \right) \, dx = \Big( \text{some function of } u \Big)\, dx$$ This "some function" is one thing in one of the "two terms" above and is another thing in the other one of the "two terms" above. The reason is that when you find $x-\dfrac{a+b}2$ as a function of $u,$ you get the usual “plus-or-minus” $(\text{“}\pm\text{''})$ issue that you see when solving quadratic equations. In the first of the "two terms" above, you need the solution with the minus sign, and in the second the one with the plus sign.

Your error is thinking that "the integrand $f$ after substitution" is well defined. (actually, the integrand is $f(x) \mathrm{d} x$, but that distinction is not relevant to the topic)

It is indeed true that if $f$ is a function with the property that there exists a function $h$ such that

$$f(x) \mathrm{d} x = h(u) \mathrm{d}u$$

(where $u$ and $x$ are related by $u = c + (x-a)(x-b)$), then you do have

$$\int_a^b f(x) \mathrm{d}x = \int_c^c h(u) \mathrm{d}u = 0$$

However, you are not guaranteed such an $h$ exists. Instead, the generally $2$ to $1$ nature of the relationship between $x$ and $u$ means that on any path where $x$ varies from $a$ to $b$, you will get one function $h_0$ on part of the path and another function $h_1$ on the rest of the path. Then, the best you can say is that

$$\int_a^b f(x) \, \mathrm{d}x = \int_c^d h_0(u) \mathrm{d}u + \int_d^c h_1(u) \mathrm{d}u$$

• interesting, would it not be possible to express $h(u)$ in one function using special functions or $\mathrm{sgn}(u)$? Or would that affect our ability to integrate $h(u)$? – Dando18 Jun 17 '17 at 13:12