# What is a piecewise continuous function?

Aug 15, 2015

A piecewise continuous function is a function that is continuous except at a finite number of points in its domain.

#### Explanation:

Note that the points of discontinuity of a piecewise continuous function do not have to be removable discontinuities. That is we do not require that the function can be made continuous by redefining it at those points. It is sufficient that if we exclude those points from the domain, then the function is continuous on the restricted domain.

For example, consider the function:

$s \left(x\right) = \left\{\begin{matrix}- 1 & \text{if x < 0" \\ 0 & "if x = 0" \\ 1 & "if x > 0}\end{matrix}\right.$

graph{(y - x/abs(x))(x^2+y^2-0.001) = 0 [-5, 5, -2.5, 2.5]}

This is continuous for all $x \in \mathbb{R}$ except $x = 0$

The discontinuity at $x = 0$ is not removable. We cannot redefine $s \left(x\right)$ at that point and get a continuous function.

At $x = 0$ the graph of the function 'jumps'. More formally, in the language of limits we find:

${\lim}_{x \to 0 +} s \left(x\right) = 1$

${\lim}_{x \to 0 -} s \left(x\right) = - 1$

So the left limit and right limit disagree with one another and with the value of the function at $x = 0$.

If we exclude the finite set of discontinuities from the domain, then the function restricted to this new domain will be continuous.

In our example, the definition of $s \left(x\right)$ as a function from $\left(- \infty , 0\right) \cup \left(0 , \infty\right) \to \mathbb{R}$ is continuous.

If we graph $s \left(x\right)$ restricted to this domain, it still looks like it is discontinuous at $0$, but $0$ is not part of the domain, so the 'jump' there is irrelevant. At any point, arbitrarily close to $0$, we can choose a little open interval around it in which the function is (constant and therefore) continuous.

Slightly confusingly, the function $\tan \left(x\right)$ is considered continuous - rather than piecewise continuous, because the asymptotes at $x = \frac{\pi}{2} + n \pi$ are excluded from the domain.

graph{tan(x) [-10.06, 9.94, -4.46, 5.54]}

Meanwhile, the sawtooth function $f \left(x\right) = x - \left\lfloor x \right\rfloor$ is not considered piecewise continuous as a function from $\mathbb{R}$ to $\mathbb{R}$, but is piecewise continuous on any finite open interval.

graph{3/5(abs(sin(x * pi/2))-abs(cos(x * pi/2))-abs(sin(x * pi/2)^3)/6+abs(cos(x * pi/2)^3)/6) * tan(x * pi/2)/abs(tan(x * pi/2))+1/2 [-2.56, 2.44, -0.71, 1.79]}