How To Use Sympy To Find The Point Of Intersection Of Two Functions?
I am trying to use the SymPy library to find the point of intersection(s) between two functions: f(x) = e ^ (x / 2) and g(x) = 3 - 3 * x I tried: import sympy as syp x = syp.symbo
Solution 1:
import sympy as syp
x = syp.symbols('x')
f_x = syp.E ** (x / 2)
g_x = 3 - 3 * x
print(syp.solve(f_x - g_x, x))
The output of the above code is:
[-2*LambertW(exp(1/2)/6) + 1]
Post a Comment for "How To Use Sympy To Find The Point Of Intersection Of Two Functions?"