He guys,
I'm al little bit in trouble with math. So there is an
CodePudding user response:
Your trapezoidal rule estimation is incorrect.
For the first scipy.integrate
from lower limit a=0 to upper limit b=0.05,
Using trapezoidal rule,
f is but kf()
. Thus calculating by trapezoidal rule: print(0.5*(kf(0.05) kf(0))*(0.05-0))
gives 6.342386940782528
.
In fact, if you check the output from your Python code, kfm(0.05)
= list_kfm_func[0]
= integrate.quad(kf, 0, 0.05)[0]
= 6.204186103148345
, which agrees with the trapezoidal rule results.