Determine theminimum number of subintervals to estimate the value of integral(8sin(x+3)dx). Lower limit: -1, Upper limit: 3 with an error of less than 5 x 10^-4.
a. Trapezoidal's Rule
b. Simpsons's Rule
Error for Trap rule is $\displaystyle E(t) = k(b-a)^3/(12n^2)$, in your case $\displaystyle E(t) = .0005$
K is the absolute maximum value of the 2nd derivative of the function which you are evaluating the integral of between a and b, which for$\displaystyle \int^1_0 8sin(x+3)\ dx$ is $\displaystyle -8sin(x+3)$. $\displaystyle d^2y/d^2x = -8sin(x+3)$. Between -1 and 3, this function has a maximum value of $\displaystyle y = 8$ at $\displaystyle x=1.71239$. Therefore, $\displaystyle k = 8$. Now your error function looks like this:
$\displaystyle E(t) = 8(b-a)^3/(12n^2)$ ; setting the equation equal to $\displaystyle .0005$ and solving for $\displaystyle n$ given $\displaystyle a = -1$ and $\displaystyle b=3$, you get $\displaystyle n = 292.119$, and since $\displaystyle n$ is usually a whole number, it is critical to round upwards. Therefore, your minimum $\displaystyle n $value to achieve an error of $\displaystyle <.0005$ is $\displaystyle n=293$. Consequently, if you plug 293 into the original error function you get $\displaystyle E(t) = .000497$, so that checks out.
Error for Simpson's Rule is $\displaystyle E(s) = k(b-a)^5/(180n^4)$. With simpson's rule, $\displaystyle k$ is calculated by attaining the absolute maximum value of the fourth derivative, being $\displaystyle d^4y/d^4x = 8sin(x+3)$. The absolute maximum value of this function between $\displaystyle a = -1$ and $\displaystyle b = 3$ is again $\displaystyle y = 8$ at $\displaystyle x = 1.71239$. You may notice the value of the function at that$\displaystyle x = 1.71239$ is $\displaystyle y = -8$, but again we're dealing with absolute values. Your equation is now $\displaystyle E(s) = 8(b-a)^5/(180n^4)$. Setting the equation equal to .0005 given $\displaystyle a = -1$ and $\displaystyle b = 3$, you get $\displaystyle n = 17.3695$, but again rounding up to the next minimum whole number the answer is $\displaystyle n = 18$. If you plug this back into the error equation for Simpson's rule, your maximum error for $\displaystyle n = 18$ is $\displaystyle .000434$, so again that checks out as well.
Anyways, I hope this helps, and correct me if I am wrong, but these are the numbers I got.