Questions tagged [simpsons-rule]

For questions regarding Simpson's rule for approximating the integral of a function using quadratic polynomials, and its applications.

Simpson's rule is a technique for estimating integrals numerically, and can be written as

$$\int_a^b f(x) dx \approx \frac{b - a}{6} \left[f(a) + 4f\left(\frac{a + b}{2}\right) + f(b)\right]$$

Simpson's rule can be derived by using a quadratic approximation for $f$, or it can be viewed as a weighted average of the trapezoid and midpoint rules. The error involved can be bounded above by

$$\frac{1}{90} \left(\frac{b - a}{2}\right)^5 \left|f^{(4)}(\xi)\right|$$

where $\xi$ is a number between $a$ and $b$.

Reference: Simpson's rule.

148 questions
20
votes
0 answers

Simpson's Rule for Double Integrals

Simpson's Rule for double integrals: $$\int_a^b\int_c^df(x,y) \,dx \,dy$$ is given by $$S_{mn}=\frac{(b-a)(d-c)}{9mn} \sum_{i,j=0,0}^{m,n} W_{i+1,j+1} f(x_i,y_j) $$ where: $$W= \begin{pmatrix} 1&4&2&4&…
17
votes
4 answers

Numerical Integration for integrable singularity

Till this time i have learned three numerical technique to find the definite integration. They are Simpson, Trapezoidal and Gauss-legendre formula. The sad thing is that I can't apply these theorem directly of my integration has any integrable…
8
votes
0 answers

Improvement of Simpson's rule

Let $I_n$ denote the approximation of $$I = \int_a^b f(x)dx$$ obtained by applying Simpson's rule with $2n$ intervals of uniform length. Define a new approximation $$J_n=\frac{16I_{2n}-I_n}{15}.$$ Find the formula for the error $\int_a^b…
5
votes
1 answer

Integration of a function approximated by a nth order polynomial

I've been playing with Simpson's rule and a thing came up to my mind. The rectangular rule is a 0th order polynomial approximation of integration. The trapezoidal rule is 1st. Simpson's rule is 2nd. Then what about nth? I've been working on this…
dixhom
  • 175
4
votes
2 answers

Simpson rule for double integral

Compute a quadrature of $\int_c^d\int_a^b f(x,y)dxdy$ using the Simpson rule and estimate the error. So the Simpson rule says $S(f) = (b-a)/6(f(a)+4f((a+b)/2) +f(b))$ So i get $\int_c^d(b-a)/6(f(a)+4f((a+b)/2) +f(b))dy$ Is that even correct? How…
user396039
3
votes
4 answers

Why does Simpson's rule provide exact results for any polynomial of degree 3 or less?

Here is the solution that was given to me for the question, "Under what circumstances could the Simpson’s rule guarantee an exact result of an integral?": "Since the error term is proportional to the fourth derivative of f, this shows that Simpson’s…
3
votes
1 answer

What is wrong with my derivation of Simpson's Rule via Lagrange interpolation? + Is my alternative a better approximation?

I understand that correct derivations exist on this site. I am, however, interested in why my workings are incorrect. Let $f(x)\approx L(x)=\sum_{n=0}^2\ell_n(x)\cdot f(c_i)$, where $c_i$ are three nodes which $L$ interpolates $f$ (quadratically)…
FShrike
  • 46,840
  • 3
  • 35
  • 94
3
votes
2 answers

Simpson's rule — where did the coefficients come from?

I am reading how Simpson's Rule works for numerical integration. So I understand that given the two endpoints $x_0$ and $x_2$, and one intermediate point $x_1$, we can connect these points to make a parabolic function as an approximation to the…
cgo
  • 1,970
3
votes
1 answer

Composite 2D Simpsons Rule with odd intervals

This question is an extension of this question for 2D integration. The formulation of the problem is based on this page Basically, the composite Simpson's rule for 2D integration is $ \iint_R f(x,y) dx dy\approx\sum_i\sum_jw_{ij}f(x_i,y_j) $ over…
3
votes
2 answers

Numerical Integration Bounded by Two Singularities

I would like to solve the following definite integral numerically using Simpson's Rule, however it has singularities at both ends. I was told it's possible to perform a simple change of variable in order to transform it into something usable, but…
3
votes
1 answer

Approximating optimal step size for numerical integrator

I am trying to find a formula to approximate the ideal step size for the Trapezoid and Simpson's rules. As an example, consider the finite difference formula $$g(x,h) = \frac{f(x+h)-f(x-h)}{2h}$$ where $\lim_{h \rightarrow 0} g(x,h) = f'(x)$. The…
Kai
  • 1,259
3
votes
1 answer

Simpson's Rule derived from Lagrange Interpolation. Confused, please help.

I'm reading my lecturer's notes on how to derive the Simpson's Rule using Lagrange's Interpolating Polynomial, but there's a point that doesn't quite seem right. Here's a screenshot of the notes pointing out where I'm confused: My problem is, how…
3
votes
4 answers

Combining error terms in Simpson's rule

My numerical analysis textbook (Burden and Faires) derives Simpson's rule…
3
votes
1 answer

How do $P( A | B , C) < P(A| B^c,C)$ and $P( A | B , C^c ) < P(A| B^c,C^c) \Longrightarrow P( A|B) > P(A|B^c)$?

In general, Simpson's Paradox occurs because situation such as following occurs for some arbitrary events $A,B,$ and $C$: $P( A | B , C) < P(A| B^c,C) \tag{1}$ $P( A | B , C^c ) < P(A| B^c,C^c) \tag{2}$ Can someone show me a step-by-step way to…
Jenna Maiz
  • 335
  • 1
  • 5
  • 12
2
votes
0 answers

Simpson's rule error rate for N-dimension

I'm doing a project that involves numerical method, but I'm not too familiar on calculus. I'm using Simpson's rule to integrate n-dimension gaussian, I was able to get the integration result for n-dimension, but how do I get the error rate? For…
1
2 3
9 10