Tuesday, August 2, 2016

ALGORITHM OF SIMPSON 3/8 RULE

ALGORITHM OF SIMPSON 3/8 RULE


1-Enter value of upper limit (a) and lower limit(b)
2-Enter value of sub-interval (n)
3-h = (b-a) / n
4-s = y(a) +y(b)
5-for (j = 1 to n-1)
   if (j % 3 = = 0)
   s = s+2*y(a+j*h)
   else
   s= s +3*y(a+j*h)
6- result = 3*(h/8) * s
7-Print result
8-exit ( )

No comments:

Post a Comment