Integral calculus

\int 3x^2 dx means to find the function whose derivative with respect to x is 3x^2.

\int x^n \dx = \frac{x^{n+1}}{n+1} + c

Basic rules for integration

Constant factors can be pulled out of the integral:

\int c \: f(x) \dx = c \int f(x) \dx b

The sum of integrals is equal to the integral of a sum:

\int [f(x) + g(x)] \dx = \int f(x) \dx + \int g(x) \dx

The integral of a constant a with regards to \dx is ax + c:

\int a \dx = a \int 1 \dx = ax + c

Integrating polynomials

Terms are integrated separately, much like how terms are differentiated separately during differentiation.

x^n \mapsto \frac{x^{n+1}}{n+1} + c
ax^0 \mapsto \frac{ax^{1}}{1} + c = ax^1

Integration by substitution

This is analogous to the chain rule for differentiation.

Substitute a function f(x) with u, replace dx with du such that the equation is equal to the original, then integrate, and finally replace u with f(x).

For example, to integrate the following equation:

I = \int 3 + (x-1)(x^2 - 2x + 7)^6 \dx

Start by integrating both terms separately, pulling out any constant factors:

I = 3 \int 1 \dx + \int (x-1)(x^2 - 2x + 7)^6 \dx

We can’t integrate the product in the second integration directly. Instead, we temporarily substitute the inner expression x^2 - 2x + 7, calling it u, and we now integrate the second integration with respect to du:

I \ne 3 \int 1 \dx + \int (x-1)(u)^6 \d{u}

This isn’t quite right though, because we don’t know that \d{u} is equal to \dx. We also want to be removing the (x-1) factor at the same time. Find out what du is by differentiating our expression u and then manipulating the equation until \d{u} = (x-1)\dx:

\frac{\d{u}}{\dx} = 2x - 2
\frac{1}{2}\d{u} = (x - 1) \dx

Now we can see that the (x-1)\dx in our second integration can be replaced with \frac{1}{2}\d{u} (pulling the \frac{1}{2} constant factor out of the integration for tidiness):

I = 3 \int 1 \dx + \frac{1}{2}\int (u)^6 \d{u}

Now integrate, remembering to add c (since c is a random constant, any multiple of c is equal to c):

I = 3 \times x + \frac{1}{2} \times \frac{1}{7}(u)^7 + c

Substitute u for our original expression x^2 - 2x + 7, and then simplify to get the final answer:

I = 3x + \frac{1}{14}(x^2 - 2x + 7)^7 + c

Integrating the basic functions

\frac{\d{[e^x]}}{\dx} = e^x \implies \int e^x \dx = e^x + c
\frac{\d{[\ln |x|]}}{\dx} = \frac{1}{x} \implies \int x^{-1} \dx = \ln |x| + c