How To Solve This Equation With Scipy (both Sides Include F(x))
How can I solve this equation with Scipy? Both sides include 'y'. For example, range of x = 1 to 10. Edit: I tried 'scipy.optimize.root' function for above equation and it works b
Solution 1:
Does it work for you?
from scipy.optimize import root
import numpy as np
def function(y, x):
return 1-2*np.exp((2*x+3*y)/5.0) - (1+2*y)/3.0 - y
_xArr = np.arange(1,10)
result = root(function, np.zeros(len(_xArr)), _xArr )
print ("answer {}".format(result.x))
Post a Comment for "How To Solve This Equation With Scipy (both Sides Include F(x))"