Subject: passing functions as argument one more time
From: Stavros Macrakis
Date: Mon, 9 Oct 2006 11:04:13 -0400
Amli,
To elaborate a bit on RJF's discussion of functions vs. expressions.... The
point is not that the choice of functions vs. expressions is a matter of
taste or popularity; it is that Maxima supports manipulating expressions
very well, and functions not very well. In Maxima, defined functions like
qq(aa):=... are very useful for operations on expressions, but not very
useful for manipulating mathematical functions.
Your script basically does two things: it takes derivatives of expressions
with respect to a variable; and it changes variables (e.g. from t to x).
The first can be done with diff( <expr>, <variable> ), the second with
subst( <newvar>, <oldvar>, <expr> ).
Also, there are some things in your script I don't understand. You write
g(f,x):=block([h:f],diff(h(x),x))$
What is the intent of the block([h:f]...)? This has precisely the same
effect as diff(f(x),x) or (just to write it so the intent is a bit clearer)
diff( (f)(x),x).
-s