Simple symbolic query



Maxima's assignment operator is ":", not "=". Maybe something like the following will work for you:

(%i97) vars:[a,b]$
 (%i98) f : a*cos(b*x)+b*sin(a*x)$
 (%i99) d : y - f$
 (%i100) jacobian([d],vars);
 (%o100) matrix([-cos(b*x)-b*x*cos(a*x),a*x*sin(b*x)-sin(a*x)])

Let us know if this isn't what you had in mind.

--Barton

________________________________________
From: maxima-bounces at math.utexas.edu [maxima-bounces at math.utexas.edu] on behalf of David Brant [brantosaurus at hotmail.com]
Sent: Friday, August 16, 2013 09:44
To: maxima at math.utexas.edu
Subject: Simple symbolic query

Hi

I'm a novice to Maxima and would like some simple advice on how to
re-arrange the following symbolic Jacobian calculation where x and y are
ith data points and a and b are variables.

jacobian([y-a*cos(b*x)-b*sin(a*x)],[a,b]);

It can be represented as:

vars:[a,b];
funct:[y-a*cos(b*x)-b*sin(a*x)];
jacobian(funct,vars);

But i would like it more in the form:

vars:[a,b]
f=a*cos(b*x)+b*sin(a*x)
d=y-f
jacobian(d,vars)

which does not work!

Any simple tips please?

Dave Brant
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima