$u$-substitution always evaluates to $0$

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.


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.


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.