## Saturday, 19 May 2012

### Basics of integration. Part III. Ordinary Substitution

$\frac{dy}{dx}=\frac{dy}{du}\frac{du}{dx}$

Example 1. (Chain rule) Evaluate $f'(x)$ where $f(x)=\cos^2 3x^2$

$\frac{df}{dx}=\frac{d(\cos ^2 3x^2)}{d(\cos 3x^2)}\frac{d(\cos 3x^2)}{d(3x^2)}\frac{d(3x^2)}{dx}=-12x\cos 3x^2 \sin 3x^2$

Algebrically reading the equation it looks like "multiplying and divising the same thing to the entire function like rationalization and transforming complex number to standard form.

Apply chain rule to a composite function: $g(f(x))$. By chain rule we have $\frac{dg(f(x))}{dx}=\frac{df(x)}{dx}\frac{dg(f(x)}{df(x)}$ If you are not sure about what the second term means, do a substitution u=f(x) and $\frac{dg(f(x))}{dx}=\frac{du}{dx}\frac{dg(u)}{du}$.

Now integrate both sides once: $g(f(x))=\int \frac{df(x)}{dx}\frac{dg(f(x))}{df(x)}$ (notice that RHS can cancel out each other to give $\int dg(f(x))$ which clearly gives the term at LHS.)

We can transform the above equation to another common representation for easier reading $\int f'(x)g'(f(x))dx = g(f(x))+C$.

Theorem 1. Integration by substitution $\int f'(x)g'(f(x))=g(f(x))+C$.

For those who were not familiar with substitution, you may follow this flowchart:
STEP 1: Identify f'(x) and g(f(x)). In most case in college level this is clear because g(f(x)) is supposed to be the ONLY composite function that can't be easily decomposed.

Example 2a. Identifying composite function Decide which one should be the composite function: i) $\int x\sin(x^2)dx$, ii) $\int x^2 e^{x^3} dx$ iii) $\int x^3 dx$

For i) and ii)this is clear that there's only one function has hard to break down, that is sin (x^2) and e^(x^3) respectively. For iii), first we know that it's a polynomial, and we know that $(x^n)'=nx^{n-1}$, then $f(x)f'(x)=nx^{2n-1}$, constant does not matter so we have 2n-1 = 3, n = 2. Then we have the composite function to be $x^2$. Note that we are now applying an exceptional case of the about substitution.

Theorem 2. Exceptional case of substitution $\int f'(x)f^n (x)dx=\int f^n(x)df(x)=\frac{f^{n+1}(x)}{n+1}+C$ where g(x) = x in theorem 1.

STEP 2: Write $\int f'(x)g'(f(x))dx$ in forms of $\int g'(f(x))df(x)$.

Note that the constant matters so that we may have to put a constant multiplying the integrand.

Example 2b. Conduct step 2 for the three examples in example 2a.
i) $\int x\sin x^2 dx$. Notice that $\frac{dx^2}{dx}=2x$, i.e., $xdx=\frac{1}{2}dx^2$, then $\int x\sin x^2 dx=\frac{1}{2}\int \sin x^2 dx^2$

ii) $\int x^2e^{x^3}dx$. Skip the ordinary form of differentiation and now we get $x^2 dx=\frac{1}{3}dx^3$, then we have $\int x^2 e^{x^3}dx=\frac{1}{3}\int e^{x^3}dx^3$

iii) $\int x^3 dx = \int (x)(x^2)dx = \frac{1}{2}\int x^2 dx^2$

STEP 3: Finish the integration. This one should be simple since the function is in $\int g(u)du$ where g is easy enough to be integrated as identified.

Example 2c. Finish the integration as shown in example 2b.

i) $\frac{1}{2}\int \sin x^2 dx^2 = -\frac{\cos x^2}{2}+C$
ii) $\frac{1}{3}\int e^{x^3}dx^3 = \frac{1}{3}e^{x^3}+c$
iii) $\frac{1}{2}\int x^2 dx^2=\frac{1}{4}(x^2)^2+C=\frac{x^4}{4}+C$

Note that we have verified power rule in example (iii).

Example 3. (Verification of power rule) Show that $\int x^n dx=\frac{x^{n+1}}{n+1}+C$ for positive odd integer.

For $\int x^{2n-1} dx =\frac{1}{n}\int (nx^{n-1})x^ndx=\frac{1}{n}\int x^n dx^n = \frac{x^{2n}}{2n} +C$.

Sometimes the function will not be as trivial as it shown above. The first extention is about constants sticking in the function.

Theorem 3. (Derivatives on function with constants) $\frac{d(f+C)}{dx}=\frac{df}{dx}$ where C is a constant.

This is a fact that has been proved in part II, but the one we have to use is:

Corollary 1. $d(f+C)=df$. Note that this can be directly proofed as $\frac{d(f+C)}{df}=\frac{df}{df}+\frac{dC}{df}=1$.

WARNING. Note that $(f+C)dx\neq fdx$! When we put functions outside into the dx stuffs it actually processes an integration and therefore $(f+C)dx=d(F+Cx)\neq dF = fdx$.

Therefore it allows us to ignore to do substitution without trouble from constant.

Example 4. Evaluate $\int 2xe^{x^2-1}$

We have $\int 2xe^{x^2-1}dx=\int e^{x^2-1}d(x^2-1)=e^{x^2-1}+C$ because $2xdx=dx^2=d(x^2-1)$. Note that in this example we can take the constant away like $\int 2xe^{x^2-1}dx = \frac{1}{e}\int 2xe^{x^2}dx=\frac{1}{e}e^{x^2}+C=e^{x^2-1}+C$.

Another exception from substitution is a linear f(x).

Let $f(x)=ax+b$, $f'(x)=a$.

Consider $\int ag(f(x))dx=\int ag(ax+b)dx=\int g(ax+b)d(ax+b)=G(ax+b)+C$.

Theorem 4. (Linear composite functions) $\int f(ax+b) = \frac{1}{a}F(ax+b)+C$

Example 5. Evaluate the following integral: i) $\int \frac{4x+3}{2x+1}dx$ ii) $\int \sin (2x+\pi)dx$

i) We have $\int \frac{4x+3}{2x+1}dx=\int (2+\frac{1}{2x+1})dx=2x+\frac{\ln |2x+1|}{2}+C$ because $\int \frac{1}{2x+1}dx = \frac{1}{2}\int \frac{d(2x+1)}{2x+1}=\frac{1}{2}\ln|2x+1| +C$.

ii) $\int \sin(2x+\pi)dx = \frac{-1}{2}\cos (2x+\pi)+C$, it has the alternative form $\frac{\cos 2x}{2}+C$ by taking the constant away using angle sum formula. We can also take the constant away before integration because $\sin (2x+\pi)=-\sin 2x$ which allows us to do the integration easily.

Now we end up this section with two harder example:

Example 6. (Complicated f(x)) Evaluate the integral $\int \frac{3x^2+12x+11}{x^3+6x^2+11x+6}dx$.

Noticing that $(x^3+6x^2+11x+6)'=(3x^2+12x+11)$ we have the integral equal to $\frac{d(x^3+6x^2+11x+6)}{x^3+6x^2+11x+6}=\ln |x^3+6x^2+11x+6|+C$.

If there's an alternative method which is by partial fraction which we may discuss later. Noticing that $\frac{1}{x^3+6x^2+11x+6}=\frac{1}{(x+1)(x+2)(x+3)}$ we break down the fractions into linear combination of $\frac{1}{x+1}$, $\frac{1}{x+2}$ and $\frac{1}{x+3}$, in this case $\frac{3x^2+12x+11}{x^3+6x^2+11x+6}=\frac{1}{x+1}+\frac{1}{x+2}+\frac{1}{x+3}$ (This is another interesting fact concerning polynomial.) Then the integral can be easily evaluated as $\ln|x+1| + \ln|x+2|+\ln|x+3|+C$ which is equivalent to the previous answer.

Example 7. (Multiple composite functions) Evaluate the integral $I=\int 3x^2 \sin 6x^3 \cos ^2 6x^3 dx$.
In this case we have no choice but to use substitution twice.

$I=\frac{3}{18}\int \sin 6x^3 \cos ^2 6x^3 d 6x^3$ because $d6x^3=18x^2dx$
$=-\frac{1}{6}\int \cos ^2 6x^3 d\cos 6x^3$
$=-\frac{1}{18}\cos ^3 6x^3+C$