Hi all,

I still have not found a solution to this problem. Can anyone help?

Thanks,
Chris

On Jan 26, 5:24 pm, "C. Kelly" <[email protected]> wrote:
> Hi all,
>
> I define the following one-parameter functions and their derivatives
>
> x,y,l,L = var('x,y,l,L')
>
> d5 = function('d5',nargs=1)
>
> def d3partderiv(self,*args,**kwds): arg = args[0]; return
> L*L*d5(arg);
> d3 = function('d3',derivative_func=d3partderiv)
>
> def d1partderiv(self,*args,**kwds): arg = args[0]; return -( d3(arg)
> +d1(arg) )/arg
> d1 = function('d1',derivative_func=d1partderiv)
>
> The derivatives work correctly:
>
> diff(d1(x^2),x)   --->   -2*(d3(x^2) + d1(x^2))/x
> diff(d3(x^2),x)   --->   2*L^2*x*d5(x^2)
>
> but the Taylor expansion of d1(x) to second order gives
>
> taylor( d1(x), x, 0, 2)   --->  1/2*x^2*D[0, 0](d1)(0) + x*D[0](d1)(0)
> + d1(0)
>
> For some reason it has not evaluated the derivatives. I also tried to
> define tderivative_func on those functions, but it also did not work.
> Is there any way that I can force the derivatives to be evaluated?
>
> Thanks,
> Chris

-- 
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

Reply via email to