Reputation: 1
I'm trying to solve an equation in Python. This is an implicit equation and this is not easy to solve. I think that the Matlab command is ode45, but what is the equivalent for Python? Is there a function that solve easily any kind of equation?
Thank you!!
Upvotes: 0
Views: 451
Reputation: 236
This is the equivalent to ode45:
The way to use it is almost identical:
from scipy.integrate import solve_ivp
vdp1 = lambda T,Y : [Y[1], (1 - Y[0]**2) * Y[1] - Y[0]]
sol = solve_ivp (vdp1, [0, 20], [2, 0])
T = sol.t
Y = sol.y
Upvotes: 2