Defining a derivative



Hi Nicolas,

I know two ways of defining a derivative as a function:

1. with two single quotes and braces:
r1(t) := ''( diff(r(t),t) );
works only in top level

2. with define
define( r1(t), diff(r(t),t) );
works in any code, e.g blocks

HTH
Volker van Nek


Am 29 Aug 2007 um 5:36 hat Nicolas FRANCOIS geschrieben:

> Hi.
> 
> I have a problem with Maxima : I define a function r, and then I want to
> nam its derivative. But the code :
> 
> r1(t):=diff(r(t),t)
> 
> doesn't work if I use r1 with for example 
> 
> r1(2)
> 
> r1(t=2)
>  -- an error.  Quitting.  To debug this try debugmode(true);
> 
> How can I define r1 to prevent this ? For example MuPAD had a "D"
> operator for this. But I didn't find the equivalent in Maxima.
> 
> Thanks for any help.
> 
> \bye
> 
> -- 
> 
>                    Nicolas FRANCOIS
>             http://nicolas.francois.free.fr
>  A TRUE Klingon programmer does NOT comment his code
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima