We need modules for working with formulas (opening brackets, multiplying brackets, etc.), mathematics (elementary and higher). What do you advise?
- fiveSymPy - MaxU
|
2 answers
Here are links with a detailed explanation and code examples of different libraries.
Matplotlib - http://matplotlib.org/index.html
- Thank you for the answer. You can provide links to them and it will be great if you give examples of use. - Mikhail Rebrov
- No problem, here, keep Matplotlib: matplotlib.org/index.html ; NumPy: cs231n.imtqy.com/python-numpy-tutorial ; Dislin: www2.mps.mpg.de/dislin/exa_python.html - all manuals contain a complete set of ready-made solutions and many examples that can be used as a template for your tasks, as well as told that in principle is a module. - Jens Stoltenberg
- in the body of the answer, please. I’m not asking for myself (I don’t need it). I just want your answer to help someone later. And not everyone reads the comments. You can go to the Help section and read how it is desirable to arrange the questions / answers so that they can help someone later - Mikhail Rebrov
|
SymPy module usage examples :
In [33]: from sympy import * In [34]: x, y = symbols('x y') In [35]: formula = '(x**2 + 3*y + 16) * (5*x - 2*y**2 -1) * (1 + x**3)' In [36]: expand(formula) Out[36]: 5*x**6 - 2*x**5*y**2 - x**5 + 15*x**4*y + 80*x**4 - 6*x**3*y**3 - 32*x**3*y**2 - 3*x**3*y - 11*x**3 - 2*x**2*y**2 - x**2 + 15*x*y + 80*x - 6*y**3 - 32*y**2 - 3*y - 16 In [37]: simplify(formula) Out[37]: -(x**3 + 1)*(-5*x + 2*y**2 + 1)*(x**2 + 3*y + 16) In [49]: factor('16*x**2 + 16*x + 4') Out[49]: 4*(2*x + 1)**2 In [51]: simplify('sin(x)**2 + cos(x)**2') Out[51]: 1 |