Is integrating $f(x)= x\exp(-x^2/2)$ with substitution $u = x^2$ well defined?

I have the following question, which is:

I know how to integrate $f(x) = x\exp(-x^2)$ using the standard method of subsitution, however I was wondering if this method is well defined, and if so why exactly. The reason I ask this, is because a coordinate transformation must be a bijective and continuously partially differentiable mapping, from say an set U to another open set V. Now formally $u\colon \mathbb{R} \to \mathbb{R}$, $u(x) = x^2$ is not a coordinate transfer, so I ask: why would the substitution $u(x) = x^2$ be a well defined one?

Is it because we do not use definite integrals?

• The properties only need to be defined locally (since differentiation only cares about the local structure). For example, if you wanted the definite integral $\int_a^b xe^{-x^2/2}dx$ and used the $u$-substitution $u=x^2$, then you could break the integral at $0$ to get $\int_a^0 xe^{-x^2/2}dx+\int_0^b xe^{-x^2/2}dx$ and the transformation is bijective (onto its image) on each piece. – Michael Burr Nov 12 '16 at 14:53
• Good question about the definite integrals – Simply Beautiful Art Nov 12 '16 at 14:55

No, it is not well defined. But actually, you don't use this substitution: rather, you just use the chain rule.

Since $f(x)=-\frac{1}{2}\exp(g(x))g'(x)$, where $g(x)=-x^2$, an antiderivative of $f$ is just $-\frac{1}{2}\exp(g(x))=-\frac{1}{2}e^{-x^2}$.

The “substitution” here is just recognizing the possibility to apply the chain rule.

• Greg, the so-called "u-substitution" is often misunderstood by students. So, +1 for your posting this answer. -Mark – Mark Viola Nov 12 '16 at 15:20

To have

$$\int_a^b f(x)dx=\int_c^d f(g(t))g'(t)dt$$

you need :

• $f$ continuous at $[a,b]$

• $g$ differentiable and $g'$ continuous at $[c,d]$

• $g(c)=a\; \; , \;g(d)=b$

and

• $g([c,d]) \subset [a,b]$

$g$ is not necesserly bijective.

• The conditions states as necessary are overly restrictive. For example, it is sufficient that $g'$ be integrable, but not necessarily continuous. – Mark Viola Nov 12 '16 at 15:25

Substitutions, at least in the context of integration, needn't be bijective nor continuous. Consider the following theorem, and note the hypotheses.

Theorem: Let $I$ be a connected subset of $\mathbb{R}$ and $g:[a,b] \to \mathbb{R}$ a differentiable function with a Riemann integrable derivative. Let $f:I \to \mathbb{R}$ be continuous. Then

$$\int_a^b (f \circ g)g' = \int_{g(a)}^{g(b)} f \ \ \ \ \ (1)$$

Proof: Let $F$ an arbitrary antiderivative of $f$. Note $(f \circ g)(x) \cdot g(x)$ is integrable. Moreover, it is the derivative of $F \circ g$. From the fundamental theorem of calculus, it's easy to see both sides are equal to $F(g(b)) - F(g(a))$. Note that the FTC assumes merely the Riemann integrability of $f$; see Spivak ($2008$) for a proof of this.

Example 1:

$$\int_{-2}^{1} 2x\exp x^2 \ dx$$

Let $g(x) = x^2$. From $(1)$, this integral is equal to $\int_4^1 \exp t \ dt =e - \exp 4$. Note the substitution $u = x^2$ is not bijective in $[-2, 1]$.

Example 2

For this example, let $g(x) = x^2 \sin \frac 1x$ with $g(0) = 0$ and note $g'(x) = 2x \sin x^{-1} - \cos x^{-1}$ with $g'(0) = 0$. $g'$ is Riemann integrable since it is bounded and only discontinuous at a single point. We wish to evaluate

$$\int_{-1}^1 g'(x) \exp g(x) \ dx$$

From $(1)$, it's easy to see that this integral is equal to $\exp \sin 1 - \exp \sin (-1)$. This illustrates that $(1)$ can be used even when the substitution is not $C^1$.

Example 3

Consider $$\int_{-1}^{1} \exp x \ dx \ \ \ \ \ (2)$$

In this situation, we will choose the $g$. Here, the injectivity of $g$ becomes relevant, because every occurrence of $x$ in our integral, we have to write in terms of $g$.

Let $g(x) = x^2$, $\frac{dg}{dx} = 2x$. We want our integral to be of the form

$$\int_{-1}^{1} \frac{dg}{dx} f(g(x)) \ \ dx$$

This, however, is only possible if $g$ is invertible; this is because we will need an inverse for $x^2$. How can this be solved? Split the original integral into components where $g$ is bijective. So, instead, evaluate

$$\int_{-1}^0 \exp x \ dx + \int_0^1 \exp x \ dx$$

with the substitution $g = x^2$. For example,

$$\int_0^1 \exp x \ dx = \int_0^1 \exp \sqrt{x^2} \ dx = \int_0^1 2x \cdot \frac{1}{2\sqrt{x^2}}\exp \sqrt{x^2} \ dx = \int_0^1 \frac{\exp{\sqrt g}}{2 \sqrt g} \ dg$$

Note that the $\sqrt{x^2}$ would have been problematic had we not split the integral.

Of course, in this case we've only made our integral more complicated but usually this makes the integral easier to solve.

In summary: the substitution needn't be $C^1$; an integrable derivative is enough. If the original integrand is already of the form $g' \cdot f(g(x))$, the bijectivity of $g$ is irrelevant. If you're given an integral and you want to evaluate it with an arbitrary substitution, that's when the bijectivity of $g$ is relevant, and splitting the integral usually fixes the problem.