12 Ordinary Differential Equations
For example, the piecewise defined function
{
x^3 + 2,
y( x)= x2-1,
x<O
0:::; x
is defined on the interval (-oo, oo ). It is continuous on the intervals (-oo, 0)
and (0, oo), but it is not continuous at x = 0, since
lim y(x ) = 2 =f. -1 = lim y( x ) = y(O).
x->O- x->O+
Because y(x) is not continuous at x = 0, the function y( x ) is not differentiable
at x = O; however , y(x) is differentiable on (-oo,O) and (O,oo). In fact,
'( ) { 3x
2
y x = ,
2 x,
The absolute value function
y(x)=lxl= { '
- x
x,
x<O
0 < x.
x<O
0:::; x
is a piecewise defined function which is continuous on (-oo, oo ). Computing
the left-hand derivative of y( x ) = lx l at x = 0, we find
y' (0) = lim IO+ hi - IOI = lim 0:1 = lim -h = -1.
- h->O- h h->O- h h->O- h
And computing the right-hand derivative of y( x ) = lx l at x = 0, we find
. 10 +hi - 101. lhl. h
y~ (0) = hm = hm - = hm - = 1.
h ->O+ h h ->O+ h h->O- h
Since y'__(O) = -1=f.1 = y~(O), the a bsolute value function, y(x) = lx l, is not
differentiable at x = 0. However, the absolute value function is different iable
on ( -oo, 0) and (0, oo), and its derivative is
y'(x) = dlxl = {-1,
dx 1,
x < 0} = -lx l = sgn(x )
0 < x x
where sgn(x) is an abbreviation for the signum function.
The previous two examples illustrat e that points where piecewise defined
functions may not b e continuous or m ay not b e differentiable are points at
which the definition of the function ch a nges from one mathematical expression
to another.