[Math] Are the values correct for this Trapezoidal and Simpson’s rule problem

calculusintegration

$$ \int^5_0 100x \sqrt{125 – x^3} $$

Using the Trapezoidal rule, area = 9370

Using Simpson's rule, area = 8969

If my values are incorrect, I can provide you with the work I did and we can find where I messed up. The reason I'm doubting my answers is because there seems to be quite a big gap. (400).

edit…

For the Trapezoidal rule I did the following

  1. Plugged in x-value from 0 to 5 to get y-values.
  2. I then go from $x_1 – x_0 * \frac{y_0 + y_1}{2}$ and iterate until I get to 5.
  3. I take the sum of those values

I couldn't figure out how to get a table to work, but the math went something like this:

[0,1] $(1-0)*\frac{1114-0}{2}$ = 557

[1,2] $(2-1)*\frac{1638-1114}{2}$ = 1638

and so on all the way up to 5. Then I added up the area to get approximately 9370

For Simpson's Rule this is my work

  1. Plugged in the x-values to get my y-values
  2. I take $y_1 + (4*y_2) + y_3$ I then do this when x = 0, 2, and 4.
  3. I add up the results above to get approximately 8969

Best Answer

If you just want to check your answers, you may like to look at Simpson's Rule Calculator and Trapezoidal Rule Calculator.

With $n=4$, Simpson's Rule is
$$I\approx\frac{h}{3}(f(x_0) + 2f(x_2) + 4(f(x_1) + f(x_3)) + f(x_4))$$ where $h=\frac{5-0}{4}$ is your interval.

Edit
I'll show an easy way to write the expression with n=6, i.e. six subintervals.
Note that with six subintervals there are seven points at which you calculate values, $x_0, x_1, \cdots, x_6$.

First write the expression with the seven function evaluations:
$$\frac{h}{3}(f(x_0) + f(x_1) + f(x_2) + f(x_3) + f(x_4) + f(x_5) + f(x_6)).$$ Then, not including the first and last evaluations, write in alternating factors of $4$ and $2$: $$\frac{h}{3}(f(x_0) + 4f(x_1) + 2f(x_2) + 4f(x_3) + 2f(x_4) + 4f(x_5) + f(x_6)).$$ And that's it. The important thing to remember is that when you set $n$ it is the number of subintervals, and that the number of points is $n+1$.