Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(2) Factor =.5 The midpoint rule is constructed to be exact for all constant polynomials. However, it is exact for all linear polynomials, too. Simpson's

image text in transcribed

(2) Factor =.5 The midpoint rule is constructed to be exact for all constant polynomials. However, it is exact for all linear polynomials, too. Simpson's rule was designed to be exact for all quadratic polynomials.! However, it is exact for all cubics, too. The common property of these two rules is that, for both, L" "W()dt = ["w()dt = 0, .b with W(t) := (t t)(t t2...., and with t, t2, ... the nodes of the scheme. Rules that are even better can be constructed if one insists that w(t) satisfies additional conditions such as [":"w(e)dt = 0, 7 121 t-W(t)dt = 0, etc. The integral Ln'W (t) dt is called the jth moment of the function W (wrto the interval (a, b)). Thus, the name of the game is to choose the nodes in a way that W has as many zero moments as possible. If all the moments of W up to the jth are zero, your rule scores j +1 extra points, i.e., while you use n points in your rule (whatever n is), the error looks like you are using n+j+1 points. It is not hard to see that for a given n, the maximum possible value of j is j =n-1. In that case, you use n nodes, and the error looks like you are using 2n nodes. Such rules are called Gauian rules. In this question you will construct a Gauian rule for n = 2 and will observe the usefulness of it. (For n=1 the Gauian rule is midpoint.) Your general goal is to find an integration scheme of the form $*s()dt = ws() + was(2). (1) ) (a) Your choice for t, t2 should be as follows. First, find a quadratic polynomial W(t) = 12 + bt + c that satisfies the following two conditions: | we W()dt = 0, Lewe tW (t) dt = 0. (Hint: plug in the expression you have for W into these integrals, and carry out the integration. You will get two linear equations on the two unknowns b, c.) Then find the two roots of W (t). These are your t1, t2. (t1 and t2 are not rational numbers. If you wish to use an approximate decimal representation of them, be sure to use high precision approximation. If you found a closed form for those roots, e.g., t1 = 13/2, keep it in this form). (b) Now, find w, and wg. (There are several ways how to find them. The easiest way, perhaps, is to make sure that your rule is exact on the monomials 1, t.) (c) You have just forced your scheme to be exact for all linears. However, if you did it right, you should be exact for all cubics (like a scheme that uses four points). Check that. (d) Now apply your great scheme to f(x) = ei", f(r) = 1/(x+1), and f(x) = cos r. Compare your accuracy with composite midpoint with two subintervals, and with (simple) Simpson. (You may use either matlab or a calculator here). (2) Factor =.5 The midpoint rule is constructed to be exact for all constant polynomials. However, it is exact for all linear polynomials, too. Simpson's rule was designed to be exact for all quadratic polynomials.! However, it is exact for all cubics, too. The common property of these two rules is that, for both, L" "W()dt = ["w()dt = 0, .b with W(t) := (t t)(t t2...., and with t, t2, ... the nodes of the scheme. Rules that are even better can be constructed if one insists that w(t) satisfies additional conditions such as [":"w(e)dt = 0, 7 121 t-W(t)dt = 0, etc. The integral Ln'W (t) dt is called the jth moment of the function W (wrto the interval (a, b)). Thus, the name of the game is to choose the nodes in a way that W has as many zero moments as possible. If all the moments of W up to the jth are zero, your rule scores j +1 extra points, i.e., while you use n points in your rule (whatever n is), the error looks like you are using n+j+1 points. It is not hard to see that for a given n, the maximum possible value of j is j =n-1. In that case, you use n nodes, and the error looks like you are using 2n nodes. Such rules are called Gauian rules. In this question you will construct a Gauian rule for n = 2 and will observe the usefulness of it. (For n=1 the Gauian rule is midpoint.) Your general goal is to find an integration scheme of the form $*s()dt = ws() + was(2). (1) ) (a) Your choice for t, t2 should be as follows. First, find a quadratic polynomial W(t) = 12 + bt + c that satisfies the following two conditions: | we W()dt = 0, Lewe tW (t) dt = 0. (Hint: plug in the expression you have for W into these integrals, and carry out the integration. You will get two linear equations on the two unknowns b, c.) Then find the two roots of W (t). These are your t1, t2. (t1 and t2 are not rational numbers. If you wish to use an approximate decimal representation of them, be sure to use high precision approximation. If you found a closed form for those roots, e.g., t1 = 13/2, keep it in this form). (b) Now, find w, and wg. (There are several ways how to find them. The easiest way, perhaps, is to make sure that your rule is exact on the monomials 1, t.) (c) You have just forced your scheme to be exact for all linears. However, if you did it right, you should be exact for all cubics (like a scheme that uses four points). Check that. (d) Now apply your great scheme to f(x) = ei", f(r) = 1/(x+1), and f(x) = cos r. Compare your accuracy with composite midpoint with two subintervals, and with (simple) Simpson. (You may use either matlab or a calculator here)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Ten Commandments To A Financial Healing

Authors: Ms. Kemberley J Washington

1st Edition

1499607261, 978-1499607260

More Books

Students also viewed these Finance questions

Question

Stages of a Relationship?

Answered: 1 week ago