# 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 $f(x)$  is defined on an open interval containing $c$  , then $f(x)$  is said to be continuous at $c$  if and only if $\lim _{x\to c}f(x)=f(c)$  .

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

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

If any of these do not hold then $f$  is not continuous at $c$  .

The idea of the definition is that the point of the graph corresponding to $c$  will be close to the points of the graph corresponding to nearby $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 $(a,b)$  if it is continuous at every point of the interval $(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 $(-\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 $f(x)={\frac {x^{2}-9}{x-3}}$  is not continuous at $x=3$  . It is discontinuous at that point because the fraction then becomes ${\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 $f(x)$  continuous, we have to simplify $f(x)$  , getting $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 $g(x)$  where $g(x)=x+3$  . Note that the function $g(x)$  is not the same as the original function $f(x)$  , because $g(x)$  is defined at $x=3$  , while $f(x)$  is not. Thus, $g(x)$  is continuous at $x=3$  , since $\lim _{x\to 3}(x+3)=6=g(3)$  . However, whenever $x\neq 3$  , $f(x)=g(x)$  ; all we did to $f$  to get $g$  was to make it defined at $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 $x-3$ ) to get a function which is the same except where that common factor was 0 (in our example at $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 $f(x)={\frac {x-3}{x^{2}-6x+9}}$  has a common factor of $x-3$  in both the numerator and denominator, but when you simplify you are left with $g(x)={\frac {1}{x-3}}$  , which is still not defined at $x=3$  . In this case the domain of $f(x)$  and $g(x)$  are the same, and they are equal everywhere they are defined, so they are in fact the same function. The reason that $g(x)$  differed from $f(x)$  in the first example was because we could take it to have a larger domain and not simply that the formulas defining $f(x)$  and $g(x)$  were different.

### Jump discontinuities

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

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

Since $\lim _{x\to 0}k(x)$  does not exist, there is no way to redefine $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; $\lim _{x\to 0^{-}}k(x)=-1$  and $\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 $[a,b]$  if and only if

1. it is continuous on $(a,b)$  .
2. it is continuous from the right at $a$  .
3. it is continuous from the left at $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 $f$  is continuous on a closed interval $[a,b]$  , then for every value $y$  between $f(a)$  and $f(b)$  there is a value $c\in (a,b)$  such that $f(c)=y$  .

### Application: bisection method A few steps of the bisection method applied over the starting range [ a 1 , b 1 ] {\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 $f(x)=0$  . Given two points $a$  and $b$  such that $f(a)$  and $f(b)$  have opposite signs, the intermediate value theorem tells us that $f$  must have at least one root between $a$  and $b$  as long as $f$  is continuous on the interval $[a,b]$ . If we know $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 $f$  is defined at all points between $a$  and $b$  . So, let's divide the interval $[a,b]$  in two by computing $c={\frac {a+b}{2}}$  . There are now three possibilities:

1. $f(c)=0$  ,
2. $f(a)$  and $f(c)$  have opposite signs, or
3. $f(c)$  and $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