Continuity

The definition Google finds for continuous is forming an unbroken whole; without interruption.

The concept in calculus, as transferred to functions, is similar. Roughly speaking, a continuous function is one whose graph could be drawn without having to lift (or interrupt) the pencil drawing it. nte( Consider these two graphs:

and

Though similar at some level - they agree at nearly every value of $x$ - the first has a "jump" from $-1$ to $1$ instead of the transition in the second one. The first is not continuous at $0$ - a break is needed to draw it - where as the second is continuous.

A formal definition was a bit harder to come to. At first the concept that for any $y$ between any two values in the range for $f(x)$, the function should take the value $y$ was included. Clearly this could distinguish the two graphs above, as one takes no values in $(-1,1)$, whereas the other - the continuous one - takes on all values in that range.

However, Cauchy defined continuity by $f(x + \alpha) - f(x)$ being small whenever $\alpha$ was small. This basically rules out "jumps" and proves more useful as a tool to describe continuity.

The modern definition simply pushes the details to the definition of the limit:

A function $f(x)$ is continuous at $x=c$ if $\lim_{x \rightarrow c}f(x) = f(c)$.

This says three things

This speaks to continuity at a point, we can extend this to continuity over an interval $(a,b)$ by saying:

A function $f(x)$ is continuous over $(a,b)$ if at each point $c$ with $a < c < b$, $f(x)$ is continuous at $c$.

Finally, as with limits, it can be convenient to speak of right continuity and left continuity at a point, where the limit in the defintion is replaced by a right or left limit, as appropriate.

Examples of continuity

Most familiar functions are continuous everywhere.

Some familiar functions are continuous but not everywhere.

Examples of discontinuity

There are various reasons why a function may not be continuous.

\[ ~ f(x) = \begin{cases} -1 & x < 0 \\ 0 & x = 0 \\ 1 & x > 0 \end{cases} ~ \]

is implemented by Julia's sign function. It has a value at $0$, but no limit at $0$, so is not continuous at $0$. Furthermore, the left and right limits exist at $0$ but are not equal to $f(0)$ so the function is not left or right continuous at $0$. It is continous everywhere except at $x=0$.

is not continuous at $x=0$. It has a limit of $0$ at $0$, a function value $f(0) =1/2$, but the limit and the function value are not equal.

\[ ~ f(x) = \begin{cases} 0 & \text{if } x \text{ is irrational,}\\ 1 & \text{if } x \text{ is rational.} \end{cases} ~ \]

The limit for any $c$ is discontinuous, as any interval about $c$ will contain both rational and irrational numbers so the function will not take values in a small neighborhood around any potential $L$.

Example

Let a function be defined by cases:

\[ ~ f(x) = \begin{cases} 3x^2 + c & x \geq 0,\\ 2x-3 & x < 0. \end{cases} ~ \]

What value of $c$ will make $f(x)$ a continuous function?

To be continuous we not that for $x < 0$ and for $x > 0$ the function is a simple polynomial, so is continous. At $x=0$ to be continuous we need a limit to exists and be equal to $f(0)$, which is $c$. A limit exists if the left and right limits are equal. This means we need to solve for $c$ to make the left and right limits equal.

using CalculusWithJulia   # load `SymPy`
using Plots
@vars x c
ex1 = 3x^2 + c
ex2 = 2x-3
del = limit(ex1, x=>0, dir="+") - limit(ex2, x=>0, dir="-")
\begin{equation*}c + 3\end{equation*}

We need to solve for $c$ to make del zero:

solve(del, c)
\[ \left[ \begin{array}{r}-3\end{array} \right] \]

This gives the value of $c$.

Rules for continuity

As we've seen, functions can be combined in several ways. How do these relate with continuity?

Suppose $f(x)$ and $g(x)$ are both continuous on $(a,b)$. Then

So, continuity is preserved for all of the basic operations except when dividing by $0$.

Examples

Questions

Question

Let $f(x) = \sin(x)$ and $g(x) = \cos(x)$. Which of these is not continuous everywhere?

\[ ~ f+g,~ f-g,~ f\cdot g,~ f\circ g,~ f/g ~ \]

Question

Let $f(x) = \sin(x)$, $g(x) = \sqrt{x}$.

When will $f\circ g$ be continuous?

When will $g \circ f$ be continuous?

Question

The composition $f\circ g$ will be continuous everywhere provided:

Question

At which values is $f(x) = 1/\sqrt{x-2}$ not continuous?

Question

A value $x=c$ is a removable singularity for $f(x)$ if $f(x)$ is not continuous at $c$ but will be if $f(c)$ is redefined to be $\lim_{x \rightarrow c} f(x)$.

The function $f(x) = (x^2 - 4)/(x-2)$ has a removable singularity at $x=2$. What value would we redefine $f(2)$ to be, to make $f$ a continuous function?

Question

The highly oscillatory function

\[ ~ f(x) = x^2 (\cos(1/x) - 1) ~ \]

has a removable singularity at $x=0$. What value would we redefine $f(0)$ to be, to make $f$ a continuous function?

Question

Let $f(x)$ be defined by

\[ ~ f(x) = \begin{cases} c + \sin(2x - \pi/2) & x > 0\\ 3x - 4 & x \leq 0. \end{cases} ~ \]

What value of $c$ will make $f(x)$ continuous?

Question

Suppose $f(x)$, $g(x)$, and $h(x)$ are continuous functions on $(a,b)$. If $a < c < b$, are you sure that $lim_{x \rightarrow c} f(g(x))$ is $f(g(c))$?

Question

Consider the function $f(x)$ given by the following graph

The function $f(x)$ is continous at $x=1$?

The function $f(x)$ is continous at $x=2$?

The function $f(x)$ is right continous at $x=3$?

The function $f(x)$ is left continous at $x=4$?

Question

Let $f(x)$ and $g(x)$ be continuous functions whose graph of $[0,1]$ is given by:

What is $\lim_{x \rightarrow 0.25} f(g(x))$?

What is $\lim{x \rightarrow 0.25} g(f(x))$?

What is $\lim_{x \rightarrow 0.5} f(g(x))$?