Is it a numeric or symbolic integration?
Most functions do not have a closed form integral. This is a mathematical limitation. The solution can be approximated numerically only.
Functions with poles cannot be solved numerically also, because it is impossible to measure the area under the infinite y values. Discontinuous functions cannot be solved by Matlab reliably, because the standard integrators cannot find the locations of the discontinuities automatically. Simulink integrators might be able to handle this.
Before a specific answer is possible, you have to explain, which problem you want to solve with which tool.