Ask Your Question
0

Bug in sage solve

asked 8 years ago

proy gravatar image

Sage raises an error when I try to solve the following:

solve(a*exp(k*2) - n, a*exp(k*8)-m, a, k, solution_dict=True)

What is the reason for this?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 8 years ago

calc314 gravatar image

You need to define the variables using the var command. Also, the syntax for solve is slightly different.

var('a k n m')
solve([a*exp(k*2) - n==0, a*exp(k*8)-m==0], [a, k], solution_dict=True)

Unfortunately, Sage (which uses Maxima for this) does not solve the equation.

However, sympy does a nice job of solving here.

var('a k n m')
import sympy as sp
sp.solve([a*exp(k*2) - n, a*exp(k*8)-m], [a, k],dict=True)
Preview: (hide)
link

Comments

Thank you. Just strange that Sage can't solve such simple system.

proy gravatar imageproy ( 8 years ago )

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: 8 years ago

Seen: 804 times

Last updated: May 21 '16