Ask Your Question

sdkwok's profile - activity

2017-04-19 06:51:00 -0600 received badge  Popular Question (source)
2013-02-23 09:38:23 -0600 commented answer simplify coefficients of laurent series?

Thanks everyone!

2013-02-21 23:22:54 -0600 commented answer simplify coefficients of laurent series?

The coefficients command doesn't simplify the coefficients, it only puts them in a list. If you notice, for instance, the third coefficient in your answer (a0*b2^2 + 2*b1^2*b2 + (2*a0*b2 + b1^2)*b2) is not in a simplified form. Perhaps there is a command that simplifies all entries in a list?

2013-02-21 03:57:31 -0600 received badge  Editor (source)
2013-02-21 03:55:37 -0600 asked a question simplify coefficients of laurent series?

I am working with a Laurent series f. My goal is to calculate the principal part of f^3. The code I am using is this:

R.<u> = LaurentSeriesRing(SR, 'u'); R

b2, b1, a0, a1, a2, a3, a4 = var('b2 b1 a0 a1 a2 a3 a4')

f = b2*u^-2 + b1*u^-1 + a0 + a1*u + a2*u^2 + a3*u^3 + a4*u^4 + O(u^5)

f^3

The answer I get is:

b2^3*u^-6 + 3*b1*b2^2*u^-5 + (a0*b2^2 + 2*b1^2*b2 + (2*a0*b2 + b1^2)*b2)*u^-4 + (2*a0*b1*b2 + a1*b2^2 + (2*a0*b2 + b1^2)*b1 + 2*(a0*b1 + a1*b2)*b2)*u^-3 + (2*a1*b1*b2 + a2*b2^2 + (2*a0*b2 + b1^2)*a0 + 2*(a0*b1 + a1*b2)*b1 + (a0^2 + 2*a1*b1 + 2*a2*b2)*b2)*u^-2 + (2*a2*b1*b2 + a3*b2^2 + (2*a0*b2 + b1^2)*a1 + 2*(a0*b1 + a1*b2)*a0 + 2*(a0*a1 + a2*b1 + a3*b2)*b2 + (a0^2 + 2*a1*b1 + 2*a2*b2)*b1)*u^-1 + (2*a3*b1*b2 + a4*b2^2 + (2*a0*b2 + b1^2)*a2 + 2*(a0*b1 + a1*b2)*a1 + 2*(a0*a1 + a2*b1 + a3*b2)*b1 + (a0^2 + 2*a1*b1 + 2*a2*b2)*a0 + (2*a0*a2 + a1^2 + 2*a3*b1 + 2*a4*b2)*b2) + O(u)

SAGE does not simplify the coefficients of the result. Is there some command that I can enter that will allow me to simultaneously simplify the coefficients of each power of u and output the result up to O(u)? The simplify command does not seem to work.