[Maxima] how to define mathematical operators?

Robert Dodier robert.dodier at gmail.com
Sun Nov 30 23:07:30 CST 2008


On 11/30/08, José Antonio Vallejo <jose.a.vallejo at prodigy.net.mx> wrote:

>  (%o3) H(V):=lambda([f],diff(f(x),x)+V*f(x))
>  (%i4) H(W)@lambda([x],%psi(x));
>  (%o4) %psi(x)*V+'diff(%psi(x),x,1)

The reason V appears instead of W is that the arguments of lambda
are never evaluated until the lambda expression is applied to some
argument. The construction buildq([V], lambda(whatever, V*foo))
interpolates the actual value of V into the lambda expression,
without evaluating it.

I'm always heartened to see people using Maxima for real work --
thanks for telling us about it.

best

Robert Dodier



More information about the Maxima mailing list