Trapezoidal Rule

Trapezoidal Rule :


                  Let us suppose that the interval (a,b) be divided into n equal subintervals such that a = x₀,x₁.......xₙ₋₁,xₙ = b .

     We know from Newton's Forward Difference Interpolation Formula that 

  y = y₀ + sΔy₀ + s(s-1)/2!  Δ²y₀ 

                    +  s(s-1)(s-2)/3!  Δ³y₀.....
                                                          ..............(1)

Where xₙ = x₀ + nh and  x= x₀ + sh ......(2)

Integrating both sides of equation(1) between x₀ and xₙ , we get 
       xₙ             xₙ
        ∫ y dx = ∫ (y₀+sΔy₀+s(s-1)/2!  Δ²y₀
      x₀             x₀
   
                                  + s(s-1)(s-2)/3!  Δ³y₀+....)dx

     Using equation (2) in the above expression ,we get 
    xₙ               n
     ∫ y dx = h∫ (y₀+sΔy₀+s(s-1)/2!  Δ²y₀ 
    x₀              0

     
                         +s(s-1)(s-2)/3!  Δ³y₀+....)ds
     xₙ
or ∫ y dx = nh[y₀ +n/2 Δy₀ +n(2n-3)/12  Δ²y₀
    x₀

                         + n(n-2)²/24  Δ³y₀ +......].....(3)

Here  x= x₀ +sh

           dx = h ds 

When x= x₀ ,then x₀ = x₀ + sh

              ⇒s= 0 

Again x= x₀ + sh 

When x= xₙ , then xₙ = x₀ + sh and                   xₙ = x₀+nh

∴ x₀ +sh = x₀ + nh 

  ⇒ sh = nh ⇒ s= n

Putting n= 1 in equation (3) ,we get 
  x₁
  ∫ y dx = h[y₀ + 1/2  Δy₀]  ......(4)
  x₀

Since all other differences higher than the 1st becomes zero .

Now ,equation (4) can be written as 
    x₁
     ∫ y dx = h[y₀ + 1/2 (y₁-y₀) ] = h/2  [y₀+y₁]
    x₀                                          ..........(5)

Similarly we can get 
    x₂
    ∫ y dx = h/2  [ y₁ + y₂ ] ........(6)
   x₁
   x₃
   ∫ y dx = h/2  [ y₂ + y₃ ] ..........(7)
  x₂

.....................................................

.....................................................
 xₙ
 ∫ y dx = h/2  [ yₙ₋₁ + yₙ ] ............(8)
 xₙ₋₁

Combining all these integrals , we get 
  xₙ           x₁            x₂          x₃                  xₙ
  ∫ y dx = ∫ y dx + ∫ y dx + ∫ y dx + .....+∫ y dx
  x₀           x₀           x₁            x₂                xₙ₋₁

          = h/2  [y₀+y₁] + h/2 [y₁+y₂] + h/2   [y₂+y₃]

                 + ............+ h/2  [yₙ₋₁+yₙ] 

        = h/2  [ y₀ + 2(y₁+y₂+y₃+.....+yₙ₋₁) + yₙ]

                                           ....................(9)

Which is known as Trapezoidal Rule .

For Example :



                               1
             Compute ∫ x³ dx by Trapezoidal 
                              0

Rule , taking n = 5 .

Solution :


             Here f(x) = x³ and h= 1-0 /5 = 0.2 

  Now  x₀ = 0 , x₁ = 0.2 , x₂ = 0.4 , x₃ = 0.6 ,      x₄ =  0.8 , x₅ = 1.0 

By Tabulating 

x       0      0.2       0.4      0.6        0.8         1.0

f(x)   0    0.008   0.064  0.216    0.512      1.0

Using Trapezoidal rule , we get 
  1
  ∫ x³ dx = h/2  [y₀+ 2(y₁+y₂+y₃+y₄) + y₅]
  0
                                                                                     =0.2/2 [0+2(0.008+0.064+0.216+0.512)+1.0]

     = 2/20 [2 ⨯ (0.850) +1 ]

     = 1/10 (1.600 + 1)

     = 26/100 = 0.26  

Which is required answer .
                                                    


Comments

Popular posts from this blog

Accuracy Of Numbers

PFAFFIAN Differential Equations And It's Solutions

Complete Integral Of Partial Differential Equations