Simplest way to solve mathematical equations in Python

后端 未结 15 1605
自闭症患者
自闭症患者 2020-12-13 10:15

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

相关标签:
15条回答
  • 2020-12-13 10:45

    For inexact solutions, read up on linear programming and sequential quadratic optimization, then search for Python libraries that performs such optimizations for you.

    If the equations require integer solutions, you should search for Diophantine equation solvers for Python.

    Just note that using a simple solver for Project Euler is missing the point. The fun, and educational part, is learning how to solve it yourself using primitive methods!

    0 讨论(0)
  • 2020-12-13 10:45

    On second thoughts, I went through sage in detail and clearly it is the best math free software available.

    Just some of the different python math related libraries, it integrates is absolutely awesome.

    Mathematics packages contained in Sage:

    Algebra GAP, Maxima, Singular 
    Algebraic Geometry  Singular
    Arbitrary    Precision
    Arithmetic  GMP, MPFR, MPFI,    NTL
    Arithmetic Geometry PARI, NTL,      
    mwrank, ecm Calculus    Maxima, SymPy, 
    GiNaC Combinatorics Symmetrica,     
    Sage-Combinat Linear Algebra    Linbox,
    IML Graph Theory    NetworkX Group     
    Theory  GAP Numerical
    computation GSL,    SciPy, NumPy,
    ATLAS
    

    Other packages contained in Sage:

    Command line    IPython Database    ZODB,
    Python Pickles, SQLite Graphical
    Interface   Sage Notebook, jsmath
    Graphics    Matplotlib, Tachyon3d, GD,
    Jmol Interactive 
    programming language  Python 
    Networking  Twisted
    
    0 讨论(0)
  • 2020-12-13 10:47

    sympy is exactly what you're looking for.

    0 讨论(0)
提交回复
热议问题