> Now browse into taylor?? source, and you see that sage call the taylor
> function in maxima.
>
> The taylor function in maxima seems very long to follow in
> ...maxima.../src/hayat.lisp.
More to the point, Maxima doesn't know about any 'special' things you
define like that. Our basic differentiation is handled by Ginac/
Pynac, which does not have Taylor series (does it?). So unfortunately
I don't know that this is something one can (yet) do directly in
Sage. It might be possible in Maxima directly, if one can define
custom derivatives there.
Ordinarily one should be able to substitute the derivative in, but in
this case I think it's a little more tricky.
sage: T
1/2*x^2*D[0, 0](d1)(0) + x*D[0](d1)(0) + d1(0)
sage: diff(d1(x),x)
-(d3(x) + d1(x))/x
sage: T.operands()[1].operands()[1]
D[0](d1)(0)
sage: T.subs({T.operands()[1].operands()[1]:diff(d1(x),x).subs(x=0)})
<boom>
because of division by zero. I'm not sure if one can easily get there
from here, but
sage: T.subs({T.operands()[1].operands()[1]:diff(d1(x),x)})
1/2*x^2*D[0, 0](d1)(0) - d3(x) - d1(x) + d1(0)
is close, though of course one cannot just substitute in x=0 because I
don't think that's what you wanted (i.e. only x=0 for some, not all).
- kcrisman
--
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
URL: http://www.sagemath.org