[Maxima] ev - diff error?
macrakis at alum.mit.edu
Wed Feb 15 10:59:55 CST 2012
When you say
You are asking Maxima to calculate diff(sin(x),x) in a context where all
x's are replaced by 1.
That would give diff(sin(1),1), which is not what you want.
What you want is first to calculate diff(sin(x),x), and only *then* substitute
You can do that in various ways:
ex: diff(sin(x),x)$ ev(ex,x=1)
Maxima's notion of variable conflates *programming* variables and *mathematical
*variables, which aren't really the same thing, but can be treated as the
same in many cases. But in some cases, you have to be careful about the
On Wed, Feb 15, 2012 at 11:54, <mxue at vroomlab.com> wrote:
> Hi Maxima Jedis,
> I have the following encounter with maxima 5.23.2:
> (%i3) ev(diff(sin(x),x),x=1);
> diff: second argument must be a variable; found 1
> -- an error. To debug this try: debugmode(true);
> (%i5) diff(sin(x),x);
> (%o5) cos(x)
> (%i6) ev(%, x=1);
> (%o6) cos(1)
> works ok. so is:
> (%i9) ev(diff(sin(x),x), x=%pi);
> (%o9) 0
> (%i8) ev(diff(sin(x),x), x=%pi/2);
> diff: second argument must be a variable; found ---
> Is this a bug of maxima or error/misunderstanding on my part? Could someone
> enlighten me ?
> Maxima mailing list
> Maxima at math.utexas.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Maxima