Ask Your Question
0

Limit generating an error

asked 2023-05-11 17:04:10 +0200

Cyrille gravatar image

SageMath return a strange error in evaluating the following limit.

var('x a b γ')
U_5 = lambda x, a, b, γ: ((1-γ)/γ)*(((a*x)/(1-γ))+b)^γ 
U_5(x, a, b, γ)
limU=lim(U_5(x, a, b, γ), γ=1)
show(LatexExpr(r"\lim_{\gama\rigtharrow 1}U_5(x, a, b, γ) = "),limU)

Incidently it's not a problem linked to unicode variables since I have the same result in substituting c for γ.

Here is the error message

ECL says: BINDING-STACK overflow at size 10240. Stack can probably be resized. Proceed with caution.

Incidently the result is well known (a linear function of x) and in one of my numerous essays I have had this result but changing the display I loose it and again I have the same error message..

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2023-05-11 19:08:54 +0200

dsejas gravatar image

Hey, @Cyrille!

I found it useful to pass the taylor=True option to the limit (or lim) function:

U_5(x,a,b,γ) = ((1-γ)/γ)*(((a*x)/(1-γ))+b)^γ 
show(U_5(x, a, b, γ))
print('Computing')
limU = lim(U_5, γ=1, taylor=True)
print('Finished')
show(LatexExpr(r"\lim_{\gama\rigtharrow 1}U_5(x, a, b, γ) = "),limU)

I believe that this option must be used carefully, due to some known bugs in Maxima, but in this case it works like a charm!

Hope this helps!

edit flag offensive delete link more

Comments

One more time Thanks dsejas. Incidently you can have a look at https://www.educandgames.org/ all start from your suggestion two years ago. It's a hard work not yet finished.

Cyrille gravatar imageCyrille ( 2023-05-11 22:14:31 +0200 )edit

Hello, @Cyrille! I am glad I could help.

I took a look at your website and I really enjoyed it, although some parts I had to translate from French to English using deepl.com in order to understand them. I should really thank you for including my name in your "Remerciements" ("Acknowledgments") section; I feel honoured.

dsejas gravatar imagedsejas ( 2023-11-27 04:34:58 +0200 )edit

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: 2023-05-11 17:04:10 +0200

Seen: 252 times

Last updated: May 11 '23