# Calculus/Integration techniques/Recognizing Derivatives and the Substitution Rule

After learning a simple list of antiderivatives, it is time to move on to more complex integrands, which are not at first readily integrable. In these first steps, we notice certain special case integrands which can be easily integrated in a few steps.

## Recognizing Derivatives and Reversing Derivative Rules

If we recognize a function $g(x)$ as being the derivative of a function $f(x)$ , then we can easily express the antiderivative of $g(x)$ :
$\int g(x)dx=f(x)+C$
For example, since
${\frac {d}{dx}}\sin(x)=\cos(x)$
we can conclude that
$\int \cos(x)dx=\sin(x)+C$
Similarly, since we know $e^{x}$ is its own derivative,
$\int e^{x}dx=e^{x}+C$
The power rule for derivatives can be reversed to give us a way to handle integrals of powers of $x$ . Since
${\frac {d}{dx}}x^{n}=nx^{n-1}$
we can conclude that
$\int nx^{n-1}dx=x^{n}+C$
or, a little more usefully,
$\int x^{n}dx={\frac {x^{n+1}}{n+1}}+C$

## Integration by Substitution

Very rarely will we encounter a question where they ask us
    1v. Evaluate $\int nx^{n-1}dx$ or $\int \cos(x)dx$
is. We usually get
    2iii. Evaluate $\int {\frac {\sin(\ln(x))}{x}}dx$
instead. These look hard, but there is a way to do them. Mathematicians call it Integration by Substitution, and for many integrals, this can be used to re-express the integrand in a way that makes finding of an antiderivative possible and easy. Sure, depending on the form of the integrand, the substitution to make may be different, but there is no doubt that the overall method is useful.
The objective of Integration by substitution is to substitute the integrand from an expression with variable $x$ and the right side of the integral $dx$ to an expression with variable $u$ where $u=g(x)$ and the right side of the integral $du$ , where $du=g'(x)dx$ . How? By identifying a function and its derivative that makes up a part of the overall equation.

#### Goal

The general gist of Integration by Substitution is to transform the integral so that instead of referencing $x$ , it references the function $u$ . We can show how this method works by abstracting each step using math. In math, we can write down what we want to do (write the steps of Integration by Substitution in math) by writing
Given $u=g(x)$ ,
    $\int \limits _{x=a}^{x=b}f(x)dx\ \to \ \int \limits _{u=c}^{u=d}h(u)du$

#### Steps

    $\int \limits _{x=a}^{x=b}f(x)dx$ $=\int \limits _{x=a}^{x=b}f(x)\ {\frac {du}{du}}\ dx$ (1) i.e. ${\frac {du}{du}}=1$ $=\int \limits _{x=a}^{x=b}{\left(f(x)\ {\frac {dx}{du}}\right)\left({\frac {du}{dx}}\right)}\ dx$ (2) i.e. ${\frac {dx}{du}}\cdot {\frac {du}{dx}}=1$ $=\int \limits _{x=a}^{x=b}\left(f(x)\ {\frac {dx}{du}}\right)g'(x)\ dx$ (3) i.e. ${\frac {du}{dx}}=g'(x)$ $=\int \limits _{x=a}^{x=b}h(g(x))g'(x)dx$ (4) i.e. Now equate $\left(f(x)\ {\frac {dx}{du}}\right)$ with $h(g(x))$ $=\int \limits _{x=a}^{x=b}h(u)g'(x)dx$ (5) i.e. $g(x)=u$ $=\int \limits _{u=g(a)}^{u=g(b)}h(u)du$ (6) i.e. $du={\frac {du}{dx}}dx=g'(x)dx$ $=\int \limits _{u=c}^{u=d}h(u)du$ (7) i.e. We have achieved our desired result

#### Procedure

If the previous mathematical steps are difficult to grasp all at once or difficult to put into practice, don't worry! Here are the steps written in plain English. It even includes the Goal too.
* Find a function $u=g(x)$ that has a $g'(x)$ also in the expression somewhere . This may involve experimenting or staring at the expression in the integrand long enough
** If the question is hard, finding the $g'(x)$ may involve synthesizing numbers (constants) from nowhere so that it can be used to cancel out portions of $g'(x)$ . However, if the entirety of $g'(x)$ needs to cancel artificially, then this may be a sign that you are making a question harder.
* Calculate $g'(x)={\frac {du}{dx}}$
* Calculate $h(u)$ which is $f(x){\frac {dx}{du}}={\frac {f(x)}{g'(x)}}$ and make sure the final expression $h(u)$ does not have $x$ in it
* Calculate $c=g(a)$
* Calculate $d=g(b)$
In summary, Integration by Substitution tells us the following
Substitution rule for definite integrals Assume $u$ is differentiable with continuous derivative and that $f$ is continuous on the range of $u$ . Suppose $c=u(a),d=u(b)$ . Then $\int \limits _{a}^{b}f(u(x)){\frac {du}{dx}}dx=\int \limits _{c}^{d}f(u)du$ .

## Examples
### Integrating with the derivative present

Under ideal circumstances for Integration by Substitution, a component of the integrand can be viewed as the derivative of another component of the integrand. This makes it so that the substitution can be easily applied to simplify the integrand.
For example, in the integral
    $\int 3x^{2}(x^{3}+1)^{5}dx$
we see that $3x^{2}$ is the derivative of $x^{3}+1$ . Letting
    $u=x^{3}+1$
we have
    ${\frac {du}{dx}}=3x^{2}$
or, in order to apply it to the integral,
    $du=3x^{2}dx$
With this we may write
    $\int 3x^{2}(x^{3}+1)^{5}dx=\int u^{5}du={\frac {u^{6}}{6}}+C={\frac {(x^{3}+1)^{6}}{6}}+C$
Note that it was not necessary that we had exactly the derivative of $u$ in our integrand. It would have been sufficient to have any constant multiple of the derivative.
For instance, to treat the integral
    $\int x^{4}\sin(x^{5})dx$
we may let $u=x^{5}$ . Then
    $du=5x^{4}dx$
and so
    ${\frac {du}{5}}=x^{4}dx$
the right-hand side of which is a factor of our integrand. Thus,
    $\int x^{4}\sin(x^{5})dx=\int {\frac {\sin(u)}{5}}du=-{\frac {\cos(u)}{5}}+C=-{\frac {\cos(x^{5})}{5}}+C$
In general, the integral of a power of a function times that function's derivative may be integrated in this way. Since ${\frac {d[g(x)]}{dx}}=g'(x)$ ,
we have $dx={\frac {d[g(x)]}{g'(x)}}$ .
Therefore,
    $\int g'(x)g(x)^{n}dx$ $=\int g'(x)g(x)^{n}{\frac {d[g(x)]}{g'(x)}}$ $=\int g(x)^{n}d[g(x)]$ $={\frac {g(x)^{n+1}}{n+1}}$
There is a similar rule for definite integrals, but we have to change the endpoints.

### Synthesizing Terms

What if the derivative does not show up one-for-one in the expression? This is okay! For some integrals, it may be necessary to synthesize constants in order to solve the integral. Usually, this looks like a multiplication between the expression and ${\frac {n}{n}}=1$ , for some number $n$ . Note that this usually works for variables as well, but synthesizing variables should not be a common thing and should only be an absolute last resort.
As an example of this practice put into the Integration by Substitution method, consider the integral
    $\int \limits _{0}^{2}x\cos(1+x^{2})dx$
By using the substitution $u=1+x^{2}$ , we obtain $du=2x\,dx$ . However, notice that the constant 2 does not show up in the expression in the integrand. This is where this extra step applies. Notice that
    $\int \limits _{0}^{2}x\cos(1+x^{2})dx$ $={\frac {1}{2}}\int \limits _{0}^{2}2x\cos(1+x^{2})dx$ $={\frac {1}{2}}\int \limits _{1}^{5}\cos(u)du$ $={\frac {\sin(5)-\sin(1)}{2}}$
and remember to calculate the new bounds for this integral. The lower limit for this integral was $x=0$ but is now $u=1+0^{2}=1$ and the upper limit was $x=2$ but is now $u=1+2^{2}=5$ .

## Appendix
### Proof of the substitution rule

We will now prove the substitution rule for definite integrals. Let $H$ be an anti-derivative of $h$ so
    $H'(u)=h(u)$
Suppose we have a differentiable function $g(x)$ such that $u=g(x)$ , and numbers $c=g(a),d=g(b)$ derived from some given numbers $a,b$ .
By the Fundamental Theorem of Calculus, we have
    $\int \limits _{c}^{d}h(u)du=H(d)-H(c)$
Next we define a function $F$ by the rule
    $F(x)=H(g(x))=H(u)$
Naturally
    $f(x)=F'(x)={\frac {dF}{dx}}$
Then by the Chain rule $F$ is differentiable with derivative
    ${\frac {dF}{dx}}={\frac {dH}{du}}\cdot {\frac {du}{dx}}=h(u){\frac {du}{dx}}=h(g(x)){\frac {du}{dx}}$
Integrating both sides with respect to $x$ and using the Fundamental Theorem of Calculus we get
    $\int \limits _{a}^{b}h(g(x)){\frac {du}{dx}}dx=\int \limits _{a}^{b}{\frac {dF}{dx}}dx=F(b)-F(a)$
But by the definition of $F$ this equals
    $F(b)-F(a)=H(g(b))-H(g(a))=H(d)-H(c)=\int \limits _{c}^{d}h(u)du$
Hence
    $\int \limits _{a}^{b}f(x)dx=\int \limits _{a}^{b}h(g(x)){\frac {du}{dx}}dx=\int \limits _{c}^{d}h(u)du$
which is the substitution rule for definite integrals.

### Exercises

Evaluate the following using a suitable substitution.
$\int {\frac {19}{\sqrt {9x-38}}}dx$
${\frac {38{\sqrt {9x-38}}}{9}}+C$
${\frac {38{\sqrt {9x-38}}}{9}}+C$
$\int -15{\sqrt {9x+43}}dx$
$-{\frac {10(9x+43){\sqrt {9x+43}}}{9}}+C$
$-{\frac {10(9x+43){\sqrt {9x+43}}}{9}}+C$
$\int {\frac {17\sin(x)}{\cos(x)}}dx$
$-17\ln |\cos(x)|+C$
$-17\ln |\cos(x)|+C$
$\int 5\cos(x)\sin(x)dx$
${\frac {5\sin ^{2}(x)}{2}}+C$
${\frac {5\sin ^{2}(x)}{2}}+C$
$\int \limits _{0}^{1}-{\frac {10}{(-5x-32)^{4}}}dx$
$-{\frac {17885}{2489696256}}$
$-{\frac {17885}{2489696256}}$
$\int -3e^{3x+12}dx$
$-e^{3x+12}+C$
$-e^{3x+12}+C$
Solutions

# External links

* Videos and exercises on u-substitution on Khan Academy
Navigation:
Main Page · Precalculus · Limits · Differentiation · Integration · Parametric and Polar Equations · Sequences and Series · Multivariable Calculus · Extensions · References