Ask Your Question
0

can series make mistakes?

asked 2017-12-02 11:16:35 +0200

florin gravatar image

series seems to make errors . luckily, taylor works correctly. start with L_F=(exp(-s)-1+s)/(s^2/2) (laplace transform of the "equilibrium" uniform density) and switch to Pollaczek laplace transform L_F /(1- epsilon * L_F);
You can check that the moments expansions t, t1 differ

var('s');n=2 L_F=(exp(-s)-1+s)/(s^2/2) #satisfies L_F(s=0)=1 L_L=L_F/(1-L_F/3) t = L_L.series(s,2n+2) t1= taylor(L_L,s,0,2n+2) print t1

edit retag flag offensive close merge delete

Comments

Please format your code! If you make indentation by four spaces, you got nicely printed code like

x = 3
print(x)
vdelecroix gravatar imagevdelecroix ( 2017-12-02 12:29:12 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-12-03 16:00:33 +0200

eric_g gravatar image

updated 2017-12-03 16:20:30 +0200

The output of L_L.series(s, 2*n+2) is erroneous because of the division by s^2, which causes some trouble at s=0. You have to simplify the expression of L_L, via simplify_full(), prior to the call to series. Then you will get a correct result:

sage: L_L = L_L.simplify_full()
sage: L_L.series(s, 2*n+2)
3/2 + (-3/4)*s + 5/16*s^2 + (-29/240)*s^3 + 263/5760*s^4 + (-4157/241920)*s^5 + Order(s^6)
sage: taylor(L_L, s, 0, 2*n+2)
93881/14515200*s^6 - 4157/241920*s^5 + 263/5760*s^4 - 29/240*s^3 + 5/16*s^2 - 3/4*s + 3/2

On general grounds, it is usually preferable to simplify an expression before manipulating it.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-12-02 11:16:35 +0200

Seen: 209 times

Last updated: Dec 03 '17