Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Topic: do we need to be moderated? Re: Piecewise Functions
Replies: 0

 George Jefferson Posts: 12 Registered: 12/7/04
do we need to be moderated? Re: Piecewise Functions
Posted: Aug 16, 1996 3:01 AM

This this question was asked so long ago that its expired and I cant
even remember what the question was. No offense, I'm sure moderating
its alot of work, but if you are going on vacation or something
cant you temporatily let everything pass through?

:> i'm stumped...
:
:You can approximate the derivative numerically by using a function such as:
:
:fderiv[x_]:=(f[x]-f[x-0.001] )/0.001
:
:It might not be elegant, but it works.

as I recall, the problem is that for a pievewise function:

f[x_ /; x> 0] := g[x]
f[x_ /; x<=0] := h[x]

differentiation doesn't work correctly even where we specify
the point x:

D[f[x],x] /. x-> -1

f'[-1]

the best I could come up with is to define the derivates piecewise
as well:

f'[x_ /; x>0 ] := D[g[y],y] /. y->x
f'[x_ /; x<0 ] := D[h[y],y] /. y->x

D[f[x],x] /. x-> 1

g'[1]

This doesn't look too bad for this simple example but its
still a real mess where you have multiple derivateves and
more complicated functions..