if the function f(x) is continuous on [a,b], then
"{\\int\\limits_a^b {f\\left( x \\right)dx} }\\approx{ {\\frac{{h}}{3}}\\left[ {f\\left( {{x_0}} \\right) + 4f\\left( {{x_1}} \\right) }\\right.}+{\\left.{ 2f\\left( {{x_2}} \\right) + 4f\\left( {{x_3}} \\right) }\\right.}+{\\left.{ 2f\\left( {{x_4}} \\right) + \\cdots }\\right.}+{\\left.{ 4f\\left( {{x_{n \u2013 1}}} \\right) + f\\left( {{x_n}} \\right)} \\right].}"
by the terms of the problem
f(x) = x2 - x +3
a = 0; b = 8
width of each subinterval is
"h=\\frac{8-0}{8} =1"
endpoints xi have coordinates:
xi = {0,1,2,3,4,5,6,7,8}
Calculate the function values at the points xi
f(x0) = f(0) = 02 - 0 + 3 = 3
f(x1) = f(1) = 12 - 1 + 3 = 3
f(x2) = f(2) = 22 - 2 + 3 = 5
f(x3) = f(2) = 32 - 3 + 3 = 9
f(x4) = f(2) = 42 - 4 + 3 = 15
f(x5) = f(2) = 52 - 5 + 3 = 23
f(x6) = f(2) = 62 - 6 + 3 = 33
f(x7) = f(2) = 72 - 7 + 3 = 45
f(x8) = f(2) = 82 - 8 + 3 = 59
Substitute all these values into the Simpson’s Rule formula:
"{\\int\\limits_0^8 {\\left( x^2 - x + 3 \\right)dx} }\\approx\\frac{{h}}{3}" [f(x0)+4f(x1) +2f(x2)+4f(x3) +2f(x4)+4f(x5) +2f(x6)+2f(x7)+f(x8)] =
"\\frac{{h}}{3}" [f(x0) +4*(f(x1) + f(x3) + f(x5) + f(x7)) + 2*(f(x2) + f(x4) + f(x6) + f(x7)) + f(x8)] =
"\\frac{{1}}{3}" [3 + 4*(3 +9 + 23 + 45) + 2*(5 +15 +33)+59] = 488/3 "\\approx" 162.667
Comments
Leave a comment