Thanks for the news, William.  I will hold off on this chain rule
business till the new symbolics arrive.

Alex

On Apr 24, 3:43 pm, William Stein <[email protected]> wrote:
> On Thu, Apr 23, 2009 at 7:18 PM, Alex Raichev <[email protected]> wrote:
>
> > Hmm, implementing the chain rule is trickier than i thought.  My
> > straightforward plan of attack was to write a function that
> > differentiates a symbolic expression as usual but when it comes to a
> > composition f o g, it uses the chain rule and returns the appropriate
> > entry of the matrix (Df o g)Dg.  Problems:
>
> > (a) How do you split apart a symbolic expression to scan for
> > compositions?
> > (b) How do you construct Df so that you can compose it with g?
>
> > Both thwart me and my white belt Sage-fu.
>
> > Any helpful suggestions for (a), (b), or the general project?
>
> > Alex
>
> Picking apart expressions will change significantly soon in Sage, when
> we switch over to using Pynac for basic symbolic manipulation.  The
> plan is to do this switch by May 15.
>
>  -- William
>
>
>
>
>
> > On Apr 23, 1:43 pm, Alex Raichev <[email protected]> wrote:
> >> Never mind.  I'll just right a short recursive function.  It's easy
> >> enough.
>
> >> Alex
>
> >> On Apr 23, 11:10 am, Alex Raichev <[email protected]> wrote:
>
> >> > Hi all:
>
> >> > Do any of you know how to get Sage to use the chain rule and expand
> >> > the derivative of a composition involving one or two callable symbolic
> >> > functions?  Here's an example with one callable symbolic function.
>
> >> > ----------------------------------------------------------------------
> >> > | Sage Version 3.4, Release Date: 2009-03-11                         |
> >> > | Type notebook() for the GUI, and license() for information.        |
> >> > ----------------------------------------------------------------------
> >> > sage: var('x,y,t')
> >> > (x, y, t)
> >> > sage: f= function('f',x,y)
> >> > sage: g= exp(I*t)
> >> > sage: diff(f(g,g^2),t).expand()
> >> > diff(f(e^(I*t), e^(2*I*t)), t, 1)
>
> >> > ------------------------------------------------------------------------
>
> >> > The reason i ask is that i have to take higher-order derivatives of a
> >> > composition f o g of two callable symbolic multivariate functions. I
> >> > want the expanded form so that i can evaluate at a certain point  c
> >> > and solve a linear system to get the derivatives of f at g(c).  (I
> >> > know the values of the derivatives f o g and g at c.)  I could write a
> >> > Sage function to expand the derivatives of f o g using Faà di Bruno's
> >> > formula, but before i do so, i was wondering if there's an easier
> >> > way.
>
> >> > Alex
>
> --
> William Stein
> Associate Professor of Mathematics
> University of Washingtonhttp://wstein.org
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to