### Limits part 2: Functions: All kinds of limits

### Continuity of functions

There is an important link between the different limits at a point.

For each \(a\in\mathbb R\) and every \(L\in \mathbb R \cup\{\pm\infty\}\) holds \[ \lim_{x\to a} f(x) = L\] if and only if \[\lim_{x\uparrow a} f(x) = \lim_{x\downarrow a} f(x) = L\]

Recall that the limit \(\lim_{x\to a}f(x) = L\) says nothing about the value \(f(a)\) because we only study \(x\) values that meet the condition \(0<|x-a|<\delta\). When the function value in \(a\) equals the limit at \(a\) then we say that the function is continuous at \(x=a\) .

A function \(f\) is **continuous at a point** \(x=a\) when \(a\) is an interior point of the domain of \(f\) and \[ \lim_{x\to a} f(x) = f(a) \]

Applying the theorem we just proved, this means that the left-hand limit and the right-hand limit both equal \(f(a)\).

We speak of a **continuous function** when the function is continuous at all points of its domain.

Elementary functions such as \(x^n, \sin(x), \cos(x),\) and \(e^x\) are continuous. Well-known functions such as \(\ln (x)\) and \(\tan(x)\) are not for each value of \(x\) defined, but they are continuous wherever they are well-defined.

If \(f\) and \(g\) are both continuous at \(x=a\) then \(f+g\) is also continuous at \(x=a\).

It directly follows that the sum of continuous functions is also continuous. The composition of two continuous functions, in other words \((f\circ g)(x) := f(g(x))\) is also continuously when both functions are continuous.

If \(g\) is continuous at \(x=a\) and \(f\) is continuous at \(x=g(a)\) then \(f\circ g\) is also continuous at \(x=a\).

From this it follows that the composition of continuous functions is again continuous. This means in essence that you can swap limits and continuous functions: \[ \lim_{x\to a} f( g(x)) = f\left( \lim_{x\to a} g(x) \right) \]

We close this paragraph with a few examples.

\[ \lim_{x\to\infty} \cos\left(\frac{1}{x}\right) = \cos (0) = 1 \]

If you already know that a function is continuous, then you can calculate limits in a simple manner. The example below illustrates this.

The function #f# is continuous and defined in the point #x=8#; hence \[\begin{aligned}\lim_{x\to8}f(x)&=f(8)\\[0.25cm]&=8^2+3\cdot 8+5\\[0.25cm]&=93\end{aligned}\]