![]() |
VOOZH | about |
In the field of numerical analysis, Trapezoidal rule is used to find the approximation of a definite integral. The basic idea in Trapezoidal rule is to assume the region under the graph of the given function to be a trapezoid and calculate its area.
It follows that:
For more accurate results the domain of the graph is divided into n segments of equal size as shown below:
Grid spacing or segment size h = (b-a) / n.
Therefore, approximate value of the integral can be given by:
Output:
Value of integral is 0.7842
References:
https://en.wikipedia.org/wiki/Trapezoidal_rule