The Math Forum

Search All of the Math Forum:

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

Math Forum » Discussions » Inactive » comp.soft-sys.math.mathematica

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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

Advanced Search

Back to Topic List Back to Topic List  
George Jefferson

Posts: 12
Registered: 12/7/04
do we need to be moderated? Re: Piecewise Functions
Posted: Aug 16, 1996 3:01 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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


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


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..

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.