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.

0
votes
1answer
14 views

Simpsons rule problem. why is this equation setup this way?

I am a bit confused as to why a problem in my book is using A(t) instead of D(t) in teh setup for simpsons rule. Why is the integral at the end setup like: $$\int_0^43200 A(t)dt$$ and not $$\int_0^...
0
votes
1answer
23 views

Estimating with simpson rule

I have a question that is supposed to be very easy in a test: We approximate $\displaystyle \int_0^1 x^2$ with Simpsonrule, and 5 intervals. Choose solution: Firstly I don't understand what is meant ...
0
votes
1answer
40 views

Give a function for which Simpson's rule returns an exact value

Let I denote the integral $I = \int_0^{\pi/2}\sqrt{\sin x}dx$ and 4 strips. Give a function for which Simpson’s rule returns an exact value. I just entered in the exact values (so $\sin(\pi/2)$ for ...
0
votes
0answers
21 views

Integration by interpolation matlab

Hi I would like to write a program for integration in Matlab using the interpolation coefficients from piecewise Lagrange interpolation: $$\int f dx = \sum \frac{c_i}{n+1-i}(x-m)^{n+1-i}$$ This is ...
1
vote
0answers
19 views

How to derive Adam Moulton 2 step implicit method using taylor expansion

I have some confusion on the derivation of multistep method using Taylor expansions. For example, we want to derive the linear 2 step Simpson's rule: My professor first write down the scheme of an ...
0
votes
1answer
61 views

Evaluate $\int_0^\pi \frac {\sin x}{x} \,dx$ using Simpson's $\frac {1}{3}$ rule and $\frac {3}{8}$ rule with $n=6$

Evaluate $\displaystyle\int_0^\pi \frac {\sin x}{x}\,dx$ using Simpson's $\dfrac {1}{3}$ rule and $\dfrac {3}{8}$ rule with $n=6$. For $n=6$, $h=\dfrac {\pi - 0}{6}=\dfrac {\pi}{6}$. But, the ...
0
votes
0answers
29 views

Get approximation of integral using spline and simpson rule

I would like some help figuring out how to do this: I was given a function - $f$ and $f'$ With 7 consecutive derivatives in [a,b] ,samples: $x_k = a+kh$ $h=\frac{b-a}{n}$ , a spline function S:[a,b]$...
0
votes
2answers
32 views

Simpson's Rule Via Table

Alright, so I'm a bit stumped on this one. I learned Simpson's rule via my textbook as follows: $$\frac{h}{3}[y_0 + y_n + 2(y_2+y_4+...+y_{n-2}) + 4(y_1+y_3+...+y_{n-1})]$$ I was given a problem ...
0
votes
0answers
31 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
25 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
38 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
45 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
62 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
47 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
97 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
33 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
305 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
133 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
106 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
289 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
272 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
107 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
87 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-...
1
vote
2answers
64 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
66 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
194 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
45 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
458 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
88 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
59 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
37 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
76 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
36 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
204 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
123 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
131 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
35 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
93 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
45 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
975 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
5k 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
199 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
353 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
236 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
7k 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)/...