Tuesday, August 2, 2016

ALGORITHM OF TRAPEZOIDAL RULE


ALGORITHM OF TRAPEZOIDAL RULE

1-Enter value of lower limit (a) & upper limit (b)
2-Enter the no. of sub-intervals (n)
3-h = (b-a) / n
4- s = y(a) + y(b)
5- for (j=1 to n-1)
  {
   s = s+2*y(a+i*h)
   }
6-Result = (h/2) * s
7- Print result
8- Exit ( )

No comments:

Post a Comment