Simplest way to solve mathematical equations in Python

Lakshman Prasad picture Lakshman Prasad · Oct 29, 2009 · Viewed 67.3k times · Source

I want to solve a set of equations, linear, or sometimes quadratic. I don't have a specific problem, but often, I have been in this situation often.

It is simple to use wolframalpha.com, the web equivalent of Mathematica, to solve them. But that doesn't provide the comfort and convenience of an iPython shell.

Is there a simple library to work on linear and quadratic equations from a python shell?

Personally, I find it extremely convenient to use the Casio 991 MS scientific calculator. I know how to set variables, solve equations, and do a lot. I want such a tool preferably usable from within an ipython shell. I am surprised not to have found any. I'm not impressed enough by sage; perhaps I am missing something.

Answer

Autoplectic picture Autoplectic · Oct 29, 2009

sympy is exactly what you're looking for.