Help differentiating composite functions



Jaime Villate <villate at fe.up.pt> writes:

> On Mon, 2010-06-28 at 15:25 -0400, Jeffrey Hankins wrote:
>> Hey, there's something I can't do in Maxima. I cannot differentiate
>> things like f(g(t),h(t)) where f is a generic function and g and h are
>> specific functions. If the depends tag is used, it will differentiate
>> f with no arguments, but it will not differentiate something like
>> f(t^2+1,t^3) with respect to t. Is there anything I can do?
> You'll have to be more specific (show us the exact Maxima lines that
> lead you to conclude that it doesn't work).
> For instance, what you describe works well in this sense:
>
> (%i1) f(x,y):=x+2*y$
>
> (%i2) diff(f(t^2+1,t^3), t);
>         
> (%o2) 6*t^2 + 2*t
>
I think he means he has an example where he wants the chain rule to kick
in.

for example

(%i1) diff( f(x^3+2*cos(x), 4*x + x^3), x );
                        d                 3   3
(%o1)                   -- (f(2 cos(x) + x , x  + 4 x))
                        dx

and he wants an output something like

??f(x^3+2*cos(x), 4*x + x^3)*(3*x^2-2*sin(x)) +
??f(x^3+2*cos(x), 4*x + x^3)*(3*x^2+4)

or whatever. (Obviously I made up the ??,
?? notation: maybe a package
like pdiff could help?)


Rupert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 315 bytes
Desc: not available
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20100629/c3478dad/attachment-0001.pgp>;