[Maxima] functions with diff and intergrate

Robert Dodier robert.dodier at gmail.com
Tue Sep 15 16:57:27 CDT 2009


On Tue, Sep 15, 2009 at 2:26 PM, Wilhelm Haager
<wilhelm.haager at htlstp.ac.at> wrote:

> 1) To enforce evaluation at the function definition, you can write:
>   df(x):=''(diff(f(x),x))$

Another way to evaluate the right hand side is this:

define (df (x), diff (f (x), x));

which is not the same as df(x) := ''(...) because the ... in ''(...) is
evaluated just once (when it is parsed) while in define(df(x), ...)
the ... is evaluated every time the define expression is evaluated.
(So, for example, you could have define in a function and make
the ... depend on the function arguments.)

HTH

Robert Dodier



More information about the Maxima mailing list