Basic problem with differentiation and Maxima syntax
Subject: Basic problem with differentiation and Maxima syntax
From: Julien Martin
Date: Mon, 26 Jul 2010 18:37:09 +0200
Thanks Jaime!
2010/7/26 Jaime Villate <villate at fe.up.pt>
> On Mon, 2010-07-26 at 17:56 +0200, Julien Martin wrote:
> > "f'"(%theta):=diff(%,%theta,1);
> > "f'"(%theta);
> > "f'"(0);
> >
> > Here is what I got:
> > *************************
> > diff: second argument must be a variable; found 0
> > #0: f\'(%theta=0)
> > -- an error. To debug this try: debugmode(true);
> > *************************
> >
> > Any idea why this did not work? I just want to know the value of the
> > function when %theta=0...
> Because := does not compute its arguments; that means that the
> derivative will not be calculated when you define "f" but only when you
> attempt to calculate "f"(0).
> Use "define" which is similar to := but it computes its argument:
> define( f(%theta), diff(%,%theta) );
>
> Regards,
> Jaime
>
>
>