User:EGM6341.s11.TEAM1.HW4

Problem 1: Find exact integration $$ I \ $$ and Simple Simpson's integration $$ I_2 \ $$
 Solved without assistance 

Given Integrate the given polynomial(deg=3) with the range of $$\displaystyle [ -2, 1 ] $$

Where $$ c_0=1 \ $$, $$ c_1=3 \ $$, $$ c_2=-9 \ $$ and $$ c_3=12 \ $$

Exact integration
The exact value is

$$ I_2 \ $$ Approximation with Simpson's rule
Determining variables for Simpson's method,

Calculating values,

Applying the above values into Simpson's equation yields,

The value by Simpson's rule is

Matlab

Result

Author EGM6341.s11.TEAM1.Yoon 00:00, 26 February 2011 (UTC)

Problem 2: Transformation of Variables
 Solved without assistance 

Given(Method of transformation of variable)
Derive the first derivative of A(t) with respect to t,

Find the first derivative of A(t)
Through transformation of variables, show that Eq2.2 can be obtained from Eq2.1

Solution using Transformation of variables
The derivation flow is straigtfoward,

Author EGM6341.s11.TEAM1.Yoon 00:00, 26 February 2011 (UTC)

Problem 3:Second derivative involving Rolle's Theorem
 Solved without assistance 

Given
Where

Find
Show that the second derivative in Eq3.3 equals zero.

Solution
For Rolle's theorem, if there exists a continuous function $$ G(.) \ $$ on a closed interval $$   \left ] a,b \right [ $$ then there exists a point c on the open interval $$  \left ( a,b \right ) $$ such that $$ G'(c)=0 \ $$ For this problem, there exists a continuous function $$ G(.) \ $$ such that $$ G^{(2)}(\zeta\ _2) \ $$ lay outside of the open interval $$  \left ] 0,\zeta\ _1 \right [ $$ Taking the first derivative of $$ G( \zeta\ ):=e( \zeta\ )- \zeta\ ^5e(1) \ $$ gives:

Where:

Where:

Thus at $$ \zeta\ = 0 $$ plugging this back into Eq3.6 and Eq3.7 it can now be shown that Taking the second derivative gives the following:

Where:

From Eq3.9, it can be shown that $$ A(0)=0 \ $$ ,thus $$ A'(0)=0 \ $$ and $$ A''(0)=0 \ $$

Setting $$ \zeta\ = 0 $$ it can now be shown from Eq3.11:

Author EGM6341.s11.TEAM1.WILKS 16:29, 27 February 2011 (UTC)EGM6341.s11.TEAM1.WILKS

Problem 4: Rolle's Theorem third derivative error demonstration
 Solved without assistance 

Find
Show Eq.4.1

Solution
Note: We are using below definition at all coverage of this problem. $$\displaystyle F(t):=f(x(t))$$

Taking First derivative of e(t) yields,

Taking second derivative of e(t) yields,

Taking third derivative of e(t) yields,

In Conclusion,

Author --User:EGM6341.s11.TEAM1.Sujin 03:06, 27 February 2011 (UTC)User:EGM6341.s11.TEAM1.Sujin

Problem 5: Show relationship in Simple Simpson's Error Theorem
 Solved without assistance 

Find the relation between the two variables
Find relation between $$ \xi\ \ $$ and $$ \zeta_4\ \ $$

Solution
Applying Rolle's theorem, there exist $$\displaystyle \zeta_1$$ so that

Applying Rolle's theorem, there exist $$\displaystyle \zeta_2$$ so that Applying Rolle's theorem, there exist $$\displaystyle \zeta_3$$ so that

Applying Rolle's theorem, there exist $$\displaystyle \zeta_4$$ so that From the above result, we are ready to compare the two given equations,

Thus,

Simply, switch $$\displaystyle t_4 \ $$ and $$ x \ $$ to $$ \zeta\ _4 $$ and $$ \xi \ $$ respectably, and $$\displaystyle ht+\beta=x$$ yileds $$\begin{align} \Rightarrow h\zeta_4+\beta=\xi \; (h=\frac{b-a}{2},\; \beta=\frac{a+b}{2}) \end{align}$$

The origin of $$ \zeta\ _4 \ $$ is moved to $$ \xi\ \ $$ by scaler $$ h \ $$ and translation $$ \beta\ \ $$

Author --User:EGM6341.s11.TEAM1.Sujin 03:08, 27 February 2011 (UTC)

Problem 6: Fix Runge phenomenon
 Solved without assistance 

Use nonuniform distribution of nodes for Lagrange Interpolation, together with Newton-Cotes.

Use roots of Legendre polynomial and increase until desired accuracy achieved
Legendre Polynomial $$ \Rightarrow \ P_n(x_i)=0 $$ Graph of the integral of the function below.

Increase $$ n \ $$ until $$ I_n \ $$ is accurate to $$ \theta\ (10^6) \ $$ Plot $$ f_n^L \ $$ and $$ f(.) \ $$

Use roots of Chebyshev polynomial
Find $$ f_n^L(.) \ $$ and plot $$ f_n^L \ $$ and $$ f(.) \ $$

Use Gauss-Legendre quad
Find $$ I_n \ $$ accurate to $$ \theta\ (10^6) \ $$

Compare Legendre polynomial, Chebyshev polynomial and Gauss-Legendre quad
Compare results from 1), 2) and 3)

Author User: Egm6341.s11.team-1.langpm 02:12, 3 March 2011 (UTC)

Problem 7: Prove Composite Simpson's Error Bound using Breaking n Simple Simpson's Equations
'''Solution 1. Solved without assistance; Referenced Lecture Note Day22 only '''

Find(Derivation process of the above composite Simpson's rule)
Show how to obtain composite Simpson's Error as outlined in Eq7.1

Solution by Yoon
Applying error bound by taking max and absolute sign on the both side,

We can define bound of each sub-f(x)s by,

Since the summation of each bound is equal or less than n times of M4,

Applying above relation onto our inequality yields,

In conclusion,

Author EGM6341.s11.TEAM1.Yoon 00:00, 1 March 2011 (UTC)

Problem 8: Plot and integrate error estimates using Taylor Series, Composite Trapezoidal and Composite Simpson's Methods
 Solved without assistance 

Find n using error estimates
Find n such that Error in Eq8.1 can be proved using error estimates for Taylor Series, Composite Trapezoidal and Composite Simpson's Rule. Compare to numerical results.

Taylor series

The error of a numerical integration is given as following, The error of Taylor series is the integral of the reminder term, which is For the given function, the error is Using the Integral Mean Value Theorem, It has a minimum when $$\displaystyle \xi=0$$ and maximum when $$\displaystyle \xi=1$$, we have Set the maximum of the error to $$10^{-6}$$, Solving this equation, we get

Composite Trapezoidal rule

The error of trapezoidal rule is given as, Setting the function $$f(x)=\frac{e^{x}-1}{x}$$, we have With the given interval$$\displaystyle [0,1]$$, we get the maximum of$$\displaystyle f^{(2)}(x)$$ at $$\displaystyle x=1$$ Setting the error to the $$\displaystyle 10^{-6}$$ and solving for $$\displaystyle n$$, we get

Composite Simpson's rule

The error of Simpson's rule is given as, Setting the function $$f(x)=\frac{e^{x}-1}{x}$$, we have With the given interval $$\displaystyle [0,1]$$, we get the maximum of $$\displaystyle f^{(2)}(x)$$ at $$ \displaystyle x=1$$ Setting the error to the $$\displaystyle 10^{-6}$$ and solving for $$\displaystyle n$$, we get

Numerically find the power of h in error
Plot log(error) vs log(h) and measure slope using least squares method

To get the power of h in error, data from Problem 4 of HW2 is used. A log-log plot(log(y) vs log(x)) is a straight line, for which the equation is given as, It is seen that the slope of the line in the log-log plot is the power of the x-variable.

Composite Trapezoidal Rule

The table below is the data from the numerical evaluation of the given function using Composite Trapezoidal Rule. The graph is shown below:



With the evaluation above, we get that the slope of line is 1.999 which is essentially the analytical value of 2.

Composite Simpsons Rule

The table below is the data from the numerical evaluation of the given function using Composite Simpson's Rule. The graph is shown below:



With the evaluation above, we get that the slope of line is 3.945 which is very close to the analytical value of 4.

Taylor Series

The table below is the data from the numerical evaluation of the given function using Taylor series. h can be defined for taylor series as $$\displaystyle (b-a)/n$$.Since h is not used in the Taylor series method, it might be dependent on how error affected by the number of terms of the series. The graph is shown below:



As can be seen in the figure, the trend is not linear.

Author--EGM6341.s11.TEAM1.Chiu

Problem 9: Proof of Simple Simpson's Error Theorem
 Solved without assistance 

Rework Simple Simpson's Error Theorem (SSET)
SSET proven in Eq9.1 Redo the proof for Eq9.2 and Eq9.3 Point out where the proof breaks down

If $$\displaystyle G(t)$$ is given by Eq9.2

$$\displaystyle e(t)$$ is defined as

Therefore,

and

By Rolle's Theorem, this means that there exists a point $$\displaystyle \xi_1$$ such that

Looking at the $$\displaystyle G^{(1)}(t)$$,

As shown in Lecture 20 notes ,

Taking the derivative of $$ \displaystyle e(t) $$,

Since $$\displaystyle G^{(1)}(0) = 0$$ and $$\displaystyle G^{(1)}(\xi_1) = 0$$, by Rolle's Theorm there exists a point $$\displaystyle \xi_2$$ such that

Using the solution from Problem 4.3,

Since $$\displaystyle G^{(2)}(0) = 0$$ and $$\displaystyle G^{(2)}(\xi_2) = 0$$, by Rolle's Theorm there exists a point $$\displaystyle \xi_3$$ such that

Evaluating $$\displaystyle G^{(3)}(t)$$at $$\displaystyle \xi_3$$,

Using the solution from Problem 4.4,

And employing the Derivative Mean Value Theorem

Evaluating for $$\displaystyle e(1)$$, the proof breaks down because $$\displaystyle \xi_3$$ does not cancel out and remains unknown:

If $$\displaystyle G(t)$$ is given by Eq9.3

Analysis is similar to that of Eq9.4 - 9.17.

Eq9.17 then becomes:

The proof again breaks down when solving for $$\displaystyle e(1)$$ because $$\displaystyle \xi_3$$ does not cancel out:

Repeat Steps to determine what happens at $$ G^{(3)}(0) \ $$
Follow same steps for proof of Eq9.1, with $$ t^5 \ $$. Find $$ G^{(3)}(0) \ $$ and determine what happens.

Inserting Eq9.18 into the third derivative of Eq9.1,

Evaluating at $$\displaystyle t=0$$,

Since $$\displaystyle G^{(3)}(0)=0$$ and $$\displaystyle G^{(3)}(\xi_3)=0$$, by Rolle's Theorem, there exists a point $$\displaystyle \xi_4$$ such that

Evaluating the derivative,

Evaluating the derivative of Eq9.18,

Inserting into Eq9.26 and evaluating at $$\displaystyle t=0$$,

The proof can not be continued at this point since $$\displaystyle G^{(4)}(t)$$ has only one known zero because

Author Egm6341.s11.team1.arm 04:09, 1 March 2011 (UTC)

Problem 10: Compose MATLAB code to produce composite trapezoid comparison Tables
 Referenced Egm6341.s10.team3.HW3, but solved with s11 values 

Write your own MATLAB code for Composite Trapezoidal Rule to reproduce Table5.1 in Atkinson (p255)
From Wolfram Alpha ,

Also, the asymptotic error estimate is defined for the trapezoidal rule in Atkinsion eq. 5.1.9 as:

Evaluating 10.2 with the appropriate derivatives for $$\displaystyle f$$,

Using the MATLAB code below, the following table was generated:

 Matlab code: 

Write your own MATLAB code for Composite Simpson's to reproduce Table5.3 in Atkinson (p258)
From Wolfram Alpha ,

Also, the asymptotic error estimate is defined for the trapezoidal rule in Atkinsion eq. 5.1.8 as:

Evaluating 10.6 with the appropriate derivatives for $$\displaystyle f$$,

Using the MATLAB code below, the following table was generated:

 Matlab code: 

Given an integral, use your own MATLAB code to reproduce Table5.4 in Atkinson (p261)
From Wolfram Alpha ,

Using the MATLAB code below, the following table was generated:

 Matlab code: 

Author Egm6341.s11.team1.arm 19:48, 28 February 2011 (UTC)

Signatures
Solved problem 1 -- EGM6341.s11.TEAM1.Yoon 00:00, 26 February 2011 (UTC)

Solved problem 2 -- EGM6341.s11.TEAM1.Yoon 00:00, 26 February 2011 (UTC)

Solved problem 3 -- EGM6341.s11.TEAM1.WILKS 16:29, 27 February 2011 (UTC)EGM6341.s11.TEAM1.WILKS

Solved problem 4 -- --User:EGM6341.s11.TEAM1.Sujin 03:09, 27 February 2011 (UTC)

Solved problem 5 -- --User:EGM6341.s11.TEAM1.Sujin 03:09, 27 February 2011 (UTC)

Solved problem 6 -- User: Egm6341.s11.team-1.langpm 02:12, 3 March 2011 (UTC)

Solved problem 7 -- EGM6341.s11.TEAM1.Yoon 00:00, 1 March 2011 (UTC)

Solved problem 8 -- EGM6341.s11.TEAM1.Chiu 01:21, 1 March 2011(UTC)

Solved problem 9 -- Egm6341.s11.team1.arm 04:10, 1 March 2011 (UTC)

Solved problem 10 -- Egm6341.s11.team1.arm 19:53, 28 February 2011 (UTC)