1. ## Numerical Integration

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

2. Error for Trap rule is $E(t) = k(b-a)^3/(12n^2)$, in your case $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 $\int^1_0 8sin(x+3)\ dx$ is $-8sin(x+3)$. $d^2y/d^2x = -8sin(x+3)$. Between -1 and 3, this function has a maximum value of $y = 8$ at $x=1.71239$. Therefore, $k = 8$. Now your error function looks like this:

$E(t) = 8(b-a)^3/(12n^2)$ ; setting the equation equal to $.0005$ and solving for $n$ given $a = -1$ and $b=3$, you get $n = 292.119$, and since $n$ is usually a whole number, it is critical to round upwards. Therefore, your minimum $n$value to achieve an error of $<.0005$ is $n=293$. Consequently, if you plug 293 into the original error function you get $E(t) = .000497$, so that checks out.

Error for Simpson's Rule is $E(s) = k(b-a)^5/(180n^4)$. With simpson's rule, $k$ is calculated by attaining the absolute maximum value of the fourth derivative, being $d^4y/d^4x = 8sin(x+3)$. The absolute maximum value of this function between $a = -1$ and $b = 3$ is again $y = 8$ at $x = 1.71239$. You may notice the value of the function at that $x = 1.71239$ is $y = -8$, but again we're dealing with absolute values. Your equation is now $E(s) = 8(b-a)^5/(180n^4)$. Setting the equation equal to .0005 given $a = -1$ and $b = 3$, you get $n = 17.3695$, but again rounding up to the next minimum whole number the answer is $n = 18$. If you plug this back into the error equation for Simpson's rule, your maximum error for $n = 18$ is $.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.