Questions tagged [simpsons-rule]

For questions regarding Simpson's rule 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.

138 questions
19
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…
4
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
  • 165
  • 4
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
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
  • 26,196
  • 3
  • 14
  • 51
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,763
  • 3
  • 15
  • 29
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…
Thales
  • 643
  • 5
  • 16
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,151
  • 1
  • 8
  • 16
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…
Max Echendu
  • 1,469
  • 1
  • 14
  • 19
3
votes
3 answers

Combining error terms in Simpson's rule

My numerical analysis textbook (Burden and Faires) derives Simpson's rule…
Peter Woolfitt
  • 20,914
  • 6
  • 54
  • 85
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
  • 307
  • 1
  • 3
  • 12
2
votes
0 answers

Can a Composite Simpson's Rule be applied in this case?

I have been given a table with three values of a function at three different points. In my textbook, the Composite Simpson's Rule has a following form: $I=\frac h6(f_0+4f_1+2f_2+4f_3+...+2f_{2n-2}+4f_{2n-1}+f_{2n})$ Can this formula be used if I do…
2
votes
1 answer

Error bound for $\cos(x^3)$ under Mn, Tn and Sn

In this problem we will approximate the integral of $\cos(x^3)$ over the interval $[0, 2]$. (a) Write an expression for MN, TN and SN with $N = 4$. (b) For each of the approximations determine an N so that the error is guaranteed to be less than…
user77117
  • 23
  • 2
2
votes
1 answer

How to use undefined value in Composite Simpson's Rule

I have to use the Composite Simpson's Rule to approximate the integral $\int_0^1 t^2\cdot sin(\frac{1}{t}) dt$. I've used the Composite Simpson's Rule, but when I work through the algorithm, one step is throwing me off. When I try to compute $XI0 =…
SSumner
  • 626
  • 1
  • 5
  • 20
1
2 3
9 10