Informative line

### Methods Of Approximate Integration

Learn Midpoint, Trapezoidal, Simpson's Rule Calculus & Trapezoidal Approximation Formula. Practice Midpoint & Trapezoidal Rule Calculus for Approximating Integrals.

# Need for Approximating the Integral

There are two situations in which it is not possible to find the exact value of definite integral.

1.  When we try to evaluate $$\int\limits_a^bf(x)dx$$ and are unable to find the indefinite integral of f(x).
2. When function is determined through scientific experiment through instrumental reading and there is no formula for the function.

In both the above cases there is a need to find the approximate value of definite integrals.

• Midpoint Rule : In this method of approximation, we write

$$\int\limits_a^bf(x)dx\simeq M_{n}=\Delta x \Bigg[f(\overline x_1)+f(\overline x_2) + .........f(\overline x_n)\Bigg]$$

where, $$\Delta\,x=\dfrac{b-a} {n}$$  and  $$\overline x_i=\dfrac{x_{i–1}+x_i}{2}$$= midpoint of $$[x_{i–1},x_i]$$

Interval [a,b] is divided into n equal parts each measuring  $$\dfrac{b-a}{n}$$ = $$\Delta x$$ and then height  $$f(\overline x)$$ is taken at the midpoint of each interval.  #### Use midpoint rule with n=4 to approximate the integral  $$I=\int\limits_1^5 \sqrt {\ell n\,x}\,dx$$  to four decimal places.

A 3.9397

B 1.8265

C 102.965

D 0.0142

×

Midpoint rule says that

$$\int\limits_a^bf(x)dx\cong\,\Delta\,x\,\Bigg[f(\overline x_1)+f(\overline x_2) + .........f(\overline x_n)\Bigg]$$

$$=M_{n}$$

where, $$\Delta\,x=\dfrac{b-a} {n}$$and $${\over{x_i}}=\dfrac{1}{2}(x_{i–1}+x_i)$$

In this problem, n = 4, f(x) = $$\sqrt {\ell n\,x}$$, a = 1, b = 5

$$\therefore$$$$\Delta x=\dfrac{5–1}{4}=1,\,\, \overline x_1=\dfrac{1+2}{2}=\dfrac{3}{2},\,\,\overline x_2=\dfrac{2+3}{2}=\dfrac{5}{2}$$

$$\overline x_3=\dfrac{3+4}{2}=\dfrac{7}{2},\,\,\,\overline x_4 = \dfrac{4+5}{2}=\dfrac{9}{2}$$

$$\therefore$$ $$\int\limits_1^5 \sqrt{\ell n\,x}\,dx\simeq1 \Bigg[f\left(\dfrac{3}{2}\right)+f\left(\dfrac{5}{2}\right)+f\left(\dfrac{7}{2}\right)f\left(\dfrac{9}{2}\right)\Bigg]=M_4$$

$$\sqrt{\ell n\dfrac{3}{2}}+\sqrt{\ell n\dfrac{5}{2}}+\sqrt{\ell n\dfrac{7}{2}}+\sqrt{\ell n\dfrac{9}{2}}$$

=0.6368+0.9572+1.1193+1.2264

= 3.9397

### Use midpoint rule with n=4 to approximate the integral  $$I=\int\limits_1^5 \sqrt {\ell n\,x}\,dx$$  to four decimal places.

A

3.9397

.

B

1.8265

C

102.965

D

0.0142

Option A is Correct

# Midpoint Theory

## Need for Approximating the Integral

There are two situations in which it is not possible to find the exact value of definite integral.

1.  When we try to evaluate $$\int\limits_a^bf(x)dx$$ and are unable to find the indefinite integral of f(x).
2. When function is determined through scientific experiment through instrumental reading and there is no formula for the function.

In both the above cases there is a need to find the approximate values of definite integral.

### Midpoint Rule

In this method of approximation, we write

$$\int\limits_a^bf(x)dx\simeq M_{n}=\Delta x \Bigg[f(\overline x_1)+f(\overline x_2) + .........f(\overline x_n)\Bigg]$$

where, $$\Delta\,x=\dfrac{b-a} {n}$$and $$\overline x_i=\dfrac{x_{i–1}+x_i}{2}$$= midpoint of  $$[x_{i–1},x_i]$$

Interval [a,b] is divided into n equal parts each measuring  $$\dfrac{b-a}{n}$$=$$\Delta x$$  and then height  $$f(\overline x)$$ is taken at the midpoint of each interval.

#### Use midpoint rule with $$n=8$$ to approximate the value of the integral $$I=\int\limits_1^5 \dfrac{sinx}{x}dx$$  to four decimal places.

A 18.9612

B 0.0078

C 0.5997

D 1.0321

×

Midpoint rule says that,

$$\int\limits_a^bf(x)dx\cong\,\Delta\,x\,\Bigg[f(\overline x_1)+f(\overline x_2) + .........f(\overline x_n)\Bigg]$$

$$=M_{n}$$

where, $$\Delta\,x=\dfrac{b-a} {n}$$and $${\over{x_i}}=\dfrac{1}{2}(x_{i–1}+x_i)$$

In this problem,

n = 8, a = 1, b = 5, $$f(x)=\dfrac{sinx}{x}$$

$$\therefore$$$$\Delta x=\dfrac{5–1}{8}=\dfrac{4}{8}=\dfrac{1}{2},\,\, \overline x_1=\dfrac{1+1.5}{2}=1.25,\,\, \overline x_2=\dfrac{1.5+2}{2}=1.75$$

$$\overline x_3=\dfrac{2+2.5}{2}=2.25,\,\, \overline x_4=\dfrac{2.5+3}{2}=2.75, \,\,\,\overline x_5=\dfrac{3+3.5}{2}=3.25,$$

$$\overline x_6=\dfrac{3.5+4}{2}=3.75,\,\,\, \overline x_7=\dfrac{4+4.5}{2}=4.25, \,\,\,\overline x_8=\dfrac{4.5+5}{2}=4.75,$$

$$\therefore$$ $$\int\limits_1^5 \dfrac{sinx}{x}dx\cong M_8=\Delta \,x \Bigg[f\left({\overline x_1} \right) + f\left({\overline x_2}\right).........f\left({\overline x_8}\right)\Bigg]$$

$$=\dfrac{1}{2} \Bigg[f\left({1.25} \right) + f\left({1.75}\right) + f\left({2.25}\right) + f\left({\ 2.75}\right) + f\left({ 3.25}\right) + f\left({3.75}\right) + f\left({4.25}\right) + f\left({ 4.75}\right) \Bigg]$$

$$=\dfrac{1}{2} \Bigg[\dfrac{sin(1.25)}{1.25} + \dfrac{sin(1.75)}{1.75} + \dfrac{sin(2.25)}{2.25} + \dfrac{sin(2.75)}{2.75} + \dfrac{sin(3.25)}{3.25} + \dfrac{sin(3.75)}{3.75} + \dfrac{sin(4.25)}{4.25}+\dfrac{sin(4.75)}{4.75}$$

$$=\dfrac{1}{2}\Bigg[1.1994\Bigg]=0.5997$$

### Use midpoint rule with $$n=8$$ to approximate the value of the integral $$I=\int\limits_1^5 \dfrac{sinx}{x}dx$$  to four decimal places.

A

18.9612

.

B

0.0078

C

0.5997

D

1.0321

Option C is Correct

# Simpson's Rule

Simpson's rule for approximating integrals make use of parabolas instead of straight lines for approximating curves we divide the intervals [a,b] into n equal parts,

each part $$=\Delta x=\dfrac{b-a}{n}$$ where, $$n$$ is even. Then for each pair of intervals, we approximate $$y = f(x) \geq0$$ by a parabola as shown in the figures.    We take the interval $$[x_0, x_2]$$ where, $$x_0=-h, x_1=0, x_2=h$$the equation of parabola through P0, P1 & P2 is of the form y = Ax2+Bx +C (where A,B,C are constants)

The area = $$\int\limits_{-h}^h(Ax^2 + Bx + C)dx=\dfrac {h} {3}(2Ah^2 + 6C)$$      .............(1)

Now, the parabola passes through $$P_0(-h,y_0), P_1(0,y_1), P_2 (h,y_2)$$

$$\therefore$$$$y_0=Ah^2 - Bh + C\\y_1=C\\y_2=Ah^2 + Bh + C$$         $$\therefore y_0 + 4y_1 + y_2=2Ah^2+6C$$

put, this in 1 we get,

Area of parabola = $$\dfrac{h}{3}(y_2+4y_1+y_2)$$

similarly, area under the parabola $$P_2, P_3,P_4$$ will be $$\dfrac{h}{3}(y_2 + 4{y_3} + y_4)$$

$$\therefore$$Sum of all areas = $$\dfrac{h}{3}\Bigg[y_0+4y_1+y_0\Bigg] + \dfrac{h}{3}\Bigg[y_2+4y_3+y_4\Bigg] + \dfrac{h}{3}\Bigg[y_4+4y_5+y_0\Bigg] + .....+ \dfrac{h}{3}\Bigg[y_{n-2}+4y_{n-1}+y_n\Bigg]$$$$\dfrac{h}{3}\Bigg[y_0 + 4y_1 + 2y_2 + 4y_3 + 2y_4 + .............+2y_n-2 + 4y_{n-1} + y_n\Bigg]$$

$$\simeq\int\limits_a^bf(x)dx$$

$$\therefore \,\int\limits_a^bf(x)dx =S_n=\dfrac{\Delta x}{3}\Bigg[f(x_0) + 4f(x_1) + 2f(x_2) + ........+ 2f(x_{n-2}) + 4f(x_{n-1}) + f(x_n)\Bigg]$$

where, n is even and $$\Delta x=\dfrac{b-a}{n}$$

#### Use Simpson's rule with $$n =4$$ to estimate the value of $$I=\int\limits_0^1sin\,x^2dx$$ to four places of decimal.

A $$1.2068$$

B $$0.3099$$

C $$0.0056$$

D $$12.1516$$

×

Simpson's Rule says that ,

$$\int\limits_a^bf(x)dx \simeq S_n=\dfrac{\Delta x}{3} \Bigg[f(x_0) + 4f(x_1) + 2f(x_2) + .......2f(x_{n-2})+4f(x_{n-1}) + f(x_n)$$

Where,  $$\Delta x=\dfrac{b-a}{n}$$ and n is even, $$x_i=a+i\Delta x$$

In this cases,

n =4, a = 0, b = 1, $$f(x) = sin\,x^2$$

$$\Delta x= \dfrac{1-0}{4}=\dfrac{1}{4}, x_0=0, x_1 = \dfrac{1}{4},x_2 = \dfrac{1}{2}, x_3 = \dfrac{3}{4},x_4=b=1$$

$$\therefore$$$$\int\limits_0^1sin\,x^2dx \cong S_4 = \dfrac{\Delta x}{3}\Bigg[f(x_0) + 4f(x_1) + 2f(x_2) + 4f(x_3) + f(x_n)\Bigg]$$

$$= \dfrac{1}{12} \Bigg[f(0) + 4f\bigg(\dfrac{1}{4}\bigg) + 2f \bigg(\dfrac{1}{2}\bigg) + 4f \bigg(\dfrac{3}{4}\bigg) + f(1)\Bigg]$$

$$=\dfrac{1}{12}\Bigg[sin\,0 + 4\,sin\dfrac{1}{16} + 2\,sin\dfrac{1}{4} + 4\,sin\dfrac{9}{16} + sin\,1\Bigg]$$

$$=\dfrac{1}{12}\Bigg[3.7193\Bigg]\\=0.3099$$

### Use Simpson's rule with $$n =4$$ to estimate the value of $$I=\int\limits_0^1sin\,x^2dx$$ to four places of decimal.

A

$$1.2068$$

.

B

$$0.3099$$

C

$$0.0056$$

D

$$12.1516$$

Option B is Correct

# Simpson's Rule

• Simpson's rule for approximating integrals make use of parabolas instead of straight lines for approximating curves.
•  We divide the intervals [a,b] into n equal parts,
• Each part $$=\Delta x=\dfrac{b-a}{n}$$

when n is even then for each pair of intervals we approximate y = f(x) >0 by a parabola as shown in the figures below.

We take the interval $$[x_0, x_2]$$ where,  $$x_0=-h, x_1=0, x_2=h$$ the equation of parabola through P0, P1 & P2 is of the form y = Ax2+Bx +C (where A,B,C are constants)

The area = $$\int\limits_{-h}^h(Ax^2 + Bx + C)dx=\dfrac {h} {3}(2Ah^2 + 6C)$$      .............(1)

Now, the parabola passes through $$P_0(-h,y_0), P_1(0,y_1), P_2 (h,y_2)$$

$$\therefore$$$$y_0=Ah^2 - Bh + C\\y_1=C\\y_2=Ah^2 + Bh + C$$           ($$\therefore y_0 + 4y_1 + y_2=2Ah^2+6C$$)

put this in 1 we get,

Area of parabola = $$\dfrac{h}{3}(y_2+4y_1+y_2)$$

similarly, area under the parabola $$P_2, P_3,P_4$$ will be $$\dfrac{h}{3}(y_2 + 4{y_3} + y_4)$$

$$\therefore$$Sum of all areas = $$\dfrac{h}{3}\Bigg[y_0+4y_1+y_0\Bigg] + \dfrac{h}{3}\Bigg[y_2+4y_3+y_4\Bigg] + \dfrac{h}{3}\Bigg[y_4+4y_5+y_0\Bigg] + .....+ \dfrac{h}{3}\Bigg[y_{n-2}+4y_{n-1}+y_n\Bigg]$$$$\dfrac{h}{3}\Bigg[y_0 + 4y_1 + 2y_2 + 4y_3 + 2y_4 + .............+2y_n-2 + 4y_{n-1} + y_n\Bigg]$$

$$\simeq\int\limits_a^bf(x)dx$$

$$\therefore \,\int\limits_a^bf(x)dx =S_n=\dfrac{\Delta x}{3}\Bigg[f(x_0) + 4f(x_1) + 2f(x_2) + ........+ 2f(x_{n-2}) + 4f(x_{n-1}) + f(x_n)\Bigg]$$

where, $$n$$ is even and $$\Delta x=\dfrac{b-a}{n}$$

#### Use Simpson's rule with $$n =8$$ to estimate the value of $$I=\int\limits_1^9\sqrt{x^3-1} \,\,dx$$ to four places of decimal.

A $$95.9472$$

B $$18.2356$$

C $$1200.2815$$

D $$.0186$$

×

Simpson's Rule says that ,

$$\int\limits_a^bf(x)\,dx \simeq S_n=\dfrac{\Delta x}{3} \Bigg[f(x_0) + 4f(x_1) + 2f(x_2) + .......+2f(x_{n-2})+4f(x_{n-1}) + f(x_n)\Bigg]$$

Where, $$\Delta x=\dfrac{b-a}{n}$$ and n is even, $$x_i=a+i\Delta x$$

In this case,

n =8, a = 1, b = 9, $$f(x)=\sqrt{x^3-1}$$

$$\Delta x= \dfrac{9-1}{8}= {1},\,\, x_0=1, \,\,x_1 = 2,\,\,x_2 = 3,\,\, x_3 = 4,\\ \,\,x_4=5, \,\,x_5=6, \,\,x_6=7, \,\,x_7=8,\,\, x_8=b=9$$

$$\therefore\int\limits_1^9\sqrt{x^3-1} \,dx \simeq S_8=\dfrac{\Delta x}{3}\Bigg[f(x_0) +4f(x_1) + 2f(x_2) + 4f(x_3) + 2f(x_4) + 4f(x_5) + 2f(x_6)+f(x_7) + f(x_8)\Bigg]$$

$$= \dfrac{1}{3} \Bigg[f(1)+4f(2)+2f(3)+4f(4)+2f(5)+4f(6)+2f(7)+4f(8)+f(9)\Bigg]$$

$$=\dfrac{1}{3}\Bigg[0+4\sqrt{7} + 2\sqrt{26} + 4\sqrt{63} + 2 \sqrt{124} + 4\sqrt{215} + 2 \sqrt{342} + 4\sqrt{511} + \sqrt{728}\Bigg]$$

$$=\dfrac{1}{12}\Bigg[287.8417\Bigg]\\=95.9472$$

### Use Simpson's rule with $$n =8$$ to estimate the value of $$I=\int\limits_1^9\sqrt{x^3-1} \,\,dx$$ to four places of decimal.

A

$$95.9472$$

.

B

$$18.2356$$

C

$$1200.2815$$

D

$$.0186$$

Option A is Correct

# The Trapezoidal Rule for Approximating the Integrals

## Need for approximating the integral

There are two situations in which it is not possible to find the exact value of definite integral.

1.  When we try to evaluate $$\int\limits_a^bf(x)dx$$ and are unable to find the indefinite integral of f(x).
2. When function is determined through scientific experiment through instrumental reading and there is no formula for the function.

In both the above cases there is a need to find the approximate value of definite integral.

### Trapezoidal Rule

In this rule of approximation,

$$\int\limits_a^b\,f(x) \simeq T_n = \dfrac{\Delta x}{2} \Bigg[f(x_0) + 2f(x_1) + 2f(x_2) + .......+ 2f(x_{n–1}) + f(x_n)\Bigg]$$

Where,  $$\Delta x = \dfrac {b-a}{n},x_i=a+i\Delta x$$  Each shaded portion is a trapezium and we add all the trapezium areas.

For n=5,Shaded area,$$=\dfrac{1}{2}\bigg(f(x_0) + f(x_1)\bigg) \Delta x + \dfrac {1}{2} \bigg(f(x_1) + f(x_2)\bigg) \Delta x + ..........+ \dfrac {1}{2} \bigg(f(x_n) + f(b)\bigg)\Delta x$$

$$=\dfrac{\Delta x}{2}\Bigg[\underbrace {f(x_0)}_{f(a)} + 2f(x_1) + ..............+ 2f(x_4) + \underbrace {f(x_5)}_{f(b)}\Bigg]$$

#### Use trapezoidal rule to approximate the value of  $$I= \int\limits_0^4 cos\sqrt {x}\,dx$$ to four decimal places by taking n = 4.

A 0.1762

B 0.8276

C -1.2905

D 0.0075

×

By trapezoidal rule of approximation

$$\int\limits_a^b\,f(x) \simeq \dfrac{\Delta x}{2} \Bigg[f(x_0) + 2f(x_1) + 2f(x_2) + .......+ 2f(x_{n–1}) + f(x_n)\Bigg]$$

$$=T_n$$

Where,  $$\Delta x = \dfrac {b-a}{n},x_i=a+i\Delta x$$

In this problem,

n = 4, a = 0, b = 4, f(x) = $$cos\sqrt {x}$$

$$\therefore$$$$\Delta x=\dfrac{4–0}{4}=1,\,\, x_0=0, x_1=1,\,\, x_2=2, \,\,x_3=3x, \,\,x_4=b=4$$

$$\therefore$$ $$\int\limits_0^4 cos\sqrt{x}dx\cong T_4=\dfrac{\Delta x}{2}\Bigg[ f(x_0) + 2f(x_1) + 2f(x_2) + 2f(x_3) + f(x_n)\Bigg]$$

$$=\dfrac{1}{2}\Bigg[ f(0) + 2f(1) + 2f(2) + 2f(3) + f(4)\Bigg]$$

$$=\dfrac{1}{2}\Bigg[ cos0 +2cos\sqrt1 + 2cos\sqrt 2 + 2cos\sqrt3 + cos\sqrt 4\Bigg]$$

$$=\dfrac{1}{2}[1.6552]\\=0.8276$$

### Use trapezoidal rule to approximate the value of  $$I= \int\limits_0^4 cos\sqrt {x}\,dx$$ to four decimal places by taking n = 4.

A

0.1762

.

B

0.8276

C

-1.2905

D

0.0075

Option B is Correct

# The Trapezoidal Rule for Approximating the Integrals

## Need for approximating the integral

There are two situations in which it is not possible to find the exact value of definite integral.

1.  When we try to evaluate $$\int\limits_a^bf(x)dx$$ and are unable to find the indefinite integral of f(x).
2. When function is determined through scientific experiment through instrumental reading and there is no formula for the function.

In both the above cases there is a need to find the approximate value of definite integral.

### Trapezoidal Rule

In this rule of approximation,

$$\int\limits_a^b\,f(x)dx \simeq T_n = \dfrac{\Delta x}{2} \Bigg[f(x_0) + 2f(x_1) + 2f(x_2) + .......+ 2f(x_{n–1}) + f(x_n)\Bigg]$$

Where,  $$\Delta x = \dfrac {b-a}{n},x_i=a+i\Delta x$$

Each shaded portion  is a trapezium and we add all the trapezium areas.

Shaded area$$=\dfrac{1}{2}\bigg(f(x_0) + f(x_1)\bigg) \Delta x + \dfrac {1}{2} \bigg(f(x_1) + f(x_2)\bigg) \Delta x + ..........+ \dfrac {1}{2} \bigg(f(x_n) + f(b)\bigg)\Delta x$$

$$=\dfrac{\Delta x}{2}\Bigg[\underbrace {f(x_0)}_{f(a)} + 2f(x_1) + ..............+ 2f(x_4) + \underbrace {f(x_5)}_{f(b)}\Bigg]$$

#### Use trapezoidal rule to approximate the value of  $$I= \int\limits_0^4 \dfrac{e^x}{1+x}dx$$ to four decimals by taking n = 8.

A $$2.6253$$

B $$14.2673$$

C $$24.2625$$

D $$105.1234$$

×

By trapezoidal rule of approximation,

$$\int\limits_a^b\,f(x)dx \simeq \dfrac{\Delta x}{2} \Bigg[f(x_0) + 2f(x_1) + 2f(x_2) + .......+ 2f(x_{n–1}) + f(x_n)\Bigg]$$

$$=T_n$$

Where,  $$\Delta x = \dfrac {b-a}{n},\,\,\,x_i=a+i\Delta x$$

In this problem,

n = 8, a = 0, b = 4, $$f(x) = \dfrac{e^x}{1+x}$$

$$\therefore$$$$\Delta x=\dfrac{4–0}{8}=\dfrac {1}{2}, \,\,x_0=0, x_1=\dfrac{1}{2}, \,\,x_2=1,\,\, x_3=\dfrac {3}{2}, \,\,x_4=2,$$

$$x_5=\dfrac{5}{2},\,\, x_6=3, \,\,x_7=\dfrac {7}{2},\,\, x_8 = b = 4$$

$$\therefore$$$$\int\limits_0^4 \dfrac{e^x}{1+x}dx\cong T_8=\dfrac{\Delta x}{2}\Bigg[ f(x_0) + 2f(x_1) + 2f(x_2) + 2f(x_3)+............ + f(x_8)\Bigg]$$

$$=\dfrac{1}{4}\Bigg[ f(0) + 2f\bigg(\dfrac{1}{2}\bigg) + 2f(1) + 2f\bigg(\dfrac{3}{2}\bigg) + 2f(2) + 2f\bigg(\dfrac{5}{2}\bigg) + 2f({3}) + 2f\bigg(\dfrac{7}{2}\bigg) + f(4)\Bigg]$$

$$=\dfrac{1}{4}\Bigg[\dfrac{e^0}{1 + 0} +\dfrac{2e^{{1}/{2}}}{1 + \dfrac{1}{2}} + \dfrac{2e^1}{1+1}+\dfrac{2e^{{3}/{2}}}{1+\dfrac{3}{2}} + \dfrac {2e^2}{1+2} + \dfrac{2e^{{5}/{2}}}{1+\dfrac{5}{2}} + \dfrac{2e^3}{1 + 3} + \dfrac {2e^{{7}/{2}}}{1+ \dfrac{7}{2}}+\dfrac{e^4}{1+4} \Bigg]$$

$$=\dfrac{1}{4}[57.0693]\\=14.2673$$

### Use trapezoidal rule to approximate the value of  $$I= \int\limits_0^4 \dfrac{e^x}{1+x}dx$$ to four decimals by taking n = 8.

A

$$2.6253$$

.

B

$$14.2673$$

C

$$24.2625$$

D

$$105.1234$$

Option B is Correct