On Jan 30, 2008 3:48 PM, pgdoyle <[EMAIL PROTECTED]> wrote: > > I would like to take the Taylor series of a matrix. But I find I > can't even put a Taylor polynomial into a matrix without its being > simplified. > > sage: f=-x/(2*x-4); f > -x/(2*x - 4) > sage: g=taylor(f,x,1,1); g > 1/2 + x - 1 > sage: matrix(1,[g]) > [x - 1/2] > sage: m=matrix(1,[f]); m > [-x/(2*x - 4)] > sage: m.apply_map(lambda e: taylor(e,x,1,1)) > [x - 1/2] > > Any suggestions?
You're already doing it exactly correctly. Try a higher degree approximation to avoid confusion: sage: m = matrix(1,[-x/(2*x-4)]) sage: m.apply_map(lambda e: taylor(e,x,1,4)) [x + (x - 1)^4 + (x - 1)^3 + (x - 1)^2 - 1/2] --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---