Ask Your Question

solving equations and using values obtained in other calculations

asked 2014-10-22 13:50:28 +0100

wasyl gravatar image

updated 2014-10-22 17:34:01 +0100

vdelecroix gravatar image


The function solve() in SAGE returns symbolic values for the variables i solve the equations for e.g.:

sage: s=solve(eqn,y)
sage: s
[y == -1/2*(sqrt(-596*x^8 - 168*x^7 - 67*x^6 + 240*x^5 + 144*x^4 - 60*x - 4) + 8*x^4 + 11*x^3 + 12*x^2)/(15*x + 1),
 y == 1/2*(sqrt(-596*x^8 - 168*x^7 - 67*x^6 + 240*x^5 + 144*x^4 - 60*x - 4) - 8*x^4 - 11*x^3 - 12*x^2)/(15*x + 1)]

My problem is that i need to use the values obtained for y in other calculations, but I cannot assign these values to any other variable. Could someone please help me with this?

Thank You

edit retag flag offensive close merge delete


Did you intend to introduce some spam html code (advertising a Polish society) in your question ? Otherwise, it might be a virus... be careful.

vdelecroix gravatar imagevdelecroix ( 2014-10-22 14:16:26 +0100 )edit

No, sorry. It was a malware or something?

wasyl gravatar imagewasyl ( 2014-10-23 10:35:44 +0100 )edit

I have no idea where it came from but there was something. Hopefully, harmless.

vdelecroix gravatar imagevdelecroix ( 2014-10-23 12:57:27 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-10-22 14:24:04 +0100

vdelecroix gravatar image

There is an option in the function solve that allows to do that. To access the documentation of a function, just do

sage: solve?<ENTER>

You might like the option solution_dict=True

You can also have a look at these other questions


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


Asked: 2014-10-22 13:50:28 +0100

Seen: 212 times

Last updated: Oct 22 '14