Ask Your Question

sdkwok's profile - activity

2020-05-21 16:59:04 +0200 received badge  Notable Question (source)
2017-04-19 13:51:00 +0200 received badge  Popular Question (source)
2013-02-23 16:38:23 +0200 commented answer simplify coefficients of laurent series?

Thanks everyone!

2013-02-22 06:22:54 +0200 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 10:57:31 +0200 received badge  Editor (source)
2013-02-21 10:55:37 +0200 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.