User:Egm6341.s11.team4.hylon/hw2

=Homework 2.7= Refer to lecture slide [[media:nm1.s11.mtg9.djvu|9-1]] for the problem statement.

Given
Legendre polynomials: Where $$[\frac{n}{2}]=$$ integer part of $$\frac{n}{2}$$.

Objectives
Construct (Gram matrix) $$\underline{\Gamma }$$; show $$\underline{\Gamma }$$ is diagonal or not; and compute $$ \det (\underline{\Gamma })$$.

Construct (Gram matrix) $$\underline{\Gamma }$$
By definition of Legendre polynomials: We can obtain: For $$n=0$$, For $$n=1$$, For $$n=2$$, For $$n=3$$, For $$n=4$$, For $$n=5$$, By definition of Gram matrix, we have

Hence, Check Result: Wolframe|Alpha. Check Result: Wolframe|Alpha. Check Result: Wolframe|Alpha. Check Result: Wolframe|Alpha. For $$[a,b]=[-1,1]$$, we have

compute $$ \det (\underline{\Gamma })$$
Problem solved by Hailong Chen.

Given
Newton-Cotes formula: WhereLagrange interpolating functions and $$f(x)$$ is the original function to be interpolated, with $$x\in [a,b]$$. Simple trapezoidal rule: Where $$f(x)$$ is the original function to be interpolated, with $$x\in [a,b]$$.

Objectives
Show when $$n=1$$, Newton-Cotes method implies Simple trapezoidal rule.

Solution
By definition of Lagrange interpolating functions, we can obtain: For $$n=1 $$,$$ {{x}_{0}}=a$$,$$ {{x}_{1}}=b$$ Hence, by definition of Newton-Cotes formula, we consequently have Thus, We get Simple trapezoidal rule from Newton-Cotes method when $$n=1$$. Problem solved by Hailong Chen.

Given
Trapezoidal rule: Simple rule: Composite rule: Where $$f(x)$$ is the original function to be interpolated, with $$x\in [a,b]$$. $$a={{x}_{0}}<{{x}_{1}}<\cdots <{{x}_{n-1}}<{{x}_{n}}=b$$. The distance among consecutive nodes is $$h=\frac{b-a}{n}$$. Simpson’s rule: Simple rule: Composite rule: Where $$f(x)$$ is the original function to be interpolated, with $$x\in [a,b]$$. >. $$a={{x}_{0}}<{{x}_{1}}<\cdots <{{x}_{n-1}}<{{x}_{n}}=b$$. The distance among consecutive nodes is $$h=\frac{b-a}{n}$$.

Objectives
Derive each composite rule from the simple rule.

Trapezoidal rule
Divide the interval into $$n$$ subintervals with equal length, hence $$h=\frac{b-a}{n}$$. Break the integral into $$n$$ subintegrals, Approximate each subintegrals using simple rule, then Hence, we get the composite trapezoidal rule.

Simpson’s rule
Using Newton-Cotes formula, we can get simple Simpson’s rule as follow: Where $$ c=\frac{b+a}{2}$$. In order to evaluate above integral directly, we use $$h=\frac{b-a}{2}$$ to make it  easy to solve. Then The complete evaluation of equation $$4$$ yields Like what we do in deriving composite trapezoidal rule, dividing interval $$[a,b]$$ into $$ n$$ subintervals, each containing three nodes. Thus Approximating each subintegrals by equation $$8$$ yields Hence, we get the composite Simpson’s rule. Problem solved by Hailong Chen.