Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [simpsons-rule]

For questions regarding Simpson's rule and its applications.

-1
votes
0answers
16 views

Newton-Cotes formula 1 [closed]

hi I am looking for proof of theory of newton cotes formula integral in detail
0
votes
0answers
19 views

Integrating lagrange polynomial with equispaced points

Suppose we have some second order polynomial interpolant, $P_2$, defined on the equispaced points $x_0, x_1, x_2$, such that $x_{j+1}-x_j=h$. From $P_2$, we have Lagrange polynomials, $L_0, L_1, L_2$. ...
0
votes
0answers
20 views

What is the error bound of this integration using Simpson's rule?

How large should $n$ be to guarantee that the Simpson’s Rule approximation to $\int_0^1 e^{x^2}dx$ is accurate to within $0.00001$? So I know the error bound formula is: $$\frac{k\cdot(b-a)^5}{180n^...
0
votes
1answer
35 views

Am I using the Simpsons rule and Gauss-Legendre method correctly? [closed]

I have the integral here: Simpsons rule: Answer 414.11411 Gauss-Legendre method Here the limits are x+y I found the answer to be around 0.923 Just wanted to make sure these values are correct.
3
votes
2answers
41 views

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 ...
1
vote
1answer
57 views

How do I calculate $\int_1^3$ $x \ln (x)\ dx$ with a given accuracy, using Simpson's rule?

How do I calculate $\int_1^3 x \ln (x)\ dx$ with a given accuracy, in this case $10^{-4}$ using Simpson's rule? The problem I encounter is that the fourth derivative is $=2/x^3$. So how do I go ...
1
vote
1answer
42 views

Simpson's Rule over [-3,3]

To Find $I = \int_{-3}^3 \sin x^4 dx$ using the Simpson's (Parabolic) rule with $n=6$ intervals. $h=\frac{b-a}{n}=\frac{3-(-3)}{6}=1$ \begin{array}{|c|c|c|}\hline x\rightarrow&x_0&x_1&...
1
vote
0answers
60 views

Simpson vs. trapezoidal rule for numerically integrating $\cos{x}\cosh{x}$ in range 0 to $\pi$?

I have to numerically calculate many integrals similar to this: $$\int_0^\pi \cosh{\left(\frac{a_1\cos{x}+a_2\cos{2x}+a_3\cos{3x}+\ldots}{10}\right)}\cos{jx}\cos{kx}\space dx$$ Right now I am using ...
1
vote
0answers
31 views

Integrating using Simpson's Rule

Suppose there are functions $$ g(x) = \frac{(2 \cdot \lfloor x\rfloor)}{(3\cdot x - \lfloor x \rfloor)} \tag{1}$$ and $$ f(x) =\frac{\mid g(x)\mid}{ g(x)} \tag{2} $$ Now how do we do the definite ...
0
votes
2answers
209 views

What is the order of the midpoint rule?

If the Trapezoidal-Rule has the order $n=1$, and Simpson's has order $n=2$, what is the order $n$ of the midpoint rule? And if the weights of the Trapeziumrule are ($1/2, 1/2$) and those of the ...
0
votes
1answer
105 views

Numerical solution of generalized Fresnel integral

We need to find an approximate solution for the generalized Fresnel integral: $\int_0^S \cos(as+\frac{bs^2}{2}+\frac{cs^3}{3}+\frac{ds^4}{4})ds$ Our approach is to use the Simpsons rule: $\int_a^bf(...
0
votes
1answer
100 views

Modified simpson's rule for varying step sizes

I'm reading the paper A Modified Simpson's Rule and Fortran Subroutine for Cumulative Numerical Integration of a Function Defined by Data Points by L.V. Blake, and it notes, on page 8 a further ...
2
votes
2answers
206 views

Implementation of cumulative simpson method

I am working on a program which uses cumulative integration methods to solve differential equations, and I want to confirm that my implementation of the Simpson method is correct, as I could not find ...
0
votes
0answers
20 views

How to determine the number of intervals required in Trapezoidal rule based on the required precision value? [duplicate]

Evaluate $\int_{0}^{1}e^{-{x}^2} dx$ using the composite trapezoidal rule with four decimal precision, i.e, with the absolute value of the error not exceeding $5 \cdot 10^{-5}$. To solve this ...
1
vote
1answer
191 views

Richardson extrapolation Simpson's rule

"Assume that S(h) is equivalent to the (composite) Simpson's rule where h is the size of the step. Correct use of Richardson's extrapolation gives the formula: $R(h) = \frac {16S(h)-S(a)} {b}$. What's ...
0
votes
0answers
87 views

Use Simpson's rule to estimate the error of integral $\int_1^5 \ln(x) \mathrm dx$

In my homework I'm requested to estimate the error of the definite integral: $$\int_1^5 \ln(x) \mathrm dx$$ I am also given the formula: $$|E_n|<= \frac {(K(b-a)^5)}{180N^4}$$ Where K is an ...
0
votes
1answer
73 views

How to approximate the following improper integral by using Simpson's rule

I am trying to approximate the following integral by using Simpson's Rule with $n=6$ $$I = \int_{1}^{\infty} \frac{\sin(x)}{x^4} dx$$ The textbook I am using for Numerical Analysis (Burden, Faires 9-...
0
votes
0answers
81 views

Why use Lagrange quadratic interpolation to find the error in Simpsons 1/3 rd rule, why not use the Taylor series for a function directly?

I was doing the approximate integration chapter and there was a portion related to finding errors, for example in trapezoidal rule we have: $$\int_{x_0}^{x_1} y \, dx = \int_{x_0}^{x_1} y_0 +(x-x_0)...
1
vote
2answers
54 views

Understanding Example of Simpson's Rule

Using figure 8, let $x_0 = -h, x_1=0, x_2=h$ So the area under the curve is exemplified below: $$\int_{-h}^h(Ax^2+Bx+C)dx=2\int_0^h(Ax^2+C)dx$$ $$=2\left[A\frac{x^3}{3}+Cx\right]_0^h$$ $$=2\left(A\...
0
votes
2answers
64 views

How to find Simpson's rule

Can anyone help me find my mistake? $$I = \int_0^2 f(x) ~ dx, \qquad f(x)=\frac {3^x}{x+1}$$ I got $f(0)=1$ $f(0)=1$ $f(1/2)=\frac{2(3^{1/2})}3$ $f(1)=3/2$ $f(3/2)=\frac{6(3^{1/2})}5$ $f(2)=3$ ...
2
votes
1answer
167 views

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}$$ ...
0
votes
1answer
43 views

Step in proof: error Simpson's rule for $f\in C^4$

They claim later on in the proof that $G’(0)=0$. I don’t see this. I would say that we have $$ G(t)=\int_0^tF(\tau)d\tau-\int_0^{-t}F(\tau)d\tau-t/3[F(-t)+4F(0)+F(t)], $$ which yields $$ G’(0)=F(0)-F(...
1
vote
1answer
343 views

Error Expectations for Composite Simpson's Rule

I have written a program that implements the composite Simpson's rule for integrating functions over the interval $[0,1]$. In checking the program for correctness, I test the routine on the integral $\...
0
votes
1answer
80 views

How large should $n$ be to guarantee that the Simpson's Rule approximation on $\int_0^1 9e^{x^2} dx$ is accurate to within $0.0001$?

Please help I am really struggling with this problem. I have been working on it and trying to look up how to do it but nothing is making sense. Thank you!
0
votes
1answer
52 views

Approximate derivative in midpoint rule error with notation of Big O

Error of midpoint rule is $E_m = \frac{f''(c)}{24}(b-a)^3$, where $c\in (a, b) $. I made research and I found out that i can approximate it by $E_m = \frac{f''(a)}{24}(b-a)^3 + O((b-a)^4)$, but i don'...
0
votes
0answers
36 views

On Newton-Cotes functions for higher derivates

Newton-Cotes formulas simply have a usage for approximating definite integrals. One can get more information on here about Newton-Cotes formulas. For instance, Simpson's rule gives $$\int_{x_1}^{x_3} ...
1
vote
1answer
66 views

Quadrature rule for spline interpolation

Consider an integrable function $f$ on $[-1,1]$. We denote $\left(x_j\right)_{-N}^{N}$ the equally spaced grid on $[-1,1]$, and wish to compute the integral $I = \int\limits_{-1}^{1} f(x) \, dx$ using ...
2
votes
0answers
34 views

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. ...
1
vote
1answer
185 views

How can Simpson Rule use curves to find the Integral?

If Integration is about finding the Area under the curve, how can the Simpson Rule use curved Parabolas to find Area under the slice? I understand the Trapezoid rule because it uses triangles which ...
0
votes
1answer
100 views

Numerical Integration: How do you numerically integrate functions which include derivatives within the integrand?

I am given the problem to find $B(y)$ by solving the following integral numerically: $$B(y) = \int_{z=0}^{\infty}\frac{1}{\sigma (y,z)}\frac{\partial^2 A(y,z)}{\partial z^2}+\frac{\partial A(y,z)}{\...
1
vote
1answer
128 views

Simson's Rule but Intervals Aren't the Same

I'm currently working on some homework, and ran into a question that has stumped me. We're working on Simpson's rule, which is easy enough, but then I got to a problem where the intervals aren't the ...
0
votes
2answers
32 views

Error in the simpson estimate

We can't find integrals of some fumulas like $sinx^2$, but we can get a approximate value using methods like the simpson method. Since only one order-two equation exits which passes 3 points, we ...
1
vote
1answer
1k views

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 ...
0
votes
1answer
84 views

Calculating Middle Points when using Simpson's Rule

I've been learning Excel-VBA and trying to implement some basic functions using numerical analysis techniques. One of the things I'm working on implementing is Simpson's Rule for numerical Integrals: $...
0
votes
0answers
44 views

Approaching an integral with the Simpson type

Lets say $f(x) = e^x$ and we approach the integral $$\int_a^b f(x)\, dx$$ with the Simpson type $$Q(f)=(b-a)/6{f(a)+4f((a+b)/2)+f(b)}$$ how can i prove that: $\int_a^b f(x)\,dx < Q(f)$? (also $...
1
vote
1answer
2k views

Why trapezoidal rule is giving better answers for some functions than Simpson's 1/3 rule? [duplicate]

Use appropriate quadrature formulae out of the trapezoidal and Simpson's rules to numerically integrate $\int_0^1\frac{dx}{1+x^2}$ with $h=0.2$. Hence obtain an approximate value of $\pi$. Justify the ...
2
votes
1answer
821 views

Find the arc length using Simpsons rule

I'm trying to find the arc length using Simpsons formula for this function: $\int_{0}^{\pi}\sqrt{1+cos^2(x)}$ where $h=\frac{\pi}{6}$ I've seen online that people solve this type of examples so that ...
2
votes
1answer
4k views

Can someone derive the Simpson's 3/8 rule using the method of undetermined coefficients?

I'll derive Simpson's 1/3 rule using this method to show what I mean: Simpson’s 1/3 rule involves fitting a quadratic through three points, so put: $$I_2=\int_{x_0}^{x_2} f(x) \space dx = ...
1
vote
4answers
182 views

Simpson's Rule in Numerical Integration

I have a problem in proving that the simple Simpson’s rule $$\int_a^b f(x) dx \approx \frac{(b − a)}6[ f (a) + 4 f \left(\frac{a + b}{2}\right) + f (b)]$$ is exact for all cubic polynomials. I am ...
2
votes
2answers
310 views

Is desmos plotting this fuction incorrectly?

I was just plotting a function in desmos: $f(x) = \frac{a}{b+x}$. I wanted to plot the integral, but desmos doesn't support indefinite integrals of functions, so to model the integral I used Simpsons ...
12
votes
4answers
3k views

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 ...
1
vote
0answers
223 views

Simpson's rule with error $0$

I know that Simpson's rule is exact on all intervals for polynomials with $\deg(f) \leq 3$, but are these the only functions with the rule is exact for on all intervals? If so how would I prove this?
0
votes
0answers
32 views

How would you set up this integral to where you can perform Simpson's rule?

Not sure how to set up my deltax or even begin with this setting this problem up in general. Any help would be appreciated.
2
votes
1answer
6k views

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)/...
1
vote
0answers
28 views

Adjustment of Simpson rule 1 and 2

I am a naval engineering student and have a problem with Simpson rules. I am using rule for calculation of a surface of waterline (that is a surface of a ship at particular draft and it looks like a ...
1
vote
1answer
82 views

Find the error of the approximation for $\int_{-1}^{1} f(x) dx$ for

Find the error of the approximation for $\int_{-1}^1 f(x) dx$ for a. $f(1) + f(-1)$ b. $\frac{2}{3}(f(-1) + f(0) + f(1))$ c. $f(\frac{-1}{\sqrt{3}}) + f(\frac{1}{\sqrt{3}})$ To me it looks like ...
2
votes
3answers
92 views

Numerical integration of $\int_a^bf(x) \: \text{d}x$ for $f(x) \to \infty$ when $x \to b$

This is the function I am trying to approximate using Simpson's rule: $$\int_0^1 f(x) \: \text{d}x =\int_0^1 \frac{e^x}{\sqrt{1-x^2}} \: \text{d}x.$$ Of course, Simpson's rule is of the form $$\...
1
vote
0answers
163 views

Composite rule of Newton cotes? Simpson + Trapzoid

What is the best combination of Trapezoidal rule and Simpson's rule to solve this problem? I used: Trapz from 1 to 2 1/3 Simpson's from 2 to 4.5 Trapz from 4.5 to 6 3/8 Simpson's from 6 to 9 1/3 ...
1
vote
2answers
300 views

Simpsons rule to estimate how much farther one racer drove.

Okay please first tell me if my method is right. I use simpsons rule, which is $$\frac{\Delta x}{3} \left[ f(x_0) + 4f(x_1) + 2f(x_2) + ... + 2f(x_{n-2}) + 4f(x_{n-1}) + f(x_n) \right]$$ where $\...
1
vote
1answer
495 views

Rate of convergence for quadratures

How can I find the observed (practical) order of convergence of a quadrature? I remember the formula $\frac{|x_{n+1}-x_{n}|}{|x_{n}-x_{n-1}|^q}$ but does this work here aswell? This formula gives me ...