# Calculus

Calculus

### Intermediate value theorem

If $f(x)$ is continuous on $[a, b]$, and $c$ is in $(f(a), f(b))$, then there is at least one $x$ in $[a, b]$ such that $f(x) = c$ .

### Mean value theorem

Let $f(x)$ be differentiable on $(a, b)$ and continuous on $[a, b]$. Then there is at least one point $c$ in $(a, b)$ such that:
$$f'(c) = \frac{f(b) - f(a)}{b - a}$$

### Rolle's theorem

Special case of the mean-value theorem, when $f(a) = f(b) \Rightarrow f'(c) = 0$, hence, there exists a point in $(a, b)$ which has a horizontal tangent.

### Fundamental theorem of calculus

The first fundamental theorem of calculus states that, if $f$ is continuous on $[a, b]$ and $F$ is the indefinite integral of $f$ on $[a, b]$, then:
$$\int_a^b f(x) \, dx = F(b) - F(a)$$
The second fundamental theorem of calculus states that, if $f$ is a continuous function on $(a, b)$, $c$ is a point in $(a, b)$ and $F$ is defined by:
$$F(x) = \int_c^x f(y) \, dy$$
then $F'(x) = f(x)$ at each point in $(a, b)$.

### Extreme value theorem

If a function $f(x)$ is continuous on $[a, b]$, then $f(x)$ has both a maximum and a minimum on $[a, b]$. If $f(x)$ has an extremum on $[a, b]$, then the extremum occurs at a critical point.

### Trapezoidal rule

If a function $f(x)$ is continuous and $\geqslant 0$ on $[a, b]$, then it can be approximated this way:
$$\int_a^b f(x) dx \approx \frac{b - a}{2n} (f(x_0) + 2f(x_1) + 2f(x_2) + \,\cdots\, + 2f(x_{n - 1}) + 2f(x_n))$$
for any $n \in \mathbb{Z}$ .

### Simpson's rule

Again, if a function $f(x)$ is continuous and $\geqslant 0$ on $[a, b]$, then it can be approximated this way:
$$\int_a^b f(x) dx \approx \frac{b - a}{3n} (f(x_0) + 4f(x_1) + 2f(x_2) + 4f(x_3) + 2f(x_4) + \,\cdots\, + 4f(x_{n - 1}) + 2f(x_n))$$
for any even $n \in \mathbb{Z}$ .