function which takes functions as arguments



# Hi all,
# I want to study coordinate transformations using Maxima. What I want is to
have a function, find_jacobian(), which takes tree functions as arguments
and returns a matrix. For example, the three functions are
x(r,theta,phi):=r*sin(theta)*cos(phi);
y(r,theta,phi):=r*sin(theta)*sin(phi);
z(r,theta,phi):=r*cos(theta);
# These are transformation functions from rectangular to spherical
coordinates.
# The elements of the matrix Jacobian are
[ del x/del r   del x/del theta   del x/del phi ]
[ del y/del r  ...]
[...]
# the user will define three functions
x1(q1,q2,q3):= some function of q1,q2 and q3;
x2(q1,q2,q3);= ...;
# and call
J: find_jacobian(x1,x2,x3);
# and have the Jacobian in J.
# How can I do this? What notation should I use in order to have functions
in arguments (like in integrate() for example)? And in the function body,
how can I say "differentiate x1 with respect to first argument of x1" I
looked at the manual
http://maxima.sourceforge.net/docs/manual/en/maxima_39.html but could not
find this kind of definition.
# Regards.
-ugur guney-