How to get diff to yield result in terms of original function
Subject: How to get diff to yield result in terms of original function
From: Robert Dodier
Date: Fri, 9 Jan 2004 08:18:26 -0800 (PST)
Hello Stavros,
you wrote:
--- Stavros Macrakis <stavros.macrakis@verizon.net> wrote:
> > I wonder if there's a way to get something like
> >
> > f(x) := exp(g(x))$
> > diff(f(x), x);
> >
> > to yield f(x)*'diff(g(x),x).
> ...
> > Is there a flag to tell diff to express derivatives of
> > exponentials in terms of the original function or expression?
>
> You are misunderstanding how functions work in Maxima. Maxima
> supports mathematical functions, and it supports programming
> functions, both using the same syntax, but they are quite
> different. Mathematical functions are simplified, programming
> functions are evaluated.
Thanks for taking the time to explain this point. Now I see
why diff doesn't (and can't) act the way I thought it would.
At this point I am thinking about yet another solution,
which is to write a diff-like function which quotes its argument.
It would be enough for present purposes if it could recognize
arguments like f(x) where f(x):=foo(g(x)) and foo is exp, log,
sin, etc. This hypothetical function would punt to diff to
handle g'(x) and anything else it didn't know about (i.e.,
almost everything).
There are other interesting situations -- such as
d/dx f(x)*g(x), which could be returned as diff(f(x),x)*g(x)
plus f(x)*diff(g(x),x). But detecting all interesting cases
seems hard, and it's beyond the scope at this point.
Of course returning a derivative in terms of the original
function isn't usually the most useful form. But it seems
much easier to expand that form, than to try to substitute
the definition of f into an already-expanded derivative.
regards,
Robert Dodier
__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus