The Significance of Simpsons Rule for Quadratic Polynomials

  • Thread starter lampCable
  • Start date
In summary, Simpson's rule is valid for cubics as well; that becomes clear upon taking a = -1 and b = 1, but only after you have found α1,α2,α3\alpha_1, \alpha_2, \alpha_3.Yes, this is because the contribution from the odd x^3 term is zero, giving no further conditions on \alpha_1, \alpha_2, \alpha_3 (giving the same conditions as for f=x). Right?
  • #1
lampCable
22
1

Homework Statement


Consider the ansatz
[tex] \frac{1}{b-a}\int_a^bf(x)dx \approx \alpha_1f(a)+\alpha_2f(\frac{b-a}{2})+\alpha_3f(b)[/tex]
We can determine the values of [itex]\alpha_1,\alpha_2,\alpha_3[/itex] by requiring the approximation to be exact for quadratic polynomials, which yeilds Simpsons rule.

Why there is no loss of generality in assuming that [itex]a = -1[/itex] and [itex]b = 1[/itex]?

Homework Equations

The Attempt at a Solution

 
Physics news on Phys.org
  • #2
lampCable said:
Why there is no loss of generality in assuming that a=−1a = -1 and b=1b = 1?
Hi lampCable:

Here is a hint.

You can make a linear substitution y = px+q such that y(a) = -1 and y(b) = +1. Since f(x) is a quadratic polynomial in e, f(y) will also be a quadratic polynomial of y.

Hope that helps.

Regards,
Buzz
 
  • Like
Likes lampCable
  • #3
lampCable said:

Homework Statement


Consider the ansatz
[tex] \frac{1}{b-a}\int_a^bf(x)dx \approx \alpha_1f(a)+\alpha_2f(\frac{b-a}{2})+\alpha_3f(b)[/tex]
We can determine the values of [itex]\alpha_1,\alpha_2,\alpha_3[/itex] by requiring the approximation to be exact for quadratic polynomials, which yeilds Simpsons rule.

Why there is no loss of generality in assuming that [itex]a = -1[/itex] and [itex]b = 1[/itex]?

Homework Equations

The Attempt at a Solution


Surely the middle term should be ##\alpha_2 f(\frac{a+b}{2})##?

BTW: Simpson's rule is valid for cubics as well; that becomes clear upon taking a = -1 and b = 1, but only after you have found ##\alpha_1, \alpha_2, \alpha_3##.
 
  • #4
Ray Vickson said:
Surely the middle term should be [itex]\alpha_2 f(\frac{a+b}{2})[/itex]?
Yes, I'm quite sure that the middle term is correct. Or what do you mean?

Ray Vickson said:
BTW: Simpson's rule is valid for cubics as well; that becomes clear upon taking a = -1 and b = 1, but only after you have found α1,α2,α3\alpha_1, \alpha_2, \alpha_3.
Yes, this is because the contribution from the odd [itex]x^3[/itex] term is zero, giving no further conditions on [itex]\alpha_1, \alpha_2, \alpha_3[/itex] (giving the same conditions as for [itex]f=x[/itex]). Right?

Buzz Bloom said:
You can make a linear substitution y = px+q such that y(a) = -1 and y(b) = +1. Since f(x) is a quadratic polynomial in e, f(y) will also be a quadratic polynomial of y.

Thank you for the hint. So, a suitable substitution is
[tex]
y = \frac{x-b}{b-a} + \frac{x-a}{b-a}.
[/tex]
This gives
[tex]
\frac{1}{b-a}\int_a^bf(x)dx = \frac{1}{2}\int_{-1}^1f\bigg{(}\frac{b(y-1)}{2}-\frac{a(y+1)}{2}\bigg{)}dy = \frac{1}{2}\int_{-1}^1g(y)dy \approx \alpha_1g(-1)+\alpha_2g(0)+\alpha_3g(1)
[/tex]
And so, by your argument, since [itex]f(x)[/itex] is a quadratic polynomial in [itex]x[/itex], then [itex]f\bigg{(}\frac{b(y-1)}{2}-\frac{a(y+1)}{2}\bigg{)}[/itex] and hence [itex]g(y)[/itex] are quadratic polynomials in [itex]y[/itex]. And the inequality above is therefore equivalent to the assumption that [itex]a=-1[/itex] and [itex]b=1[/itex] in the original ansatz.

Correct?
 
  • #5
Ray Vickson said:
BTW: Simpson's rule is valid for cubics as well; that becomes clear upon taking a = -1 and b = 1, but only after you have found ##\alpha_1, \alpha_2, \alpha_3##.

lampCable said:
Yes, this is because the contribution from the odd [itex]x^3[/itex] term is zero, giving no further conditions on [itex]\alpha_1, \alpha_2, \alpha_3[/itex] (giving the same conditions as for [itex]f=x[/itex]). Right?

I think Ray is talking here about Simpson's Second Rule.

The problem you have to prove in the OP is also known as Simpson's First Rule, and it uses a quadratic interpolating polynomial to determine the coefficients, or Simpson's Multipliers, of the three ordinates.

In Simpson's Second Rule, a cubic interpolating polynomial is used and four ordinates are required, with different multipliers, of course.
 
  • #6
lampCable said:
[tex]\alpha_1g(-1)+\alpha_2g(0)+\alpha_3g(1)[/tex]
If the middle term is ##\alpha_2f(\frac{b-a}{2})##, you get ##\alpha_2g((1-(-1))/2)=\alpha_2g(2/2)=\alpha_2g(1)##.
But @Ray Vickson is correct, the middle term should be ##\alpha_2f(\frac{a+b}{2})##, and that will give you ##\alpha_2g(0)##.
 
  • Like
Likes lampCable
  • #7
lampCable said:
Yes, I'm quite sure that the middle term is correct. Or what do you mean?

I cannot figure out what you are saying here? Are you saying that what YOU wrote is correct, or are you agreeing that what I wrote is correct?
 
  • #8
SteamKing said:
I think Ray is talking here about Simpson's Second Rule.

The problem you have to prove in the OP is also known as Simpson's First Rule, and it uses a quadratic interpolating polynomial to determine the coefficients, or Simpson's Multipliers, of the three ordinates.

In Simpson's Second Rule, a cubic interpolating polynomial is used and four ordinates are required, with different multipliers, of course.

No, I don't think so. The ordinary 3-point Simpson rule (designed so that it works on quadratics) also works on cubics. That is why the error analysis for Simpson's rule is proportional to ##(b-a)^4## instead of ##(b-a)^3##.

The reason is simple: when you apply the 3-point Simpson rule to ##x^3## (on a symmetric interval ##[-a,a]##) the exact integral and the Simpson result agree exactly (both being 0). Non-symmetric intervals ##[a,b]## give the same result, but the arguments are messier and less revealing.

For more on this, see, eg., https://en.wikipedia.org/wiki/Simpson's_rule .
 
  • Like
Likes lampCable
  • #9
Samy_A said:
If the middle term is [itex]\alpha_2f(\frac{b-a}{2})[/itex], then you get [itex]2g((1−(−1))/2)=2g(2/2)=2g(1)\alpha_2g((1-(-1))/2)=\alpha_2g(2/2)=\alpha_2g(1)[/itex].
But Ray is correct, the middle term should be [itex]\alpha_2f(\frac{b+a}{2})[/itex].

Oh, yes of course, I did not see my mistake. Thank you.

Ray Vickson said:
I cannot figure out what you are saying here? Are you saying that what YOU wrote is correct, or are you agreeing that what I wrote is correct?

I am sorry, I misunderstood what you said. You are definitely correct.
 
  • #10
Ray Vickson said:
No, I don't think so. The ordinary 3-point Simpson rule (designed so that it works on quadratics) also works on cubics. That is why the error analysis for Simpson's rule is proportional to ##(b-a)^4## instead of ##(b-a)^3##.

The reason is simple: when you apply the 3-point Simpson rule to ##x^3## (on a symmetric interval ##[-a,a]##) the exact integral and the Simpson result agree exactly (both being 0). Non-symmetric intervals ##[a,b]## give the same result, but the arguments are messier and less revealing.

For more on this, see, eg., https://en.wikipedia.org/wiki/Simpson's_rule .
Well Simpson's First Rule numerical integration can be applied to integrate a number of different functions for which it was not explicitly derived. The error that you get when you do so may not be as small as with integrating a quadratic function, but people still use it, nevertheless.

Simpson's First Rule is also called the 1-4-1 rule, after the multipliers. Simpson's Second Rule is the 1-3-3-1 rule, also after its multipliers.

I'm a naval architect. Simpson's Rule used to be quite ubiquitous in my profession before computers. It was used to integrate quite a few curves where the shape had no known explicit representation except the ordinates measured from a drawing.
 
  • Like
Likes lampCable
  • #11
SteamKing said:
Well Simpson's First Rule numerical integration can be applied to integrate a number of different functions for which it was not explicitly derived. The error that you get when you do so may not be as small as with integrating a quadratic function, but people still use it, nevertheless.

Simpson's First Rule is also called the 1-4-1 rule, after the multipliers. Simpson's Second Rule is the 1-3-3-1 rule, also after its multipliers.

I'm a naval architect. Simpson's Rule used to be quite ubiquitous in my profession before computers. It was used to integrate quite a few curves where the shape had no known explicit representation except the ordinates measured from a drawing.

There is no error (except for roundoff) when integrating linear, quadratic or cubic functions using Simpson's 1-4-1 rule. Of course for other functions the use of 1-4-1 Simpson will generally involve an error ##E_S## bounded by
[tex] |E_S| \leq \frac{h^4}{180} K \, (b-a)^4, [/tex]
where ##h = (b-a)/n## and ##K = \max_{a \leq y \leq b} |f''''(y)|## is the maximum of the fourth derivative. Here, ##n## is the number of sub-intervals of ##[a,b]##, so the function ##f(x)## is evaluated at the ##(n+1)## equally-spaced points ##a = x_0 < x_1 < \cdots < x_n = b##.
 

Related to The Significance of Simpsons Rule for Quadratic Polynomials

What is Simpson's rule?

Simpson's rule is a mathematical method for approximating the area under a curve. It is commonly used in numerical integration to estimate the value of a definite integral.

How is Simpson's rule calculated?

Simpson's rule is calculated by dividing the interval of integration into smaller subintervals, and then using a weighted average of the values of the function at the endpoints and the midpoint of each subinterval.

Why is Simpson's rule used?

Simpson's rule is used because it provides a more accurate approximation of the area under a curve compared to other methods, such as the trapezoidal rule.

What are the assumptions of Simpson's rule?

The main assumption of Simpson's rule is that the function being integrated is continuous. It also assumes that the interval of integration is evenly divided into subintervals and that the function is relatively smooth within each subinterval.

How do you prove Simpson's rule?

To prove Simpson's rule, one must use mathematical principles, such as the mean value theorem and Taylor series expansion, to derive the formula for the weighted average of the function values. This formula can then be used to show that Simpson's rule provides an accurate approximation of the integral.

Similar threads

  • Calculus and Beyond Homework Help
Replies
4
Views
1K
Replies
1
Views
988
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
Replies
6
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
Replies
1
Views
3K
  • Calculus and Beyond Homework Help
Replies
8
Views
4K
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
2K
  • Calculus and Beyond Homework Help
Replies
13
Views
2K
Back
Top