User:Egm6341.s11.team2.zou/HW4

=Problem 4.1 Verification of Exactness of Simple Simpson ‘ s rule at Cubic Polynomial=

''' This problem was solved without referring to S10 homework. '''

From the lecture slide Mtg18-2

Given
The integrand is

Find
Verify that Simple Simpson ‘ Rule can integrate cubic polynomials exactly by numerically integrating the given function using Simple Simpson ‘ s Rule and compare the result with the same result.

Solution
The exact value of integration $$\displaystyle I$$ is,

The numerical result by simple Simpson ‘ s rule is,

Hence,

In this case we have verified Simple Simpson ‘ s rule can integrate cubic polynomial exactly.

=Problem 4.3 Verification of Value of Goal Function at Particular Point=

From the lecture slide Mtg20-3

Given
The Goal function in proof of error of SSET is,

where,

Solution
In the lecture slide 19 we have already got,

where

Then we have,

Hence,

=Problem 4.8 Comparison of error bound in different estimation method with numerical result=

From the lecture slide Mtg22-2

Background
The maximum error of composite trapezoidal rule is ,

where $$\displaystyle {{M}_{2}}$$ is the maximum of $$\displaystyle \left| {{f}^{(2)}}(.) \right|$$

The maximum error of composite Simpson ‘ s rule is ,

where $$\displaystyle {{M}_{4}}$$ is the maximum of $$\displaystyle \left| {{f}^{(4)}}(.) \right|$$

Given
In the Problem 2.4, we have numerically calculate the order $$\displaystyle n$$ such that the following integration, with Taylor series expansion, composite trapezoidal rule and composite Simpson ‘ s rule, is with error less than $$\displaystyle Q={{10}^{-6}}$$.

where $$\displaystyle [a,b]=[-1,1]$$

And in Problem 2.3 we have the remainder of Taylor expansion of $$\displaystyle f(x)=\frac{{{e}^{x}}-1}{x}$$ is,

where $$\displaystyle \xi \in [0,x]$$

Find
(1)Use different error bound of Taylor series, composite trapezoidal rule and composite Simpson ‘ s rule to calculate the smallest order n needed such that the error of numerical integration of that in Problem 2.4 is less than $$\displaystyle Q={{10}^{-6}}$$. And then compare them with the actual numerical calculation.

Taylor series comparison
Using the same method in Mtg7 we can find the error bound of Taylor series,

Since we have set n to be even,

The error should be within $$\displaystyle Q$$

By WolframAlpha we have,

which coincide with the result in Problem 2.4.

Composite trapezoidal rule comparison
By 4.8.1 we have,

where $$\displaystyle {{M}_{2}}$$ can be calculated by WolframAlpha ,

Then we have,

Calculated by WolframAlpha we have,

While in Problem 2.4 we have $$\displaystyle n=512$$, the order produced by the error bound is larger than the numerical result.

Composite trapezoidal rule comparison
By 4.8.2 we have,

where $$\displaystyle {{M}_{4}}$$ can be calculated by WolframAlpha ,

Then we have,

Calculated by WolframAlpha we have,

In Problem 2.4 we calculated the case $$\displaystyle n=8$$ and $$\displaystyle n=16$$, the former case failed to satisfy the condition that $$\displaystyle \left| {{E}_{n}} \right|\le Q={{10}^{-6}}$$ while the latter succeed. This is a verification of the result above.

Conclusion
From the case of Taylor series and composite trapezoidal rule we can see the order of estimation given by the error bound is larger than or equal to that given by numerical calculation. This can be explained as: the error bound is stricter because it denotes the maximal error hence it is reasonably larger than or equal to the real error and thus requires higher order.

While in case of composite Simpson ‘ s rule we didn ‘ t calculate the case $$\displaystyle n=9$$, but the case $$\displaystyle n=8$$ and $$\displaystyle n=16$$ have demonstrate that if the error bound is satisfied with error limit then the numerical result must be satisfied.

Solution to part (2)
=References0=