# Integral

### Definition

$$\int f'(x) \, dx = f(x) + C$$

### Identities

$$\begin{array}{ll} \int a \, f(x) \, dx = a \int f(x) \, dx & \int (f(x) + g(x)) \, dx = \int f(x) \, dx + \int g(x) \, dx \\[12pt] \int x^a \, dx = \frac{x^{a + 1}}{a + 1} + C & \int e^{x} \, dx = e^x + C \\ \int x^{-1} \, dx = \ln |x| + C & \int a^{x} \, dx = \frac{a^x}{\ln a} + C \\[12pt] \int \sin x \, dx = -\cos x + C & \int \frac{\sin x}{\cos^2 x} \, dx = \frac{1}{\cos x} + C \\ \int \cos x \, dx = \sin x + C & \int \frac{\cos x}{\sin^2 x} \, dx = \frac{1}{\sin x} + C \\[12pt] \int \frac{1}{\sin^2 x} \, dx = -\cot x + C & \int \frac{1}{\sqrt{a^2 - x^2}} \, dx = \sin^{-1} \frac{x}{a} + C \\ \int \frac{1}{\cos^2 x} \, dx = \tan x + C & \int \frac{1}{a^2 + x^2} \, dx = \frac{1}{a} \tan^{-1} \frac{x}{a} + C \\[12pt] \int_a^b f'(x) \, dx = f(b) - f(a) & \int_0^a f(x) \, dx = \int_0^a f(a - x) \, dx \end{array}$$

### Integration by substitution

$$\int \sin\left(\frac{\pi}{2}x\right) \, dx = \int \frac{2}{\pi} \sin u \, du = -\frac{2}{\pi} \cos\left(\frac{\pi}{2}x\right) + C \quad \color{red}{u = \frac{\pi}{2}x \quad du = \frac{\pi}{2}dx}$$
$$\int \frac{x}{\sqrt{x^2 + 16}} \, dx = \int \frac{1}{2} \frac{1}{\sqrt{u}} \, du = \sqrt{x^2 + 16} + C \quad \color{red}{u = x^2 + 16 \quad du = 2x\,dx}$$
$$\int \frac{x}{(3 - x^2)^4} \, dx = \int -\frac{1}{2} \frac{1}{u^4} \, du = \frac{1}{6(3 - x^2)^3} + C \quad \color{red}{u = 3 - x^2 \quad du = -2x\,dx}$$

### Integration by parts

$$\int u \, dv = uv - \int v \, du$$
$$\int x\cos x \, dx = x\sin x - \int \sin x \cdot 1 \, dx = x\sin x + \cos x + C \quad \color{red}{u = x \quad dv = \cos x\,dx}$$

### Riemann sum

Let $[a, b]$ be partitioned by points $a < x_1 < x_2 < \ldots < x_{n-1} < b$ , where the lengths of the resulting intervals between the points are denoted $\Delta x_1, \Delta x_2, \ldots, \Delta x_n$ . Let $x_k^*$ be an arbitrary point in the $k$-th subinterval. Then the quantity
$$\sum_{k = 1}^n f(x_k^*)\Delta x_k$$
is called a Riemann sum for a given function $f(x)$ and partition, and the value $\max\Delta x_k$ is called the mesh size of the partition.
Different types of Riemann sum (left, right, upper...) employ different methods of choosing the height of a partition. In case of the upper Riemann sum it's a supremum (the largest value) of $f(x)$ on each interval, which bounds a corresponding partition.
If the limit of a Riemann sum exists as $\max\Delta x_k\rightarrow 0$ , this limit is known as the Riemann integral of $f(x)$ over $[a, b]$.
Example:
\begin{align} \int_a^b (2x - x^2)\,dx & = \lim_{n\rightarrow\infty} \sum_{k = 1}^n \frac{b - a}{n} \left(2\left(a + k \frac{b - a}{n}\right) - \left(a + k \frac{b - a}{n}\right)^2\right) \\ & = \lim_{n\rightarrow\infty} \frac{b - a}{n} \left(2an - a^2 n + 2 \frac{b - a}{n} \sum_{k = 1}^n k - 2a \frac{b - a}{n} \sum_{k = 1}^n k - \left(\frac{b - a}{n}\right)^2 \sum_{k = 1}^n k^2\right) \\ & = \lim_{n\rightarrow\infty} (b - a) \left(2a - a^2 + \frac{(b - a)(n + 1)(2 - 2a)}{2n} - \frac{(b - a)^2(n + 1)(2n + 1)}{6n^2}\right) \\ & = (b - a)\left(2a - a^2 + \frac{2(b - a)(1 - a)}{2} - \frac{(b - a)^2}{3}\right) \\ & = \frac{a^3 - b^3}{3} - a^2 + b^2 \end{align}
Important identity:
$$\int_0^1 f(x)\,dx = \lim_{n\rightarrow\infty} \frac{1}{n} \sum_{k = 1}^n f\left(\frac{k}{n}\right)$$

### Arc length

The length of an arc of a curve $y = f(x)$ from $x = a$ to $x = b$ is:
$\displaystyle L = \int_a^b \sqrt{1 + (f'(x))^2} \, dx$
The length of an arc of a parametric curve $x = x(t), \, y = y(t)$ from $t = \alpha$ to $t = \beta$ is:
$\displaystyle L = \int_\alpha^\beta \sqrt{(x'(t))^2 + (y'(t))^2} \, dt$

### Volume of revolution

The volume of a revolution of a curve $y = f(x)$ from $x = a$ to $x = b$ about the $x$-axis is:
$\displaystyle V = \pi \int_a^b (f(x))^2 \, dx$

### Area of revolution

The area of a revolution of a curve $y = f(x)$ from $x = a$ to $x = b$ about the $x$-axis is:
$\displaystyle A = 2\pi \int_a^b |f(x)| \sqrt{1 + (f'(x))^2} \, dx$
The area of a revolution of a parametric curve $x = x(t), \, y = y(t)$ from $t = \alpha$ to $t = \beta$ about the $x$-axis is:
$\displaystyle A = 2\pi \int_\alpha^\beta |y(t)| \sqrt{(x'(t))^2 + (y'(t))^2} \, dt$