# Continuous Functions

In calculus, a **continuous function** is a real-valued function whose graph does not have any breaks or holes. Continuity lays the foundational groundwork for the intermediate value theorem and extreme value theorem. They are in some sense the ``nicest" functions possible, and many proofs in real analysis rely on approximating arbitrary functions by continuous functions.

## Definition

In calculus, knowing if the function is continuous is essential, because differentiation is only possible when the function is continuous. The concept of continuity is simple: If the graph of the function doesn't have any breaks or holes in it within a certain interval, the function is said to be continuous over that interval. Thus, simply drawing the graph might tell you if the function is continuous or not. However not all functions are easy to draw, and sometimes we will need to use the definition of continuity to determine a function's continuity. The mathematical definition of a continuous function is as follows:

For a function \(f(x)\) to be continuous at a point \(x=a\), it must satisfy all three of the following conditions:

\(\quad\)

(i)\(f(a)\) exists.\(\quad\)

(ii)\(\displaystyle{\lim_{x\rightarrow a}f(x)}\) exists.\(\quad\)

(iii)\(\displaystyle{\lim_{x\rightarrow a}f(x)}=f(a).\)

When we say a function f is continuous on [a,b], it means that for all elements in the interval, the above conditions are satisfied. But do note that for while trying to prove continuity on [a,b], we don't have to take into account LHL for 'a' and RHL for 'b' as the points to the left of a and to the right of b are not included in [a,b]. We only consider RHL for 'a' and LHL for 'b'.

## Examples

Here are a few example problems. Using the definition above, try to determine if they are continuous or not.

## Is the function \(\displaystyle{f(x)=\begin{cases}2x+1\ (x<3)\\3x-2\ (x\geq3)\end{cases}}\) continuous for all \(x\in\mathbb{R}?\)

We know that the graphs of \(y=2x+1\) and \(y=3x-2\) are continuous, so we only need to see if the function is continuous at \(x=3.\) The procedure is simply using the definition above, as follows:

(i)Since \(f(3)=3\times3-2=7,\) \(f(3)\) exists.

(ii)In order to see whether the limit exists or not, we have to check the limit from both sides. The left-hand and right-hand limits are\[\lim_{x\rightarrow3^{-}}f(x)=\lim_{x\rightarrow3^{-}}(2x+1)=2\times3+1=7 ~~\text{ and }~~ \lim_{x\rightarrow3^{+}}f(x)=\lim_{x\rightarrow3^{+}}(3x-2)=3\times3-2=7,\]

respectively. Because the limits from both sides are equal, \(\displaystyle{\lim_{x\rightarrow3}}f(x)\) exists.

(iii)Now from (i) and (ii), we have \(\displaystyle{\lim_{x\rightarrow3}}f(x)=f(3)=7,\) so the function is continuous at \(x=3.\) \( _\square \)

## Is the function \(\displaystyle{f(x)=\begin{cases}x+1&(x<2)\\x^2&(x=2)\\2x-1&(x>2)\end{cases}}\) continuous for all \(x\in\mathbb{R}?\)

We know that the graphs of \(y=x+1,\) \(y=x^2,\) and \(y=2x-1\) are continuous, so we only need to see if the function is continuous at \(x=2.\) Again we use the same procedure, as shown below:

(i)Since \(f(2)=2^2=4,\) \(f(2)\) exists.

(ii)The left-hand and right-hand limits are\[\begin{align} \displaystyle{\lim_{x\rightarrow2^{-}}}f(x)&=\displaystyle{\lim_{x\rightarrow2^{-}}}(x+1)=3\\ \displaystyle{\lim_{x\rightarrow2^{+}}}f(x)&=\displaystyle{\lim_{x\rightarrow2^{+}}}(2x-1)=3, \end{align}\]

respectively. Therefore, \(\displaystyle{\lim_{x\rightarrow2^{-}}}f(x)=\displaystyle{\lim_{x\rightarrow2^{+}}}f(x)=\displaystyle{\lim_{x\rightarrow3}}f(x)=3.\)

(iii)Now from (i) and (ii), we have \(\displaystyle{\lim_{x\rightarrow2}}f(x)\neq f(2),\) so the function is not continuous at \(x=2.\)The graph of the function would look like the figure above. Observe that there is a "hole" at \(x=2,\) which causes the discontinuity. \( _\square \)

## Is the function \(\displaystyle{f(x)=\begin{cases}-x^3+x+1\ (x\leq1)\\2x^2+3x-2\ (x>1)\end{cases}}\) continuous for all \(x\in\mathbb{R}?\)

We know that the graphs of \(y=-x^3+x+1\) and \(y=2x^2+3x-2\) are continuous, so we only need to see if the function is continuous at \(x=1.\)

(i)Since \(f(1)=1,\) \(f(1)\) exists.

(ii)The left-hand and right-hand limits are\[\begin{align} \displaystyle{\lim_{x\rightarrow1^{-}}}f(x)&=\displaystyle{\lim_{x\rightarrow1^{-}}}(-x^3+x+1)=1\\ \displaystyle{\lim_{x\rightarrow1^{+}}}f(x)&=\displaystyle{\lim_{x\rightarrow1^{+}}}(2x^2+3x-2)=3, \end{align}\]

respectively. Since the left-hand limit and right-hand limit are not equal, \(\displaystyle{\lim_{x\rightarrow1}}f(x)\) does not exist, so the function \(f(x)\) is not continuous at \(x=1.\)

The graph of the function would look like the figure above. Observe that there is a "break" at \(x=1,\) which causes the discontinuity. \( _\square \)

## Is the function \(\displaystyle{f(x)=\begin{cases}-\cos x&(x<0)\\e^x-2&(x\geq0)\end{cases}}\) continuous for all \(x\in\mathbb{R}?\)

We know that the graphs of \(y=-\cos x\) and \(y=e^x-2\) are continuous, so we only need to see if the function is continuous at \(x=0.\)

(i)Since \(f(0)=e^0-2=-1,\) \(f(0)\) exists.

(ii)The left-hand and right-hand limits are\[\begin{align} \displaystyle{\lim_{x\rightarrow0^{-}}}f(x)=\displaystyle{\lim_{x\rightarrow0^{-}}}(-\cos x)&=-1\\ \displaystyle{\lim_{x\rightarrow0^{+}}}f(x)=\displaystyle{\lim_{x\rightarrow0^{+}}}(e^x-2)&=-1, \end{align}\]

respectively. Therefore, \(\displaystyle{\lim_{x\rightarrow0^{-}}}f(x)=\displaystyle{\lim_{x\rightarrow0^{+}}}f(x)=\displaystyle{\lim_{x\rightarrow0}}f(x)=-1.\)

(iii)Now from (i) and (ii), we have \(\displaystyle{\lim_{x\rightarrow2}}f(x)= f(2)=-1,\) so the function is continuous at \(x=0.\) \( _\square \)

## Intermediate Value Theorem

Main Article: Intermediate value theorem

## Extreme Value Theorem

Main Article: Extreme value theorem

**Cite as:**Continuous Functions.

*Brilliant.org*. Retrieved from https://brilliant.org/wiki/continuous-functions/