University of Florida/Egm6341/s10.team2.niki/HW2

From Wikiversity
Jump to navigation Jump to search

Problem 1[edit | edit source]

Statement[edit | edit source]

Using the following equations find the expressions for in terms of and where i=0,1,2

(1 p8-3)

(3 p8-3)

Solution[edit | edit source]

We have the general formula for the Lagrange basis function as

(2 p7-3)

for the case of Simple Simpson's Rule, n =2 i.e i=0,1,2. For the given interval


Expanding equation 3 p8-3 we get:

where,


;

;

Thus we have the polynomial as Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "http://localhost:6011/en.wikiversity.org/v1/":): {\displaystyle \boldsymbol{p_2(x)=\left ( \frac{x^2-(x_2+x_1)x+(x_1x_2)}{(x_0-x_1)(x_0-x_2))} \right )f(x_0)+\left ( \frac{x^2-(x_2+x_0)x+(x_0x_2)}{(x_1-x_0)(x_1-x_2))} \right )f(x_1)+\left ( \frac{x^2-(x_0+x_1)x+(x_1x_0)}{(x_2-x_0)(x_2-x_1))} \right )f(x_2)}}

Grouping coefficients of ,

Comparing this equation with eqn 1p8-3 we see that

(1)

(2)


(3)

Problem 6[edit | edit source]

Statement[edit | edit source]

For the Lagrange Interpolation Error verify the following:

(1)

Solution[edit | edit source]

We can write the Lagrange Interpolation error as


differentiating the above expression once we get

differentiating the expression (n+1) times we get

But since is a polynomial of degree n the (n+1)th derivative is zero

(1)

Problem 11:To show that Simpson's rule can be used to integrate a cubic polynomial exactly[edit | edit source]

Statement[edit | edit source]

Given the polynomial where determine the exact integral and the integral using Simpson's Rule

Solution[edit | edit source]

Case A: Determination of Exact Integral[edit | edit source]




(1)

Case B: Using Simple Simpson's rule[edit | edit source]

We have the Simple Simpson's rule as

(2 p7-2)

where

we know substituting we get

(2)