# Antiderivatives
An antiderivative is useful when you know the rate of change, and you want to find a point from that rate of change

> A function $F$ is said to be an *antiderivative* of $f$ if $F'(x) = f(x)$ 
## Notation
The collection of all antiderivatives of a function $f$ is referred to as the *indefinite integral of $f$ with respect to $x$*, and is denoted by:
$$ \int f(x) dx $$
## Examples
> Find the antiderivative of the function $y = x^2$

1. We know that to find the derivative of the above function, you'd multiply by the exponent ($2$), and subtract 1 from the exponent.
2. To perform this operation in reverse:
	1. Add 1 to the exponent
	2. Multiply by $\dfrac{1}{n + 1}$
3. This gives us an antiderivative of $\dfrac{1}{3}x^3$ 
4. To check our work, work backwards.
5. The derivative of $\dfrac{1}{3}x^3$ is $\dfrac{1}{3} (3x^2)$
6. $= \dfrac{3}{3} x^2$


## Formulas

| Differentiation Formula                               | Integration Formula                                      |
| ----------------------------------------------------- | -------------------------------------------------------- |
| $\dfrac{d}{dx} x^n = nx^{x-1}$                        | $\int x^n dx = \dfrac{1}{n+1}x^{n+1}+ C$ for $n \ne -1$  |
| $\dfrac{d}{dx} kx = k$                                | $\int k \space dx = kx + C$                              |
| $\dfrac{d}{dx} \ln \|x\| = \dfrac{1}{x}$              | <br>$\int \dfrac{1}{x}dx = \ln \|x\| + C$                |
| $\dfrac{d}{dx} e^x = e^x$                             | <br>$\int e^x dx = e^x + C$                              |
| $\dfrac{d}{dx} a^x = (\ln{a}) a^x$                    | $\int a^xdx = \ln \|x\| + C$                             |
| $\dfrac{d}{dx} \sin x = \cos x$                       | $\int \cos(x) dx  = \sin (x) + C$                        |
| $\dfrac{d}{dx} \cos x = -\sin x$                      | $\int \sin(x)dx = \sin x + C$                            |
| $\dfrac{d}{dx} \tan{x} = \sec^2 x$                    | $\int \sec^2(x)dx = \tan(x) + C$                         |
| $\dfrac{d}{dx} \sec x = \sec x \tan x$                | $\int sec^2(x) dx = \sec(x) + C$                         |
| $\dfrac{d}{dx} \sin^{-1} x = \dfrac{1}{\sqrt{1-x^2}}$ | $\int \sec(x) \tan(x) dx = \sec x + C$                   |
| $\dfrac{d}{dx} \tan^{-1} x = \dfrac{1}{1+x^2}$        | $\int \dfrac{1}{\sqrt{1+x^2}}dx = \tan^{-1}x + C$        |
| $\dfrac{d}{dx} k f(x) = k f'(x)$                      | $\int k*f(x)dx = k\int f(x)dx$                           |
| $\dfrac{d}{dx} f(x) \pm g(x) = f'(x) \pm g'(x)$       | $\int (f(x) \pm g(x))dx = \int f(x) dx \pm \int g(x) dx$ |
# Area Under a Curve
The area under the curve $y = f(x)$ can be approximated by the equation $\sum_{i = 1}^n f(\hat{x_i})\Delta x$ where $\hat{x_i}$ is any point on the interval $[x_{i - 1}, x_i]$, and the curve is divided into $n$ equal parts of width $\Delta x$

Any sum of this form is referred to as a Reimann Sum.

To summarize:
- The area under a curve is equal to the sum of the area of $n$ rectangular subdivisions where each rectangle has a width of $\Delta x$ and a height of $f(x)$.
# Definite Integrals
Let $f$ be a continuous function on the interval $[a, b]$. Divide $[a, b]$ into $n$ equal parts of width $\Delta x = \dfrac{b - a}{n}$ . Let $x_0, x_1, x_2, \cdots, x_3$ be the endpoints of the subdivision.

The definite integral of $f(x)$ with respect to $x$ from $x = a$ to $x = b$ can be denoted:
$$ \int_{a}^b f(x) dx $$

And __can__ be defined as:
$$ \int_a^b f(x) dx = \lim_{n \to \infty} \sum_{i = 1}^n f(x_i)\Delta x$$

$f(x_i)$ is the *height* of each sub-interval, and $\Delta x$ is the change in the *x* interval, so $f(x_i) \Delta x$ is solving for the area of each sub-interval.

## Examples
> Find the exact value of the integral $\int_0^1 5x \space dx$ 

Relevant formulas:
$$ \sum_{i = 1}^n = \dfrac{(n)(n + 1)}{2} $$
$$ \Delta x = \dfrac{1 - 0}{n} = \dfrac{1}{n}$$$$ x_i = 0 + \Delta xi + \dfrac{1}{n} \cdot i$$
1. $\int_0^1 5x \space dx = \lim_{n \to \infty} \sum_{i=1}^n 5(x_i) \cdot \Delta x$
2. $= \lim_{n \to \infty} \sum_{i=1}^n 5(\frac{1}{n} \cdot i) \cdot \frac{1}{n}$ 
3. $= \lim_{n \to \infty} \sum_{i = 1}^n \dfrac{5}{n^2}\cdot i$ 
4. $= \lim_{n \to \infty} \dfrac{5}{n^2} \sum_{i = 1}^n i$
5. $= \lim_{x \to \infty} \dfrac{5}{n^2} \cdot \dfrac{n(n + 1)}{2}$ 
6. $= \lim_{n \to \infty} \dfrac{5n^2 + 5n}{2n^2}$
7. $= \dfrac{5}{2}$