To Find $I = \int_{-3}^3 \sin x^4 dx$ using the Simpson's (Parabolic) rule with $n=6$ intervals.


\begin{array}{|c|c|c|}\hline x\rightarrow&x_0&x_1&x_2&x_3&x_4&x_5&x_6\\ \hline&-3&-2&-1&0&1&2&3\\ \hline y=\sin x^4\rightarrow&-0.629&-0.287&0.841&0&0.841&-0.287&-0.629\\ \hline &y_0&y_1&y_2&y_3&y_4&y_5&y_6\\ \hline \end{array}

According to the Simpson's rule:

$I = \frac{h}{3}[y_0+y_6+2(y_1+y_3+y_5)+4(y_2+y_4)] $

$I = \frac{1}{3}[-0.629-0.629)+2(-0.287+0-0.287)+4(0.841+0.841)] = -0.0657$

So the result with the Simpson's method is -0.0657. But the actual value of the integral is 0.67946. The result with wolframalpha is 0.294673.

Do we need to break the interval at x=0 in [-3,0] and [0,3] and add the two results?

  • 1
    $\begingroup$ This function oscillates wildly (draw the graph!). With so few intervals, one cannot expect an accurate estimate to the integral. $\endgroup$ – Lord Shark the Unknown Oct 24 '18 at 6:41
  • $\begingroup$ Yes, I see that it oscillates wildly. So can we guess the approximate value of n (number of intervals) for a good result? $\endgroup$ – simajinid Oct 24 '18 at 6:48

The error in approximating an integral using Simpson's rule is

$$-\dfrac{1}{90}\left(\dfrac{b-a}{2}\right)^5 f^{(4)}(\xi) =-2.7 f^{(4)}(\xi)$$

for some $\xi \in [a, b]$.

$$\dfrac{d^4}{dx^4}(\sin x^4) = 16(16 x^8 - 51) x^4\sin(x^4) + 8(3-144x^8)\cos(x^4)$$

So, at $\xi=2.9$ (for example), $-2.7 f^{(4)}(\xi) = -2.4484×10^8$

Of course, this only indicates that the error could be a really large number but it does say that using Simpson's rule in this case is a bad idea.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.