deriv3.mws

Differentiability and continuity.   

p. 99, #6.

>    Q:=t->piecewise(t<=0,1,t>0,exp(-t));

Q := proc (t) options operator, arrow; piecewise(t <= 0,1,0 < t,exp(-t)) end proc

>    plot(Q(t),t=-2..2);

[Maple Plot]

Q(t) appears to be a continuous function of t since there is no break in the graph.  

However, it appears that the graph has a corner at t=0 which suggests that Q(t) is not differentiable there.  

This is the same as saying that I(t)=Q'(t)=dQ/dt is not defined at t=0.  

In order to see this more clearly we will compute some difference quotients first for negative h.

>    (Q(-.1)-Q(0))/(-.1-0);

0.

>    (Q(-.01)-Q(0))/(-.01-0);

0.

No surprise.  The graph is flat if t<0.  Now for positive h.

>    (Q(.1)-Q(0))/(.1-0);

-.951625820

>    (Q(.05)-Q(0))/(.05-0);

-.97541151

>    (Q(.01)-Q(0))/(.01-0);

-.99501663

>    (Q(.005)-Q(0))/(.005-0);

-.9975042

>    (Q(.001)-Q(0))/(.001-0);

-.9995002

What do you guess the limit to be?

>    diff(Q(t),t);

PIECEWISE([0, t < 0],[undefined, t = 0],[-exp(-t), 0 < t])

p. 99, #10.

 

>    f:=y->piecewise(y>=0,sqrt(y^2+1)-y,y<0,sqrt(y^2+1)+y);

f := proc (y) options operator, arrow; piecewise(0 <= y,sqrt(y^2+1)-y,y < 0,sqrt(y^2+1)+y) end proc

>    plot(f(y),y=-2..2);

[Maple Plot]

The function appears to be continuous at y=0 but not differentiable there.  We can verify this by looking at some di fference quotients.

>    (f(-.1)-f(0))/(-.1-0);

.95012438

>    (f(-.03)-f(0))/(-.03-0);

.98500337

>    (f(-.01)-f(0))/(-.01-0);

.9950001

>    (f(-.003)-f(0))/(-.003-0);

.9985000

>    (f(-.001)-f(0))/(-.001-0);

.999500

What do you guess the limit to be?

>    (f(.1)-f(0))/(.1-0);

-.95012438

>    (f(.05)-f(0))/(.05-0);

-.97501560

>    (f(.01)-f(0))/(.01-0);

-.9950001

>    (f(.005)-f(0))/(.005-0);

-.9975000

>    (f(.001)-f(0))/(.001-0);

-.999500

What do you guess the limit to be?  

Final example.

>    g:=x->piecewise(x<=1,3*x-2,x>1,x^3);

g := proc (x) options operator, arrow; piecewise(x <= 1,3*x-2,1 < x,x^3) end proc

>    plot(g(x),x=0..2);

[Maple Plot]

This function is definitely continuous and it appears that it might be differentiable as well.  Let's check some difference quotients.

>    (g(.9)-g(1))/(.9-1);

3.

>    (g(.95)-g(1))/(.95-1);

3.00000000

No surprise here.  The function is linear with slope 3 for x<=1.

>    (g(1.1)-g(1))/(1.1-1);

3.31

>    (g(1.05)-g(1))/(1.05-1);

3.15250000

>    (g(1.01)-g(1))/(1.01-1);

3.0301

>    (g(1.005)-g(1))/(1.005-1);

3.0150250

>    (g(1.001)-g(1))/(1.001-1);

3.003001

What is your guess for the limit?