manyspikes

Change of variables

Initialising environment...

In this section, we will look at the change of variables rule, which helps us deal with integrals of function compositions. It is closely related to the chain rule in differential calculus, as we will show now.

Consider a function f(x)f(x) with a primitive F(x)F(x). As we know, differentiating FF produces the function ff, so we can write:

F(x)=f(x).\begin{equation} F'(x) = f(x). \end{equation}

By the chain rule, we can also write that:

[F(g(x))]=F(g(x))g(x).\begin{equation} [F(g(x))]' = F'(g(x)) g'(x). \end{equation}

Substituting (1) in the equation above, we get

[F(g(x))]=f(g(x))g(x).\begin{equation} [F(g(x))]' = f(g(x)) g'(x). \end{equation}

Integrating both sides, we can write:

F(g(x))+C=f(g(x))g(x)dx.\begin{equation} F(g(x)) + C = \int f(g(x)) g'(x) \,\textrm{d}x. \end{equation}

This is the change of variables rule. As in integration by parts, this technique works if we can find a primitive that is easier to calculate than the original one.

Example

Let's compute the following integral:

xex2dx.\begin{equation} \int x e^{x^2} \,\textrm{d}x. \end{equation}

There is only one function that can be composable here, so we could start by saying that f(x)=exf(x)=e^x and g(x)=x2g(x)=x^2. However, in it's current form, we can't really apply the change of variables rule because g(x)=2xg'(x) = 2x and we do not have that in the integral we want to compute. Luckily, we can make use of the linearity of integration to force the appearance of 2x2x in the integral:

xex2dx=12(2x)(ex2)dx.\begin{equation} \int x e^{x^2} \,\textrm{d}x = \frac{1}{2}\int (2x) (e^{x^2}) \,\textrm{d}x . \end{equation}

Now we can apply the change of variables formula (4) with g(x)=x2g(x)=x^2, g(x)=2xg'(x)=2x and f(x)=exf(x)=e^x. Because the primitive of exe^x is itself exe^x, we get the following result.

12(2x)(ex2)dx=12ex2+C\begin{equation} \frac{1}{2} \int (2x) (e^{x^2}) \,\textrm{d}x = \frac{1}{2} e^{x^2} + C \end{equation}