# Calculus/Continuity

 ← Infinite Limits Calculus Formal Definition of the Limit → Continuity

## Defining Continuity

We are now ready to define the concept of a function being continuous. The idea is that we want to say that a function is continuous if you can draw its graph without taking your pencil off the page. But sometimes this will be true for some parts of a graph but not for others. Therefore, we want to start by defining what it means for a function to be continuous at one point. The definition is simple, now that we have the concept of limits:

Definition: (continuity at a point)

If ${\displaystyle f(x)}$ is defined on an open interval containing ${\displaystyle c}$ , then ${\displaystyle f(x)}$ is said to be continuous at ${\displaystyle c}$ if and only if

${\displaystyle \lim _{x\to c}f(x)=f(c)}$ .

Note that for ${\displaystyle f}$ to be continuous at ${\displaystyle c}$, the definition in effect requires three conditions:

1. that ${\displaystyle f}$ is defined at ${\displaystyle c}$ , so ${\displaystyle f(c)}$ exists,
2. the limit as ${\displaystyle x}$ approaches ${\displaystyle c}$ exists, and
3. the limit and ${\displaystyle f(c)}$ are equal.

If any of these do not hold then ${\displaystyle f}$ is not continuous at ${\displaystyle c}$ .

The idea of the definition is that the point of the graph corresponding to ${\displaystyle c}$ will be close to the points of the graph corresponding to nearby ${\displaystyle x}$-values. Now we can define what it means for a function to be continuous in general, not just at one point.

Definition: (continuity)
A function is said to be continuous on ${\displaystyle (a,b)}$ if it is continuous at every point of the interval ${\displaystyle (a,b)}$ .

We often use the phrase "the function is continuous" to mean that the function is continuous at every real number. This would be the same as saying the function was continuous on ${\displaystyle (-\infty ,\infty )}$ , but it is a bit more convenient to simply say "continuous".

Note that, by what we already know, the limit of a rational, exponential, trigonometric or logarithmic function at a point is just its value at that point, so long as it's defined there. So, all such functions are continuous wherever they're defined. (Of course, they can't be continuous where they're not defined!)

## Discontinuities

A discontinuity is a point where a function is not continuous. There are lots of possible ways this could happen, of course. Here we'll just discuss two simple ways.

### Removable discontinuities

The function ${\displaystyle f(x)={\frac {x^{2}-9}{x-3}}}$ is not continuous at ${\displaystyle x=3}$ . It is discontinuous at that point because the fraction then becomes ${\displaystyle {\frac {0}{0}}}$ , which is undefined. Therefore the function fails the first of our three conditions for continuity at the point 3; 3 is just not in its domain.

However, we say that this discontinuity is removable. This is because, if we modify the function at that point, we can eliminate the discontinuity and make the function continuous. To see how to make the function ${\displaystyle f(x)}$ continuous, we have to simplify ${\displaystyle f(x)}$ , getting ${\displaystyle f(x)={\frac {x^{2}-9}{x-3}}={\frac {(x+3)(x-3)}{(x-3)}}={\frac {x+3}{1}}\cdot {\frac {x-3}{x-3}}}$ . We can define a new function ${\displaystyle g(x)}$ where ${\displaystyle g(x)=x+3}$ . Note that the function ${\displaystyle g(x)}$ is not the same as the original function ${\displaystyle f(x)}$ , because ${\displaystyle g(x)}$ is defined at ${\displaystyle x=3}$ , while ${\displaystyle f(x)}$ is not. Thus, ${\displaystyle g(x)}$ is continuous at ${\displaystyle x=3}$ , since ${\displaystyle \lim _{x\to 3}(x+3)=6=g(3)}$ . However, whenever ${\displaystyle x\neq 3}$ , ${\displaystyle f(x)=g(x)}$ ; all we did to ${\displaystyle f}$ to get ${\displaystyle g}$ was to make it defined at ${\displaystyle x=3}$ .

In fact, this kind of simplification is often possible with a discontinuity in a rational function. We can divide the numerator and the denominator by a common factor (in our example ${\displaystyle x-3}$) to get a function which is the same except where that common factor was 0 (in our example at ${\displaystyle x=3}$). This new function will be identical to the old except for being defined at new points where previously we had division by 0.

However, this is not possible in every case. For example, the function ${\displaystyle f(x)={\frac {x-3}{x^{2}-6x+9}}}$ has a common factor of ${\displaystyle x-3}$ in both the numerator and denominator, but when you simplify you are left with ${\displaystyle g(x)={\frac {1}{x-3}}}$ , which is still not defined at ${\displaystyle x=3}$ . In this case the domain of ${\displaystyle f(x)}$ and ${\displaystyle g(x)}$ are the same, and they are equal everywhere they are defined, so they are in fact the same function. The reason that ${\displaystyle g(x)}$ differed from ${\displaystyle f(x)}$ in the first example was because we could take it to have a larger domain and not simply that the formulas defining ${\displaystyle f(x)}$ and ${\displaystyle g(x)}$ were different.

### Jump discontinuities

Not all discontinuities can be removed from a function. Consider this function:

${\displaystyle k(x)={\begin{cases}1&{\text{if }}x>0\\-1&{\text{if }}x\leq 0\end{cases}}}$

Since ${\displaystyle \lim _{x\to 0}k(x)}$ does not exist, there is no way to redefine ${\displaystyle k}$ at one point so that it will be continuous at 0. These sorts of discontinuities are called nonremovable discontinuities.

Note, however, that both one-sided limits exist; ${\displaystyle \lim _{x\to 0^{-}}k(x)=-1}$ and ${\displaystyle \lim _{x\to 0^{+}}k(x)=1}$ . The problem is that they are not equal, so the graph "jumps" from one side of 0 to the other. In such a case, we say the function has a jump discontinuity. (Note that a jump discontinuity is a kind of nonremovable discontinuity.)

## One-Sided Continuity

Just as a function can have a one-sided limit, a function can be continuous from a particular side. For a function to be continuous at a point from a given side, we need the following three conditions:

1. the function is defined at the point.
2. the function has a limit from that side at that point.
3. the one-sided limit equals the value of the function at the point.

A function will be continuous at a point if and only if it is continuous from both sides at that point. Now we can define what it means for a function to be continuous on a closed interval.

Definition: (continuity on a closed interval)

A function is said to be continuous on ${\displaystyle [a,b]}$ if and only if

1. it is continuous on ${\displaystyle (a,b)}$ .
2. it is continuous from the right at ${\displaystyle a}$ .
3. it is continuous from the left at ${\displaystyle b}$ .

Notice that, if a function is continuous, then it is continuous on every closed interval contained in its domain.

## Intermediate Value Theorem

A useful theorem regarding continuous functions is the following:

Intermediate Value Theorem
If a function ${\displaystyle f}$ is continuous on a closed interval ${\displaystyle [a,b]}$ , then for every value ${\displaystyle y}$ between ${\displaystyle f(a)}$ and ${\displaystyle f(b)}$ there is a value ${\displaystyle c\in (a,b)}$ such that ${\displaystyle f(c)=y}$ .

### Application: bisection method

A few steps of the bisection method applied over the starting range ${\displaystyle [a_{1},b_{1}]}$ . The bigger red dot is the root of the function.

The bisection method is the simplest and most reliable algorithm to find zeros of a continuous function.

Suppose we want to solve the equation ${\displaystyle f(x)=0}$ . Given two points ${\displaystyle a}$ and ${\displaystyle b}$ such that ${\displaystyle f(a)}$ and ${\displaystyle f(b)}$ have opposite signs, the intermediate value theorem tells us that ${\displaystyle f}$ must have at least one root between ${\displaystyle a}$ and ${\displaystyle b}$ as long as ${\displaystyle f}$ is continuous on the interval ${\displaystyle [a,b]}$. If we know ${\displaystyle f}$ is continuous in general (say, because it's made out of rational, trigonometric, exponential and logarithmic functions), then this will work so long as ${\displaystyle f}$ is defined at all points between ${\displaystyle a}$ and ${\displaystyle b}$ . So, let's divide the interval ${\displaystyle [a,b]}$ in two by computing ${\displaystyle c={\frac {a+b}{2}}}$ . There are now three possibilities:

1. ${\displaystyle f(c)=0}$ ,
2. ${\displaystyle f(a)}$ and ${\displaystyle f(c)}$ have opposite signs, or
3. ${\displaystyle f(c)}$ and ${\displaystyle f(b)}$ have opposite signs.

In the first case, we're done. In the second and third cases, we can repeat the process on the sub-interval where the sign change occurs. In this way we hone in to a small sub-interval containing the 0. The midpoint of that small sub-interval is usually taken as a good approximation to the 0.

Note that, unlike the methods you may have learned in algebra, this works for any continuous function that you (or your calculator) know how to compute.

 ← Infinite Limits Calculus Formal Definition of the Limit → Continuity