Subject: Fwd: Help differentiating composite functions
From: Jeffrey Hankins
Date: Tue, 29 Jun 2010 10:21:00 -0400
---------- Forwarded message ----------
From: Jeffrey Hankins <jhankin1 at gmail.com>
Date: Tue, Jun 29, 2010 at 10:20
Subject: Re: Help differentiating composite functions
To: Rupert Swarbrick <rswarbrick at gmail.com>
Thanks, Rupert. That is exactly what I meant.
On Tue, Jun 29, 2010 at 08:55, Rupert Swarbrick <rswarbrick at gmail.com>wrote:
> 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
>