The Significance of Simpsons Rule for Quadratic Polynomials

  • Thread starter Thread starter lampCable
  • Start date Start date
Click For Summary

Homework Help Overview

The discussion revolves around Simpson's Rule for numerical integration, specifically its application to quadratic polynomials. Participants explore the assumption that the interval can be set to [-1, 1] without loss of generality, which is central to deriving the rule.

Discussion Character

  • Conceptual clarification, Assumption checking, Mathematical reasoning

Approaches and Questions Raised

  • Participants discuss the validity of assuming specific bounds for integration and the implications of linear substitutions. There are questions regarding the correct formulation of terms in the approximation and the relationship between Simpson's First and Second Rules.

Discussion Status

The discussion is active, with participants providing hints and corrections regarding the formulation of Simpson's Rule. There is an ongoing examination of the assumptions made and the mathematical reasoning behind them, with no clear consensus yet reached.

Contextual Notes

Some participants note the distinction between Simpson's First and Second Rules, highlighting the different polynomial degrees involved and the implications for error analysis. There are references to the historical use of Simpson's Rule in practical applications, such as naval architecture.

lampCable
Messages
22
Reaction score
1

Homework Statement


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

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

Homework Equations

The Attempt at a Solution

 
Physics news on Phys.org
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   Reactions: lampCable
lampCable said:

Homework Statement


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

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

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##.
 
Ray Vickson said:
Surely the middle term should be \alpha_2 f(\frac{a+b}{2})?
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 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?

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
<br /> y = \frac{x-b}{b-a} + \frac{x-a}{b-a}.<br />
This gives
<br /> \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)<br />
And so, by your argument, since f(x) is a quadratic polynomial in x, then f\bigg{(}\frac{b(y-1)}{2}-\frac{a(y+1)}{2}\bigg{)} and hence g(y) are quadratic polynomials in y. And the inequality above is therefore equivalent to the assumption that a=-1 and b=1 in the original ansatz.

Correct?
 
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 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?

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.
 
lampCable said:
\alpha_1g(-1)+\alpha_2g(0)+\alpha_3g(1)
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   Reactions: lampCable
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?
 
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   Reactions: lampCable
Samy_A said:
If the middle term is \alpha_2f(\frac{b-a}{2}), then you get 2g((1−(−1))/2)=2g(2/2)=2g(1)\alpha_2g((1-(-1))/2)=\alpha_2g(2/2)=\alpha_2g(1).
But Ray is correct, the middle term should be \alpha_2f(\frac{b+a}{2}).

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   Reactions: 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
|E_S| \leq \frac{h^4}{180} K \, (b-a)^4,
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##.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
Replies
1
Views
1K
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 8 ·
Replies
8
Views
6K
Replies
6
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 1 ·
Replies
1
Views
7K
Replies
1
Views
6K