# Is integration by substitution always a reverse of the chain rule?

To integrate $$\int x^3\sin(x^2+1)dx$$, I took the following approach: \begin{align*} \begin{split} \int x^3\sin(x^2+1)dx&=\int x^3\sin(u)\cdot\frac{1}{2x}du\\ &=\frac{1}{2}\int x^2\sin(u)du\\ &=\frac{1}{2}\int(u-1)\sin(u)du\\ &=\frac{1}{2}\int u\sin(u)-\sin(u)du\\ &=\frac{1}{2}\left(-u\cos(u)-\int -\cos(u)\cdot1du-\int\sin(u)(du)\right)+c\\ &=\frac{1}{2}\left(-u\cos(u)+\sin(u)+\cos(u)\right)+c\\ &=\frac{1}{2}\left((1-u)\cos(u)+\sin(u)\right)+c\\ &=\frac{1}{2}\left((1-(x^2+1))\cos(x^2+1)+\sin(x^2+1)\right)+c\\ &=\frac{1}{2}\left(\sin(x^2+1)-x^2\cos(x^2+1)\right)+c \end{split} \begin{split} u&=x^2+1\\ \frac{du}{dx}&=2x\\ \frac{dx}{du}&=\frac{1}{2x}\\ dx&=\frac{1}{2x}du\\ \\ u&=x^2+1\\ x^2&=u-1 \end{split} \end{align*} When integration by substitution was first introduced to me, I was told that it was the inverse of the chain rule, and that it was used in cases where you were integrating a result from the chain rule i.e. a result in the form $$g'(x)f'(g(x))$$. Clearly, $$x^3\sin(x^2+1)$$ is not in this form, so it seems that I have used integration by substitution in a case where it is not the reverse of the chain rule.

My question is:

Have I got confused about this, and is there another way of looking at this where it becomes clear that integration by substitution is, in fact, reversing the chain rule in this problem? If I am correct, what is a better explanation of when integration by substitution can be used to solve an integral?

(Note: I suppose one way you could look at it is that $$x^3\sin(x^2+1)=x^2\cdot x\sin(x^2+1)$$, and that you're partially reversing the chain rule for the $$x\sin(x^2+1)$$ bit, but you then have to use integration by parts, as the chain rule bit is being multiplied by $$x^2$$.)

• Just because $x^3\sin(x^2+1)$ doesn't immediately look like the result of using the chain rule in some fancy way, that doesn't mean that it isn't. – Arthur Nov 22 '18 at 15:39
• Have a close look at the function $x^{3} sin(x^{2}+1)$ – Akash Roy Nov 22 '18 at 15:45
• BTW you have a typo, it should be $g'(x)f'(g(x))$ .. then what @AkashRoy said – ancientmathematician Nov 22 '18 at 15:47
• Oh yep, thank you, I'll correct that @ancientmathematician. It seems that Arthur and Akash Roy might be suggesting that it is in fact a result of the chain rule, so I will take a look and have a think, thanks guys. – Rational Function Nov 22 '18 at 15:52
• I've had a look at $x^3\sin(x^2+1)$, and if I use $g(x)=x^2+1$ and $f'(x)=\sin(x)$, it's in the form$\left(\frac{g'(x)}{2}\right)^3f'(g(x))$ which isn't in the form $g'(x)f'(g(x))$. I'm not really sure what I should be looking for @AkashRoy. Could you give me a hint (or just an explanation)? – Rational Function Nov 22 '18 at 16:01

The integrand is \begin{align} x^3 \sin(x^2+1) &= \frac{x^2}{2} \sin(x^2+1)(2x)\\ &= \frac{(x^2 +1 - 1)}{2} \sin(x^2+1) (2x) \\ &= f(x^2+1) (2x) \end{align} where $$f$$ is the function defined by $$f(u) = \frac{(u-1)}{2} \sin(u).$$ If $$F$$ is an antiderivative of $$f$$, then $$F(x^2+1)$$ is an antiderivative of the integrand. (Here we are using the chain rule in reverse.)

So, evaluating this integral has been reduced to the problem of finding an antiderivative of $$f$$.

• Thanks @littleO, I could never have come up with that myself! I can see that now this problem has been made into one where we are using the chain rule in reverse. Can something like this be done every time we use integration by substitution to show that it is reversing the chain rule? – Rational Function Nov 22 '18 at 16:10
• I got late , a very good solution from littleO btw – Akash Roy Nov 22 '18 at 16:43

The first thing that occurs to me are integrals like

$$\int x\sqrt{x+1}\; dx$$

which we would use substitution to fix the battle between the square root and the plus sign: $$u=x+1$$ gives

$$\int (u-1)\sqrt{u} \; du = \int u^{3/2}-u^{1/2} \; du.$$

I suppose one could construe this as a reverse chain rule since one computes $$du = 1 \; dx$$, but I think that's stretching it.

• Yes, this is precisely the kind of thing I mean. It certainly doesn't look like it has anything to do with reversing the chain rule at first glance, but I'm wondering if every time we use integration by substitution, we are reversing the chain rule (although perhaps not at a superficial level). – Rational Function Nov 22 '18 at 16:12
• In this example, the integrand is $x(x+1)^{1/2} = (x+1-1)(x+1)^{1/2} \cdot 1 = f(x+1) \cdot 1$, where the function $f$ is defined by $f(u) = (u-1) u^{1/2}$. If $F$ is an antiderivative of $f$, then $F(x+1)$ is an antiderivative of the integrand (according to the chain rule). So evaluating this integral has been reduced to the problem of finding an antiderivative of $f$. – littleO Nov 22 '18 at 16:21