Python SymPy » |
My Coding >
Programming language >
Python >
Python libraries and packages >
Python SymPy
Python SymPySymPy is a Computer algebra system (CAS) in Python SymPy will try to find symbolic solution for any algebraic equations, which is possible to solve symbolically, which can be concluded from its name “Symbolic Python” = “SymPy” Solving quadratic equationTo solve quadratic equation with symPy, you need to identify the variable with function Symbol() and then simply call for solve()
Solving Exponential equationsThe way of using function solve() is absolutely the same. Answer will be given in symbolic form as well. To convert it to standard numbers it is necessary to convert it to float() format
Trigonometric equationsFor solving trigonometric equations it is necessary to import trigonommetric functions as well
It is important to remember, that for trigonometric equations unlimited number of solutions exists, both these solutions are periodically repeated. SymPy will give you only one solution ant it is your responsibility to remember about all these repetitions.
Not every equation can be solved with SymPy. Some equations have no analytical solution. In this case you will have NotImplementedError Simplified SymPy usageIt is possible to use SymPy without declaring the variable. In this case the equation should be quoted:
|
Last 10 artitles
9 popular artitles
|
© 2020 MyCoding.uk -My blog about coding and further learning. This blog was writen with pure Perl and front-end output was performed with TemplateToolkit. |