MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Defining derivatives

  • To: mathgroup at smc.vnet.net
  • Subject: [mg87851] Defining derivatives
  • From: dh <dh at metrohm.ch>
  • Date: Fri, 18 Apr 2008 07:11:33 -0400 (EDT)


Hello All,

does anybody know how to define symbolic derivatives. E.g.:

f[x_]:=f1[x];

f'[x_]:=f2[x];

this does not work because f on the lefthand side is evaluated. To 

prevent this (do not forget to remove f before redefining it):

f[x_]:=f1[x];

HoldPattern[f'[x_]]:=f2[x];

this gives no message, but f'[x] returns f1[x] instead of f2[x].

The same thinhg happens when you change the sequence of definitions:

f'[x_]:=f2[x];

f[x_]:=f1[x];

Further, where is the information about derivatives stored?

thank's a lot, Daniel




  • Prev by Date: Re: Abs[x] function
  • Next by Date: Re: Abs[x] function
  • Previous by thread: Re: Comments on the .m file editor
  • Next by thread: Re: Defining derivatives