Answers for "solve equation python"

1

solve equation python

>>> from sympy.solvers import solve
>>> from sympy import Symbol
>>> x = Symbol('x')
>>> solve(x**2 - 1, x) #Your equation here
[-1, 1]
Posted by: Guest on December-04-2020
0

how to write x in terms of y sympy

def express(a, b, name):
    sym = symbols(name)
    sol = solve(a-sym, b)
    assert len(sol) == 1
    return (sym, sol[0])
Posted by: Guest on June-12-2020

Code answers related to "solve equation python"

Python Answers by Framework

Browse Popular Code Answers by Language