Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

There's a way to at least get this to print.

sage: f = 1/x^2
sage: f._maxima_().taylor((x,2,2))
1/4-(x-2)/4+3*(x-2)^2/16

However, it doesn't stick around when you send it back to Sage.

sage: SR(_)
3/16*(x - 2)^2 - 1/4*x + 3/4

Indeed,

sage: (x-2)/4
1/4*x - 1/2

It's possible to get this to not simplify

sage: (x-2).mul(1/4,hold=True)
1/4*(x - 2)

but I'm not sure if we can easily massage the output of Maxima to not simplify with that.

There's a way to at least get this to print.

sage: f = 1/x^2
sage: f._maxima_().taylor((x,2,2))
1/4-(x-2)/4+3*(x-2)^2/16

However, it doesn't stick around when you send it back to Sage.

sage: SR(_)
3/16*(x - 2)^2 - 1/4*x + 3/4

Indeed,

sage: (x-2)/4
1/4*x - 1/2

It's possible to get this to not simplify

sage: (x-2).mul(1/4,hold=True)
1/4*(x - 2)

but I'm not sure if we can easily massage the output of Maxima to automatically not simplify with that.