## Integration primer

16 December 2018

1 Simple cases

Simplest case is $x^n$

$\int x^n \, dx = \frac 1{n+1} \times x^{n+1} = \frac{x^{n+1}}{n+1}$

1.1 Reverse chain rule for form $ax+b$

$\int f' (ax+b) \, dx = \frac 1 a f(ax+b) + c$

e.g. $\int (2x+1)^2 \, dx = \frac 1 6 (2x+1)^3$

Adding one to the index and differentiating:
$\frac d{dx} ( ( 2x+1 )^3 ) = 3 \times (2x+1)^2 \times 2 = 6 (2x+1)^2$

Adjusting the constant accordingly:
$\frac d{dx} ( \frac 1 6 (2x+1)^3 ) = 3 \times \frac 1 6 \times (2x+1)^2 \times 2 = (2x+1)^2$

1.2 Standard functions

Standard results, below, can be used to integrate. As can be seen in the table below, these are the standard differentiation results, but going the other way i.e. integrating rather than differentiating.

$\int x^n \, dx = \frac 1{n+1} x^{n+1} + c$
$\int e^x \, dx = e^x + c$
$\int \frac 1 x \, dx = \ln \mid x \mid + c$
$\int (\cos x) \, dx = \sin x + c$
$\int (\sin x) \, dx = - \cos x + c$
$\int (\sec^2 x) \, dx = \tan x + c$
$\int (\csc x \cot x) \, dx = - \csc x + c$
$\int (\sec x \tan x) \, dx = \sec x + c$
$\int (\csc^2 x) \, dx = - \cot x + c$

Differentiation Integration
$\frac{d}{dx} (x^n) = nx^{n-1}$ $\int x^n \, dx = \frac 1{n+1} x^{n+1} + c$
$\frac{d}{dx} (e^{kx}) = ke^{kx}$ $\int e^x \, dx = e^x + c$
$\frac{d}{dx} (\ln x) = \frac 1 x$ $\int \frac {1}{x} \, dx = \ln \mid x \mid + c$
$\frac{d}{dx} (a^{kx}) = a^{kx} k \ln a$
$\frac{d}{dx} (\sin kx) = k \cos kx$ $\int (\cos x) \, dx = \sin x + c$
$\frac{d}{dx} (\cos kx) = - k \sin kx$ $\int(\sin x) \, dx = - \cos x + c$
$\frac{d}{dx} (\tan kx) = k \sec^2 kx$ $\int(\sec^2 x) \, dx = \tan x + c$
$\frac{d}{dx} (\csc kx) = - k \csc kx \cot kx$ $\int (\csc x \cot x) \, dx = - \csc x + c$
$\frac{d}{dx} (\sec kx) = k \sec kx \tan kx$ $\int (\sec x \tan x) \, dx = \sec x + c$
$\frac{d}{dx} (\cot kx) = -k \csc^2 kx$ $\int(\csc^2 x) \, dx = - \cot x + c$

In addition to these, there are further standard results for integration

$\int \tan x \, dx = \ln |\sec x| + c$ $\int \sec x \, dx = \ln |\sec x + \tan x| + c$
$\int \cot x \, dx = \ln |\sin x| + c$
$\int \csc x \, dx = - \ln |\csc x + \cot x | + c$

1.3 Trigonometric identities

Can be used to replace an expression that cannot be integrated with one that can, using the standard results.

e.g. $\int \tan ^2 x \, dx = \int \sec^2 x - 1 \, dx = \tan x - x + c$

Given

$\cos^2 x + \sin^2 x \equiv 1$
$1 + \tan ^2 x \equiv \sec^2 x$
$\tan^2 x \equiv \sec^2 x - 1$

2 Reverse chain rule in the form $k \frac{f'(x)}{f(x)}$

If in the form $k \frac{f'(x)}{f(x)}$ try $\ln |f(x)|$ and then differentiate to check, and adjust any constant.

e.g. $I = \int \frac {\cos x}{3+2 \sin x} \, dx$

Consider

$y = \ln |3+2 \sin x|$
$\frac{dy}{dx} = \frac 1 {(3+2 \sin x) \times (2 \cos x)} = \frac{2 \cos x}{3+2 \sin x}$

So

$I = \frac 1 2 \ln |3+2 \sin x| + c$

3 Reverse chain rule in the form $k f'(x) ( f(x) )^n$

If in the form $k f'(x) ( f(x) )^n$ try $(f(x))^{n+1}$ and then differentiate to check, and adjust any constant.

e.g. $I = \int x (x^2 + 5)^3 \, dx$

Consider

$y = (x^2 + 5)^4$
$\frac{dy}{dx} = 4(x^2 + 5)^3 \times 2x = 8x (x^2 + 5)^3$

So

$I = \frac 1 8 (x^2 + 5)^4 + c$

4 Integration by substitution

Idea is to simplify integration by changing the variable. In this sense similar to the chain rule for differentiation.

Usually the term will be a function of $x$ multiplied by another function of $x$.

1. Set $u$ equal to part of the term and set $I$ equal to the original integral
2. Find $x$ in terms of $u$
3. Differentiate $u$ for $\frac{du}{dx}$
4. Substitute terms of $x$ for terms of $u$ and $dx$ for $du$ in the integral. Now have $I$ in terms of $x$
5. Substitute $u$ terms with $x$ terms to be left with $I$ in terms of $x$

Usually you will want to pick a bracketed term in $x$ to use for $u$. If there is e.g. 1 + something in the denominator, use something as your value for $u$. Sometimes you may pick a substitution which is not helpful and go round in circles, in which case e.g. in the case where the question directs you to use integration by subsitution, another substitution should be tried.

5 Integration by parts

Starting with a re-arranged version of the product rule for differentiation:

$\frac d{dx} (uv) = u \frac{dv}{dx} + v \frac{du}{dx}$

So: $u \frac{dv}{dx} = \frac{d}{dx} (uv) - v \frac{du}{dx}$

Further, given $\int \frac{d}{dx} (uv) \, dx = uv$ then, integrating each term, we are left with the formula for integration by parts:

$\int u \frac{dv}{dx} \, dx = uv - \int v \frac{du}{dx} \, dx$

Function to be integrated will be in the form $\int u \frac{du}{dx} \, dx$ so will need to pick variables for each of $u$ and $\frac{dv}{dx}$

1. For a function with a $\ln x$ term, set $u$ as this
2. Similarly for an $x^n$ term, let $u$ equal this. In the easiest case $u=x$
3. If both an $x^n$ term and a $\ln x$ term, let $u$ equal the $\ln x$ term

Note may need to integrate by parts twice

When applying limits be careful to apply separately to the different terms i.e.
$I = \int _a^b u \frac{dv}{dx} \, dx$
$I = [uv] _a^b - \int _a^b v \frac{du}{dx} \, dx$

Note that the purpose of integration by parts is that $\int v \frac{du}{dx} \, dx$ is easier to integrate than the original term and so it is important to pick $u$ and $\frac{dv}{dx}$ accordingly, otherwise one can go around in circles. If terms such as $x \cos x$, $x^2 \sin x$, $x^3 e^x$ etc are present, let $u$ equal the $x^n$ term. If an $\ln x$ term e.g. $x^2 \ln x$, let $u$ equal the $\ln x$ term.

Appendix — things to remember

1. Integration is just differentiation in reverse and so familiarity with the standard differentation results is important
2. Remember to separate the term to be integrated into partial fractions if the degree of the polynomial in the numerator is greater than or equal to the degree of the polynomial in the denominator e.g. $\frac{x^3 + a}{x^2 + b}$ needs splitting into partial fractions before it can be integrated
3. Calculation steps may be saved by simplifying the integral as much as possible before substituting limits
4. Relatedly, often constant terms (even $-1$) can be taken outside of the integral to make life easier
5. Remember the constant of integration $+c$ at the end. For first order differential equations this is only needed on one side of the equation
6. When adding regions together to get the total area of region(s) under curve(s) do not forget that area is always a positive quantity — so you will be adding positive values