Error for Trap rule is , in your case

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 is . . Between -1 and 3, this function has a maximum value of at . Therefore, . Now your error function looks like this:

; setting the equation equal to and solving for given and , you get , and since is usually a whole number, it is critical to round upwards. Therefore, your minimum value to achieve an error of is . Consequently, if you plug 293 into the original error function you get , so that checks out.

Error for Simpson's Rule is . With simpson's rule, is calculated by attaining the absolute maximum value of the fourth derivative, being . The absolute maximum value of this function between and is again at . You may notice the value of the function at that is , but again we're dealing with absolute values. Your equation is now . Setting the equation equal to .0005 given and , you get , but again rounding up to the next minimum whole number the answer is . If you plug this back into the error equation for Simpson's rule, your maximum error for is , 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.