From the equation given in the attached photo I need to calculate alpha1, alpha2, alpha3, alpha4 and alpha5 as well as the root (x).
The code written so far is
import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import fsolve
def function(x,a1,a2,a3,a4,a5):
return a1*(x**2)*(np.exp(-(x-a2)/a3))**2/(1+(a4*(x**2)))-a5
Xlist = np.linspace(0,250,num = 1000)
plt.figure(num = 2, dpi = 100)
plt.plot(Xlist, function(Xlist, 20, 60, 80, 2, 5), label = "True values")
plt.plot(Xlist, Xlist*0, "--", label = "f(x)=0")
plt.legend()
x = fsolve(function, 80, args = (20, 60, 80, 2, 5))
print(x)
How to calculate the alpha values? I get an x value of 87.72328834 which I am not sure is correct.