u-substitution of indefinite integrals without algebraically manipulating differentials

Take for example $$\int 2x \cos(x^2)dx$$ Its easy to see that this is the result of chain rule. If we give ourself the liberty to treat differentials as algebraic objects then we can take $$u=x^2$$ and then $$dx = du/2x$$ and then we get $$\int \cos(u)du$$ it is simple from there.

But this method requires algebraically manipulating the differentials, which I am aware is rigorously proven in nonstandard analysis, but how else would we arrive to this simpler form? That is when we are treating $$dx$$ just as notation.

My main confusion is how to justify the change of variable of integration when we are not just substituting something in place of $$dx$$

• Just invoke the fact that if $F$ is an antiderivative of $f$ then $F(g(x))$ is an antiderivative of $f(g(x)) g’(x)$. Commented May 2 at 8:28

There really are no differentials involved here! I will use a slightly non standard notation: If $$f:[a,b]\to\mathbb{R}$$ is integrable i simply write $$\int_a^b f$$ for the Riemann integral of $$f$$ over $$[a,b]$$ instead of the more usual "$$\int_a^b f(x) dx$$". In what follows there will be not a single differential.

The chain rule (for the Riemann integral) says (i.e. here):

Theorem: Let $$a,b,c,d \in \mathbb{R}$$ with $$a, $$g: [a,b] \to [c,d]$$ be continuously differentiable (with onesided derivative at the end points) and $$f : [c,d] \to \mathbb{R}$$ continuous.

Then $$\int_a^b g^\prime \cdot (f \circ g) = \int_{g(a)}^{g(b)}f,$$ where $$g^\prime$$ is the derivative of $$g$$.

Example: Say we want to calculate the following integral $$I$$ defined by: $$I:= \int_0^{\sqrt{\pi/2}} x \mapsto 2x \cos (x^2).$$

Define $$g:[0,\sqrt{\pi/2}]\to [0,\pi/2]$$ by $$g(x) := x^2$$. Then $$g$$ is continuously differentiable with derivative $$g^\prime :[0,\sqrt{\pi/2}]\to \mathbb{R}$$ given by $$g^\prime(x) = 2 x$$. Now define $$f: [0, \pi/2]\to \mathbb{R}$$ by $$f(y) := \cos(y)$$. Clearly $$f$$ is continuous.

By definition $$I = \int_0^{\sqrt{\pi/2}} g^\prime \cdot f \circ g$$ and so using the above theorem and the well known anti-derivative of $$y \mapsto \cos(y)$$: $$I = \int_{g(0)}^{g(\sqrt{\pi/2})}f = \int_{0}^{\pi /2} f = \int_{0}^{\pi /2} y \mapsto \cos (y) = \sin (\pi/2) - \sin (0) = \sin (\pi/2) =1.$$

Formally, $$u$$-substitution is just an integral equivalent of the chain rule: \begin{align*} \int f(g(x))g'(x) \, \mathrm{d}x &= \int f(u) \, \mathrm{d}u \\ \int_a^b f(g(x))g'(x) \, \mathrm{d}x &= \int_{g(a)}^{g(b)} f(u) \, \mathrm{d}u \end{align*} provided

• $$f : [c,d] \to \mathbb{R}$$ is continuous
• $$g : [a,b] \to [c,d]$$ is differentiable
• $$g'$$ is Riemann integrable on $$[a,b]$$

(One can loosen this some, especially in the context of Lebesgue integration, e.g. to $$f \in L^1[c,d]$$ and $$g$$ absolutely continuous on $$[a,b]$$ and strictly increasing being one in my notes, but this is not the main focus here.)

This is a result you can prove, and is typical in analysis classes (where one gets keener on the mild abuse of convention in the indefinite case), but is essentially just application of the chain rule. (Further discussion on these matters here.) The technique of substitution essentially leverages replacing $$g(x)$$ and $$u$$.

You already have answers formally justifying the integration. But I want to point out that you don't need nonstandard analysis (or anything beyond calculus) to justify manipulating first-order differentials like $$\mathrm d x$$ and $$\mathrm d u$$. (Higher-order differentials like $$\mathrm d ^ 2 x$$ or $$\mathrm d x \, \mathrm d y$$ are a little trickier, but still standard.)

Formally, all that is necessary is that every variable quantity is a differentiable function of a single independent variable, which in this case could be $$x$$ (since $$u = x ^ 2$$); but you don't need to specify this, so I'll generically write the independent variable as $$q$$. So $$x = \chi ( q )$$, and $$u = \upsilon ( q )$$, where $$\chi$$ and $$\upsilon$$ are differentiable functions, but we don't care which functions. (If $$q$$ is $$x$$, then they're $$\chi ( q ) = q$$ and $$\upsilon ( q ) = q ^ 2$$, but the details don't matter.) Then $$\mathrm d x$$ and $$\mathrm d u$$ can be formally defined as the derivatives of these functions.

Now because $$u = x ^ 2$$, we have $$\mathrm d u = 2 x \, \mathrm d x$$, which can be formally calculated as $$\mathrm d u = \upsilon ' ( q ) = ( \chi ^ 2 ) ' ( q ) = 2 \chi ( q ) \chi ' ( q ) = 2 x \, \mathrm d x \text ,$$ which is true no matter what the functions $$\chi$$ and $$\upsilon$$ are (as long as they're differentiable and $$\upsilon = \chi ^ 2$$). But you really don't want to think about $$\chi$$ and $$\upsilon$$ (much less $$q$$) when doing the calculation; you just know that the differentials are secretly derivatives and so all of the rules for differentiation apply to them.

So knowing that these functions are there behind the scenes, you can manipulate differentials in confidence that your calculations are valid. This works for integration by substitution, implicit differentiation, solving first-order differential equations, etc.