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: Stavros Macrakis
Date: Fri, 9 Jan 2004 18:00:09 -0500
> 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.
I see what you want to do in the exp and * case, but what did you have
in mind for the log, sin, etc. cases?
f(x):=exp(g(x))$
qdiff(f(x),x) => f(x)*diff(g#(x),x)
-- use g#(x) to represent (verbify(g))(x)
f(x):= fff(x)$
g(x):= ggg(x)$
qdiff(f(x)*g(x),x) => f(x)*diff(g#(x),x) + g(x)*diff(f#(x),x)
f(x):=sin(g(x))$
qdiff(f(x),x) => sqrt(1-f(x)^2)*diff(g#(x),x) --Is this what you
want?
f(x):=log(g(x))$
qdiff(f(x),x) => ???
By the way, you can do the product case by simply using noun forms. The
question is: where exactly do you want to expand, and where do you not?
I suppose you could use substpart with apply_nouns to do this
selectively.
Then there's RJF's logarithmic derivative trick.
-s