I have two equations: one linear and one exponential, and I need to find where they intersect. They are of the form:
y1 = a * x
y2 = b * exp(c * x) + d
where the variables a, b, c and d are known.
I've tried looking online for solutions to find y1=y2
, and y1-y2=0
, but with no result. Are there any simple ways of solving these equations using Python?
import sympy
from sympy import Symbol
a = 2.06233087
b = -0.41000778
c = 0.44198402
d = 0.1251175917215428
x = Symbol('x', real=True)
result = sympy.solvers.solve(a*sympy.exp(b*x)+c-d*x, x)
Currently, I am trying to solve it with sympy solvers, but the equation above makes my computer 'crash'.