Subject: integration and differentiation of f(g(x,y))
From: nijso beishuizen
Date: Mon, 8 Feb 2010 23:17:28 +0100
Hello,
I have some problems in generalizing my program.
A hopefully not too simplified example:
The problem is that for input functions like e.g. f(g(x,y)) I would like to use depends(g,[x,y]) and depends(f,g) so that the following differentiation uses the chain rule:
A : diff(g,x)/diff(g,y);
B : diff(f,y)/diff(f,x);
C : A*B;
and yields C=1 (can I get this result without using depends?)
However, I would like to be able to integrate this result as well, for instance:
integrate(A*B*g,x)
integrate does not see the dependencies of g, resulting in the answer gx instead of keeping the integral over g(x,y)
The only option I see right now is:
-always declare dependencies with depends
-when integration is needed, call my own integration routine and
--temporarily remove the dependencies in depends
--substitute the dependencies explicitly.
--after the integration, create the dependencies again so that differentiation+chain rule work.
Is there another way? This approach seems a bit clumsy. I am open to suggestions.
A question: is there a reason that integrate does not recognize dependencies? Is it an option to make it recognize dependencies? Or is there a package that I missed that already does this?
Maybe a package that simplifies expressions and also recognizes the chain rule?
Regards,
Nijso
_________________________________________________________________
New Windows 7: Simplify what you do everyday. Find the right PC for you.
http://windows.microsoft.com/shop