MATLAB: What is the difference between int and integral.

integralintegrationnumerical integration

Hello everyone
I want to get explained how to decide wheather use function "int" or "integral".
What is the basic difference between them? will they give same answer for a given function?
Thank you very much in advance.

Best Answer

The int function integrates symbolic expressions (or does its best, consdidering that not all expressions have analytic integrals).
The integral function is for numeric functions, usually anonymous functions.
The documentation pages for those functions explain them better than I can, so I provided links to them.