MATLAB: Hello, I am trying to do a numerical integration on a function with limits from 0 to infinity, is it possible

numerical integration

Say I wanted to numerically integrate this function:
f(a) = 0.25*exp(-0.25*a) from 0 to infinity. Can the trapezoid or Simpson rule, or any other numerical integration method work in Matlab to complete this?
Thank you

Best Answer

integral() can handle it, as could the older quadgk() .