Evaluates the definite integral using Trapezoidal Method.
integral = trapez(a,b,n,f)
lower limit of integration
upper limit of integration
a real no. (denotes the no. of sub-intervals. Higher the value of n better the result.)
The function that is to be integrated
Returns the definite integral of a function using Trapezoidal Method.
https://en.wikipedia.org/wiki/Trapezoidal_rule