MATLAB: How to integrate an unbounded function

matlab integration

Hello every one,
since the normal numerical integration cannnot work to an unbounded function, is there any other methods for the integration of unbounded function?.
Thank you.

Best Answer

According to the MATLAB documentation https://www.mathworks.com/help/matlab/ref/integral.html MATLAB's integral function can handle singlularities on the boundary (upper or lower limit) of the domain to be integrated. If the singularity is not on the boundary, you could always break up the integral into the sum of two integrals, one with the singularity at the upper bound, the other with the singularity at the lower bound. If you have a finite number of singularities in your domain, you can extend this idea, and break up the overall integration into pieces each with singularities at their endpoints.
I am assuming the function you are integrating is one dimensional. MATLAB also has routines, integral2 and integral3 for two and three dimensional cases. I think these can also handle singularities at the boundaries, but you can check the documentation for details.