# Riemann Sum Approximation

The definite integral of a continuous function ‘f’ over an interval [a, b] is computed as _{a}∫^{b} f(x)dx = lim Σf(x_{k}*)∆x, where the sum that appears on the right side is called Riemann sum. In this formula, the interval [a, b] is divided into n subintervals of width ∆x = (b-a)/n, and x_{k}* denotes an arbitrary point in the k^{th} sub-interval It follows that as n increases the Riemann sum will eventually be a good approximation to the integral, which we denote by writing

_{a}∫^{b} f(x)dx ≈ Σf(x_{k}*)∆x

_{a}∫^{b} f(x)dx ≈ ∆x[f(x_{1}^{*}) + f(x_{2}^{*}) + …….+f(x_{n}^{*})]

Here we denote the values of ‘f’ at the endpoints of the subintervals by

y_{0}=f(a), y_{1}=f(x_{1}), y_{2}=f(x_{2}), ………, y_{n-1}=f(x_{n-1}), y_{n}=f(b) and we will denote the values of f at the midpoints of the subintervals by y_{m1}, y_{m2}, ……y_{mn}

## Trapezoidal Approximation

The left-hand and right hand endpoint approximations are rarely used in applications; however, if we take the average of the left-hand and right hand endpoint approximations, we obtain a result, called the trapezoidal approximation, which is commonly used as,

_{a}∫^{b} f(x)∆x ≈ (b-a)/2n [ y_{0} + 2y_{1} + …..+ 2y_{n-1} + y_{n}]

The name trapezoidal approximation can be explained by considering the case in which f(x)≥0 on [a, b], so that _{a}∫^{b} f(x)dx represents the area under f(x) over [a, b]. Geometrically, the trapezoidal approximation formula results if we approximate this area by the sum of the trapezoidal areas as shown in the figure

**Left end point Approximation**: The formula for evaluating left end point approximation is given by

_{a}∫^{b} f(x)dx = (b-a)/n [ y_{0} + y_{1} + ……….. + y_{n-1}]**Right Endpoint Approximation**: The formula for evaluating right end point approximation is given by

_{a}∫^{b} f(x)dx = (b-a)/n [y_{1} + y_{2} + …………. + y_{n}]**Mid-Point Approximation**: The formula for evaluating midpoint approximation is given by

_{a}∫^{b} f(x)dx = (b-a)/n [ym_{1} + ym_{2} + ………..+ ymn] where m_{1}, m_{2} ……m_{n} represents the mid values.

Example: Use Trapezoidal rule to approximate _{0}∫^{π}sinx dx using n=10 sub intervals

Solution: a=0, b=π n=10 and f(x)=sinx, (b-a)/n = π/10

_{0}∫^{π} sinx dx = (π/20)[y_{0} + 2y_{1} + 2y_{2} + …………+2y_{n-1} + y_{n}]

= (π/20) [ sin(0) + 2sin(π/10) + 2sin(2π/10) + ……..sin(10π/10)

= 1.983523538

## Comparison of the Midpoint and Trapezoidal Approximations

The table below shows the comparison between midpoint and trapezoidal approximations for the function ln 2 = _{1}∫^{2}(1/x)dx with n=10 subdivisions

** Midpoint Approximation**

_{1}∫^{2} (1/x)dx = (0.1)(6.928353603) = 0.692835360

** Trapezoidal Approximation**

_{1}∫^{2} (1/x)dx = (0.05)(13.875428063) = 0.693771403

The value of ln 2 is rounded to nine decimal places and we have seen that midpoint approximation produces a more accurate result than the trapezoidal approximation. Hence we can conclude that,

If f be a continuous on [a, b] and let |E_{M}| and |E_{T}| be the absolute errors that result from the midpoint and trapezoidal approximations of _{a}∫^{b}f(x)dx using n subintervals.

a) If the graph of f is either concave up or concave down on (a, b), then |E_{M}|<|E_{T}|, which means that the error from the midpoint approximation is less than from the trapezoidal approximation.

b) If the graph of ‘f’ is concave down on (a, b) then Tn <_{a}∫^{b} f(x)dx < M_{n}

c) If the graph of ‘f’ is concave up on (a,b), then M_{n} < _{a}∫^{b} f(x)dx < Tn

## Simpson’s Rule

Simpson’s Rule is given by

Now try it yourself! Should you still need any help, click here to schedule live online session with e Tutor!

### About eAge Tutoring:

eAgeTutor.com is the premium online tutoring provider. Using materials developed by highly qualified educators and leading content developers, a team of top-notch software experts, and a group of passionate educators, eAgeTutor works to ensure the success and satisfaction of all of its students.

Contact us today to learn more about our tutoring programs and discuss how we can help make the dreams of the student in your life come true!