# Introduction
Every mathematical function can be thought of as a set of ordered pairs, or an input value and an output value.
- Examples include $f(x) = x^2 + 2x + 1$, and $\{(1, 3), (2, 5), (4, 7)\}$.

**A limit describes how a function behaves *near* a point, rather than *at* that point.***
- As an example, given a *well behaved function* $f(x)$ and the fact that:
	- $f(1.9) = 8.41$
	- $f(1.999) = 8.99401$
	- $f(2.1) = 9.61$
	- $f(2.01) = 9.061$
	- $f(2.0001) = 9.0006$
	We can note that the smaller the distance of the input value $x$ to $2$, the smaller the distance of the output to $9$. This is most commonly described in the terms "As $x$ approaches $2$, $f(x)$ approaches $9$", or "As $x \to 2$, $f(x) \to 9$."

Limits are valuable because they can be used to describe a point on a graph, even if that point is not present.
# Standard Notation
The standard notation for a limit is:
$$ \lim_{x \to a} f(x) = L $$
- As $x$ approaches $a$, the output of $f(x)$ draws closer to $L$. In the above notation, $x$ and $a$ are not necessarily equal.
- When plotted, the hole is located at $(a, L)$.
# Indeterminate Limits
If they have a limit of the form $lim_{x \to a} \frac{f(x)}{g(x)}$ where both $f(x) \to 0$ and $g(x) \to 0$ as $x \to a$ then this limit **may or may not** exist and is said to be an indeterminate form of type $\dfrac{0}{0}$.
To find this limit if it exists we must perform some mathematical manipulations on the quotient in order to change the form of the function. Some of the manipulations that can be tried are:
- Factor or Foil polynomials and try dividing out a common factor.
- Multiply numerator and denominator by the conjugate of a radical expression
- Combine fractions in the numerator or denominator of a complex fraction

# Limits of the Form $\frac{k}{0}, k \ne 0$
If we have a one sided limit of the form $\lim_{x \to a^*} \frac{f(x)}{g(x)}$ $f(x) \to k (k \ne 0)$ and $g(x) \to 0$ as $x \to a$ then:
$$ \lim_{x \to a^*} \frac{f(x)}{g(x)} = \infty \space or \space \lim_{x \to a^*} \frac{f(x)}{g(x)} = -\infty $$
# Limits of the Form $\frac{\infty}{\infty}$
If we have a limit of the form $\lim_{x \to a} \frac{f(x)}{g(x)}$ where both $f(x) \to \infty$ and $g(x) \to \infty$ as $x \to a$ then the limit may or may not exist and is said to be an indeterminate form of type $\frac{\infty}{\infty}$.

To find the limit if it exists we must perform some algebraic manipulations on the quotient in order to change the form of the function.

If $f(x)$ and $g(x)$ are polynomials, then we can multiply the numerator and denominator by $\dfrac{1}{x^n}$, where $n$ is the degree of the polynomial in the denominator. 
# Continuity
A function is continuous if their graph can be traced with a pencil without lifting the pencil from the page.

Formally, a function $f$ is continuous at a point $a$ if:
- $f(a)$ is defined
- $\lim_{x \to a} f(x)$  exists
- $\lim_{x \to a} = f(a)$

- A function is continuous on the open interval $(a, b)$ if it is continuous at all points between $a$ and $b$
- A function is continuous on the closed interval $[a, b]$ if it is continuous at all points between $a$ and $b$

# Elementary Functions
An elementary function is any function that is defined using:
- Polynomial functions
- Rational functions
- Root functions
- Trig functions
- Inverse trig functions
- Exponential functions
- Logarithmic functions
- Operations of:
	- Addition
	- Subtraction
	- Multiplication
	- Division
	- Composition

A piece-wise function is *not*  considered an elementary function

- If $f$ and $g$ are continuous at a point $x = a$ and $c$ is a constant then the following functions are also continuous at $x = a$
- If $g$ is continuous at $a$ and $f$ is continuous at $g(a)$, then $f(g(a))$ is continuous at $a$
- If $f$ is an elementary function and if $a$ is in the domain of $f$, then $f$ is continuous at $a$
Together, the above theorems tell us that if $a$ is in the domain of an elementary function, then $\lim_{x \to a} f(x) = f(a)$.

# Intermediate Value Theorem
Let $f$ be a continuous function on the interval $[a, b]$ and let $N$ be any number strictly between $f(a)$ and $f(b)$. Then there exists a number $c$ in $(a, b)$ such that $f(c) = N$.

# Definitions

| Term                  | Definition                                                                    |
| --------------------- | ----------------------------------------------------------------------------- |
| Well behaved function | A function that is continuous, has a single value, and is defined everywhere. |


# L'Hospital's Rule
If you have a limit of the indeterminate form $\dfrac{0}{0}$, the limit can be found by taking the derivative of the numerator, divided by the derivative of the denominator.
$$ \lim_{x \to 2} \dfrac{x-2}{x^2-4} = \lim_{x \to 2} \dfrac{1}{2x}$$

L'Hospital's Rule can also be used when both the numerator and denominator approach some form of infinity.
$$ \lim_{x \to \infty} \dfrac{x^2-2}{3x^2-4} = \lim_{x \to \infty} \dfrac{2x}{6x}$$
The above problem can be solved more easily *without* L'Hospital's rule, the leading coefficients are 1/3, so the limit as $x$ approaches $\infty$ is 1/3.

L'Hospital's rule **cannot** be used in any other circumstance. 

## Examples
1. $\lim_{x \to 0} \dfrac{7^x - 5^x}{2x}$
2. $= \lim_{x \ to 0}\dfrac{7^x \ln(7) -5^x(\ln(5)}{2}$
3. $= \dfrac{\ln(7) - \ln(5)}{2}$ 
# Indeterminate form $(0 * \infty)$
If the $\lim_{x \to a}f(x) = 0$  and $\lim_{x\to a} g(x) = \infty$ then $\lim_{x \to a}(f(x) * g(x)$ may or may not exist.

To evaluate an indeterminate product ($0 * \infty$), use algebra to convert the product to an equivalent quotient and then use L'Hopsital's Rule.

$$ \lim_{x \to 0^+} x\ln(x) = \lim_{x \to 0^+}\dfrac{\ln x}{\dfrac{1}{x}} = \lim_{x \to 0^+} \dfrac{1/x}{-1/(x^2)} = \lim_{x \to 0^+} -x = 0 $$
# Indeterminate form $(\infty - \infty)$:
If the $\lim_{x \to a}f(x) = \infty$  and $\lim_{x \to a} (g(x)) = \infty$ , then $\lim_{x \to a}(f(x) - g(x))$ may or may not exist.

# Indeterminate Powers
When considering the $\lim_{x \to a} f(x)^{g(x)}$, the following are indeterminate:
- $0^0$
- $\infty^0$
- $1^\infty$ 

1. $\lim_{x \to 0^+} x^x$ 
2. $= \lim_{x \to 0} e^{\ln(x^x)}$ - wrap $e^{\ln{x}}$ around the function
3. $= e^{\lim_{x \to 0} x \ln(x)}$ -use L'Hospital's rule

