Hey guys,
I have the function f(x) =(sin(x) + 1)/(x^2 + 1) where x =-Pi/2 and 3Pi/2
1) I first set up an intgral for the function: 
2) I try to estimate the integral with n=5 using the Midpoint rule: middlesum(f(x), x=-Pi/2..3Pi/2); evalf(%);
3) Now, here's my question: I need to find the upper bound for the error in the estimate in part 2. Here's what I have so far. Please show me what I'm doing wrong here:
simplify(diff(f(x), x$2))

plot(diff(f(x), x$2, x=-Pi/2..3Pi/2))

"The absolute value of the second derivative is greatest when x=-.645)"
"I then plug x to the second derivative equation which gives me: -2.564"
Upper bound formula = K(b-a)^3/24n^2
-2.564(3Pi/2 - Pi/2)/24*5^2
-0.004273333333 Pi --> final answer
"Please check if theres something that I need to fix. Any feedbacks would be appreciated."