I don't have a lot of experience with Python but I decided to give it a try in solving the following system of equations:
x = A * exp (x+y)
y = 4 * exp (x+y)
I want to solve this system and plot x and y as a function of A.
I saw some a similar question and give fsolve a try:
`from scipy.optimize import fsolve
def f(p):
x, y = p
A = np.linspace(0,4)
eq1= x -A* np.exp(x+y)
eq2= y- 4* np.exp(x+y)
return (eq1,eq2)
x,y = fsolve(f,(0, 0))
print(x,y)
plt.plot(x,A)
plt.plot(y,A)
`
I'm getting these errors:
setting an array element with a sequence.
Result from function call is not a proper array of floats.