The function is and
.
Consider .
If then
.
If then
.
Substitute corresponding values in the integral.
\.
Find the integral using trapezoidal rule.
\Let .
Where .
Width .
Substitute and
.
.
Find the function values.
\.
.
.
.
.
.
Substitute and
in
.
.
.
.
.
.
.
Trapezoidal rule:
\Substitute corresponding values in the formula.
\
.
.