Problem-1: Expressions for co-efficients of second degree Newton-Cotes integration polynomial
edit
P. 9-1 of Lecture 9 Notes
Using the following equations find the expressions for
c
i
{\displaystyle {\boldsymbol {c_{i}}}}
in terms of
x
i
{\displaystyle {\boldsymbol {x_{i}}}}
and
f
(
x
i
)
{\displaystyle {\boldsymbol {f(x_{i})}}}
where i=0,1,2′′
f
2
(
x
)
=
p
2
(
x
)
=
c
2
x
2
+
c
1
x
+
c
0
{\displaystyle \displaystyle {\boldsymbol {f_{2}(x)=p_{2}(x)=c_{2}x^{2}+c_{1}x+c_{0}}}}
(1 p8-3)
p
2
(
x
)
=
∑
i
=
0
2
(
l
i
(
x
)
f
(
x
i
)
)
{\displaystyle \displaystyle {\boldsymbol {p_{2}(x)=\sum _{i=0}^{2}(l_{i}(x)f(x_{i}))}}}
(3 p8-3)
We have the general formula for the Lagrange basis function
l
i
(
x
)
{\displaystyle {\boldsymbol {l_{i}(x)}}}
as
l
i
(
x
)
=
∏
j
=
0
;
j
≠
i
n
(
x
−
x
j
x
i
−
x
j
)
{\displaystyle \displaystyle {\boldsymbol {l_{i}(x)=\prod _{j=0;j\neq i}^{n}\left({\frac {x-x_{j}}{x_{i}-x_{j}}}\right)}}}
(2 p7-3)
for the case of Simple Simpson's Rule, n =2 i.e i=0,1,2. For the given interval
[
a
,
b
]
{\displaystyle [a,b]}
x
0
=
a
{\displaystyle {\boldsymbol {x_{0}=a}}}
x
2
=
b
{\displaystyle {\boldsymbol {x_{2}=b}}}
x
1
=
a
+
b
2
{\displaystyle {\boldsymbol {x_{1}={\frac {a+b}{2}}}}}
Expanding equation 3 p8-3 we get:
p
2
(
x
)
=
l
0
(
x
)
f
(
x
0
)
+
l
1
(
x
)
f
(
x
1
)
+
l
2
(
x
)
f
(
x
2
)
{\displaystyle {\boldsymbol {p_{2}(x)=l_{0}(x)f(x_{0})+l_{1}(x)f(x_{1})+l_{2}(x)f(x_{2})}}}
where,
l
0
(
x
)
=
(
x
−
x
1
x
0
−
x
1
)
(
x
−
x
2
x
0
−
x
2
)
{\displaystyle {\boldsymbol {l_{0}(x)=\left({\frac {x-x_{1}}{x_{0}-x_{1}}}\right)\left({\frac {x-x_{2}}{x_{0}-x_{2}}}\right)}}}
;
l
1
(
x
)
=
(
x
−
x
0
x
1
−
x
0
)
(
x
−
x
2
x
1
−
x
2
)
{\displaystyle {\boldsymbol {l_{1}(x)=\left({\frac {x-x_{0}}{x_{1}-x_{0}}}\right)\left({\frac {x-x_{2}}{x_{1}-x_{2}}}\right)}}}
;
l
2
(
x
)
=
(
x
−
x
0
x
2
−
x
0
)
(
x
−
x
1
x
2
−
x
1
)
{\displaystyle {\boldsymbol {l_{2}(x)=\left({\frac {x-x_{0}}{x_{2}-x_{0}}}\right)\left({\frac {x-x_{1}}{x_{2}-x_{1}}}\right)}}}
Thus we have the polynomial as
p
2
(
x
)
=
(
x
2
−
(
x
2
+
x
1
)
x
+
(
x
1
x
2
)
(
x
0
−
x
1
)
(
x
0
−
x
2
)
)
f
(
x
0
)
+
(
x
2
−
(
x
2
+
x
0
)
x
+
(
x
0
x
2
)
(
x
1
−
x
0
)
(
x
1
−
x
2
)
)
f
(
x
1
)
+
(
x
2
−
(
x
0
+
x
1
)
x
+
(
x
1
x
0
)
(
x
2
−
x
0
)
(
x
2
−
x
1
)
)
f
(
x
2
)
{\displaystyle {\boldsymbol {p_{2}(x)=\left({\frac {x^{2}-(x_{2}+x_{1})x+(x_{1}x_{2})}{(x_{0}-x_{1})(x_{0}-x_{2})}}\right)f(x_{0})+\left({\frac {x^{2}-(x_{2}+x_{0})x+(x_{0}x_{2})}{(x_{1}-x_{0})(x_{1}-x_{2})}}\right)f(x_{1})+\left({\frac {x^{2}-(x_{0}+x_{1})x+(x_{1}x_{0})}{(x_{2}-x_{0})(x_{2}-x_{1})}}\right)f(x_{2})}}}
Grouping coefficients of
x
2
,
x
1
,
x
0
{\displaystyle {\boldsymbol {x^{2},x^{1},x^{0}}}}
,
p
2
(
x
)
=
{
f
(
x
0
)
(
x
0
−
x
1
)
(
x
0
−
x
2
)
+
f
(
x
1
)
(
x
1
−
x
0
)
(
x
1
−
x
2
)
+
f
(
x
2
)
(
x
2
−
x
0
)
(
x
2
−
x
1
)
}
x
2
−
{
f
(
x
0
)
[
x
2
+
x
1
]
(
x
0
−
x
1
)
(
x
0
−
x
2
)
+
f
(
x
1
)
[
x
2
+
x
0
]
(
x
1
−
x
0
)
(
x
1
−
x
2
)
+
f
(
x
2
)
[
x
1
+
x
0
]
(
x
2
−
x
0
)
(
x
2
−
x
1
)
}
x
+
{
f
(
x
0
)
[
x
1
x
2
]
(
x
0
−
x
1
)
(
x
0
−
x
2
)
+
f
(
x
1
)
[
x
0
x
2
]
(
x
1
−
x
0
)
(
x
1
−
x
2
)
+
f
(
x
2
)
[
x
0
x
1
]
(
x
2
−
x
0
)
(
x
2
−
x
1
)
}
{\displaystyle {\boldsymbol {p_{2}(x)=\left\{{\frac {f(x_{0})}{(x_{0}-x_{1})(x_{0}-x_{2})}}+{\frac {f(x_{1})}{(x_{1}-x_{0})(x_{1}-x_{2})}}+{\frac {f(x_{2})}{(x_{2}-x_{0})(x_{2}-x_{1})}}\right\}x^{2}-\left\{{\frac {f(x_{0})[x_{2}+x_{1}]}{(x_{0}-x_{1})(x_{0}-x_{2})}}+{\frac {f(x_{1})[x_{2}+x_{0}]}{(x_{1}-x_{0})(x_{1}-x_{2})}}+{\frac {f(x_{2})[x_{1}+x_{0}]}{(x_{2}-x_{0})(x_{2}-x_{1})}}\right\}x+\left\{{\frac {f(x_{0})[x_{1}x_{2}]}{(x_{0}-x_{1})(x_{0}-x_{2})}}+{\frac {f(x_{1})[x_{0}x_{2}]}{(x_{1}-x_{0})(x_{1}-x_{2})}}+{\frac {f(x_{2})[x_{0}x_{1}]}{(x_{2}-x_{0})(x_{2}-x_{1})}}\right\}}}}
Comparing this equation with eqn 1p8-3 we see that
c
2
=
{
f
(
x
0
)
(
x
0
−
x
1
)
(
x
0
−
x
2
)
+
f
(
x
1
)
(
x
1
−
x
0
)
(
x
1
−
x
2
)
+
f
(
x
2
)
(
x
2
−
x
0
)
(
x
2
−
x
1
)
}
{\displaystyle \displaystyle {\boldsymbol {c_{2}=\left\{{\frac {f(x_{0})}{(x_{0}-x_{1})(x_{0}-x_{2})}}+{\frac {f(x_{1})}{(x_{1}-x_{0})(x_{1}-x_{2})}}+{\frac {f(x_{2})}{(x_{2}-x_{0})(x_{2}-x_{1})}}\right\}}}}
(1)
c
1
=
−
{
f
(
x
0
)
[
x
2
+
x
1
]
(
x
0
−
x
1
)
(
x
0
−
x
2
)
+
f
(
x
1
)
[
x
2
+
x
0
]
(
x
1
−
x
0
)
(
x
1
−
x
2
)
+
f
(
x
2
)
[
x
1
+
x
0
]
(
x
2
−
x
0
)
(
x
2
−
x
1
)
}
{\displaystyle \displaystyle {\boldsymbol {c_{1}=-\left\{{\frac {f(x_{0})[x_{2}+x_{1}]}{(x_{0}-x_{1})(x_{0}-x_{2})}}+{\frac {f(x_{1})[x_{2}+x_{0}]}{(x_{1}-x_{0})(x_{1}-x_{2})}}+{\frac {f(x_{2})[x_{1}+x_{0}]}{(x_{2}-x_{0})(x_{2}-x_{1})}}\right\}}}}
(2)
c
0
=
{
f
(
x
0
)
[
x
1
x
2
]
(
x
0
−
x
1
)
(
x
0
−
x
2
)
+
f
(
x
1
)
[
x
0
x
2
]
(
x
1
−
x
0
)
(
x
1
−
x
2
)
+
f
(
x
2
)
[
x
0
x
1
]
(
x
2
−
x
0
)
(
x
2
−
x
1
)
}
{\displaystyle \displaystyle {\boldsymbol {c_{0}=\left\{{\frac {f(x_{0})[x_{1}x_{2}]}{(x_{0}-x_{1})(x_{0}-x_{2})}}+{\frac {f(x_{1})[x_{0}x_{2}]}{(x_{1}-x_{0})(x_{1}-x_{2})}}+{\frac {f(x_{2})[x_{0}x_{1}]}{(x_{2}-x_{0})(x_{2}-x_{1})}}\right\}}}}
(3)
Inference: This solution essentially shows the equivalence of the two methods for the Simpson's rule i.e. cubic polynomial and using Lagrange basis functions.
Solution for problem 1:Egm6341.s10.team2.niki 00:18, 8 February 2010 (UTC)
Proofread problem 1: Srikanth Madala 07:04, 11 February 2010 (UTC)
Problem-2: Application of Newton-Cotes method to derive the simple Simpson's rule
edit
P. 9-1 of Lecture 9 Notes
Derive the simple Simpson's rule using Eq.(4) on slide 8-3 Lecture-8 notes i.e. the second degree polynomial of Newton-Cotes method:
P
2
(
x
)
=
∑
i
=
0
2
l
i
(
x
)
f
(
x
i
)
{\displaystyle P_{2}\left(x\right)=\sum _{i=0}^{2}l_{i}\left(x\right)f\left(x_{i}\right)}
I
2
(
f
)
{\displaystyle I_{2}\left(f\right)}
=
∫
x
0
x
2
f
2
(
x
)
.
d
x
=
∫
x
0
x
2
P
2
(
x
)
.
d
x
{\displaystyle =\int _{x_{0}}^{x_{2}}f_{2}\left(x\right).dx=\int _{x_{0}}^{x_{2}}P_{2}\left(x\right).dx}
=
∫
x
0
x
2
∑
i
=
0
2
l
i
(
x
)
⋅
f
(
x
i
)
⋅
d
x
{\displaystyle =\int _{x_{0}}^{x_{2}}\sum _{i=0}^{2}l_{i}\left(x\right)\cdot f\left(x_{i}\right)\cdot dx}
=
∫
x
0
x
2
[
l
0
(
x
)
⋅
f
(
x
0
)
+
l
1
(
x
)
⋅
f
(
x
1
)
+
l
2
(
x
)
⋅
f
(
x
2
)
]
⋅
d
x
{\displaystyle =\int _{x_{0}}^{x_{2}}\left[l_{0}\left(x\right)\cdot f\left(x_{0}\right)+l_{1}\left(x\right)\cdot f\left(x_{1}\right)+l_{2}\left(x\right)\cdot f\left(x_{2}\right)\right]\cdot dx}
But we know that
l
i
(
x
)
=
∏
j
=
0
j
≠
i
j
=
2
x
−
x
j
x
i
−
x
j
{\displaystyle l_{i}\left(x\right)=\prod _{j=0\;\;j\neq i}^{j=2}{\frac {x-x_{j}}{x_{i}-x_{j}}}}
So we get the values of
l
0
(
x
)
,
l
1
(
x
)
{\displaystyle l_{0}\left(x\right),l_{1}\left(x\right)}
and
l
2
(
x
)
{\displaystyle l_{2}\left(x\right)}
as follows:
l
0
(
x
)
=
(
x
−
x
1
x
0
−
x
1
)
(
x
−
x
2
x
0
−
x
2
)
{\displaystyle l_{0}\left(x\right)=\left({\frac {x-x_{1}}{x_{0}-x_{1}}}\right)\left({\frac {x-x_{2}}{x_{0}-x_{2}}}\right)}
l
1
(
x
)
=
(
x
−
x
0
x
1
−
x
0
)
(
x
−
x
2
x
1
−
x
2
)
{\displaystyle l_{1}\left(x\right)=\left({\frac {x-x_{0}}{x_{1}-x_{0}}}\right)\left({\frac {x-x_{2}}{x_{1}-x_{2}}}\right)}
l
2
(
x
)
=
(
x
−
x
0
x
2
−
x
0
)
(
x
−
x
1
x
2
−
x
1
)
{\displaystyle l_{2}\left(x\right)=\left({\frac {x-x_{0}}{x_{2}-x_{0}}}\right)\left({\frac {x-x_{1}}{x_{2}-x_{1}}}\right)}
But we know that
x
1
=
(
x
0
+
x
2
)
2
{\displaystyle x_{1}={\frac {\left(x_{0}+x_{2}\right)}{2}}}
or
2
x
1
=
(
x
0
+
x
2
)
{\displaystyle 2x_{1}=\left(x_{0}+x_{2}\right)}
∴
l
0
(
x
)
=
(
2
x
−
x
0
−
x
2
)
(
2
x
0
−
x
0
−
x
2
)
(
x
−
x
2
)
(
x
0
−
x
2
)
=
2
x
2
−
(
3
x
2
+
x
0
)
x
+
(
x
2
2
+
x
2
x
0
)
(
x
0
−
x
2
)
2
{\displaystyle \therefore l_{0}\left(x\right)={\frac {\left(2x-x_{0}-x_{2}\right)}{\left(2x_{0}-x_{0}-x_{2}\right)}}{\frac {\left(x-x_{2}\right)}{\left(x_{0}-x_{2}\right)}}={\frac {2x^{2}-\left(3x_{2}+x_{0}\right)x+\left(x_{2}^{2}+x_{2}x_{0}\right)}{\left(x_{0}-x_{2}\right)^{2}}}}
Similarily by substituting the value of
x
1
{\displaystyle x_{1}}
in the equations of
l
1
(
x
)
{\displaystyle l_{1}\left(x\right)}
and
l
2
(
x
)
{\displaystyle l_{2}\left(x\right)}
, we get:
l
1
(
x
)
=
−
4
(
x
2
−
(
x
0
+
x
2
)
x
+
x
0
x
2
)
(
x
0
−
x
2
)
2
{\displaystyle l_{1}\left(x\right)={\frac {-4\left(x^{2}-\left(x_{0}+x_{2}\right)x+x_{0}x_{2}\right)}{\left(x_{0}-x_{2}\right)^{2}}}}
l
2
(
x
)
=
(
2
x
−
x
0
−
x
2
)
(
2
x
2
−
x
0
−
x
2
)
(
x
−
x
0
)
(
x
2
−
x
0
)
=
2
x
2
−
(
3
x
0
+
x
2
)
x
+
(
x
0
2
+
x
2
x
0
)
(
x
0
−
x
2
)
2
{\displaystyle l_{2}\left(x\right)={\frac {\left(2x-x_{0}-x_{2}\right)}{\left(2x_{2}-x_{0}-x_{2}\right)}}{\frac {\left(x-x_{0}\right)}{\left(x_{2}-x_{0}\right)}}={\frac {2x^{2}-\left(3x_{0}+x_{2}\right)x+\left(x_{0}^{2}+x_{2}x_{0}\right)}{\left(x_{0}-x_{2}\right)^{2}}}}
Now plugging back the values of
l
0
(
x
)
,
l
1
(
x
)
{\displaystyle l_{0}\left(x\right),l_{1}\left(x\right)}
and
l
2
(
x
)
{\displaystyle l_{2}\left(x\right)}
in the Equation for
I
2
(
f
)
{\displaystyle I_{2}\left(f\right)}
, we get:
I
2
(
f
)
=
∫
x
0
x
2
[
(
2
x
2
−
(
3
x
2
+
x
0
)
x
+
(
x
2
2
+
x
2
x
0
)
(
x
0
−
x
2
)
2
)
⋅
f
(
x
0
)
+
(
−
4
(
x
2
−
(
x
0
+
x
2
)
x
+
x
0
x
2
)
(
x
0
−
x
2
)
2
)
⋅
f
(
x
1
)
+
(
2
x
2
−
(
3
x
0
+
x
2
)
x
+
(
x
0
2
+
x
2
x
0
)
(
x
0
−
x
2
)
2
)
⋅
f
(
x
2
)
]
⋅
d
x
{\displaystyle I_{2}\left(f\right)=\int _{x_{0}}^{x_{2}}\left[\left({\frac {2x^{2}-\left(3x_{2}+x_{0}\right)x+\left(x_{2}^{2}+x_{2}x_{0}\right)}{\left(x_{0}-x_{2}\right)^{2}}}\right)\cdot f\left(x_{0}\right)+\left({\frac {-4\left(x^{2}-\left(x_{0}+x_{2}\right)x+x_{0}x_{2}\right)}{\left(x_{0}-x_{2}\right)^{2}}}\right)\cdot f\left(x_{1}\right)+\left({\frac {2x^{2}-\left(3x_{0}+x_{2}\right)x+\left(x_{0}^{2}+x_{2}x_{0}\right)}{\left(x_{0}-x_{2}\right)^{2}}}\right)\cdot f\left(x_{2}\right)\right]\cdot dx}
Now isolating the
x
2
{\displaystyle x^{2}}
terms,
x
{\displaystyle x}
terms and constant terms, we get three consolidated terms as follows:
Term-1:
x
2
{\displaystyle x^{2}}
-term
x
2
(
x
0
−
x
2
)
2
[
2
f
(
x
0
)
−
4
f
(
x
1
)
+
2
f
(
x
2
)
]
{\displaystyle {\frac {x^{2}}{\left(x_{0}-x_{2}\right)^{2}}}\left[2f\left(x_{0}\right)-4f\left(x_{1}\right)+2f\left(x_{2}\right)\right]}
Integrating this term between limits
x
0
{\displaystyle x_{0}}
and
x
2
{\displaystyle x_{2}}
, we get:
x
2
3
−
x
0
3
3
(
x
0
−
x
2
)
2
[
2
f
(
x
0
)
−
4
f
(
x
1
)
+
2
f
(
x
2
)
]
=
(
x
2
2
+
x
0
2
+
x
2
x
0
)
3
(
x
0
−
x
2
)
[
2
f
(
x
0
)
−
4
f
(
x
1
)
+
2
f
(
x
2
)
]
{\displaystyle {\frac {x_{2}^{3}-x_{0}^{3}}{3\left(x_{0}-x_{2}\right)^{2}}}\left[2f\left(x_{0}\right)-4f\left(x_{1}\right)+2f\left(x_{2}\right)\right]={\frac {\left(x_{2}^{2}+x_{0}^{2}+x_{2}x_{0}\right)}{3\left(x_{0}-x_{2}\right)}}\left[2f\left(x_{0}\right)-4f\left(x_{1}\right)+2f\left(x_{2}\right)\right]}
Term-2:
x
{\displaystyle x}
-term
−
x
(
x
0
−
x
2
)
2
[
(
3
x
2
+
x
0
)
f
(
x
0
)
−
4
(
x
2
+
x
0
)
f
(
x
1
)
+
(
3
x
0
+
x
2
)
f
(
x
2
)
]
{\displaystyle {\frac {-x}{\left(x_{0}-x_{2}\right)^{2}}}\left[\left(3x_{2}+x_{0}\right)f\left(x_{0}\right)-4\left(x_{2}+x_{0}\right)f\left(x_{1}\right)+\left(3x_{0}+x_{2}\right)f\left(x_{2}\right)\right]}
Integrating this term between limits
x
0
{\displaystyle x_{0}}
and
x
2
{\displaystyle x_{2}}
, we get:
x
2
2
−
x
0
2
2
(
x
0
−
x
2
)
2
[
(
3
x
2
+
x
0
)
f
(
x
0
)
−
4
(
x
2
+
x
0
)
f
(
x
1
)
+
(
3
x
0
+
x
2
)
f
(
x
2
)
]
=
x
2
+
x
0
2
(
x
2
−
x
0
)
[
(
3
x
2
+
x
0
)
f
(
x
0
)
−
4
(
x
2
+
x
0
)
f
(
x
1
)
+
(
3
x
0
+
x
2
)
f
(
x
2
)
]
{\displaystyle {\frac {x_{2}^{2}-x_{0}^{2}}{2\left(x_{0}-x_{2}\right)^{2}}}\left[\left(3x_{2}+x_{0}\right)f\left(x_{0}\right)-4\left(x_{2}+x_{0}\right)f\left(x_{1}\right)+\left(3x_{0}+x_{2}\right)f\left(x_{2}\right)\right]={\frac {x_{2}+x_{0}}{2\left(x_{2}-x_{0}\right)}}\left[\left(3x_{2}+x_{0}\right)f\left(x_{0}\right)-4\left(x_{2}+x_{0}\right)f\left(x_{1}\right)+\left(3x_{0}+x_{2}\right)f\left(x_{2}\right)\right]}
Term-3: Constant term
1
(
x
0
−
x
2
)
2
[
(
x
2
2
+
x
2
x
0
)
f
(
x
0
)
−
4
(
x
2
x
0
)
f
(
x
1
)
+
(
x
0
2
+
x
2
x
0
)
f
(
x
2
)
]
{\displaystyle {\frac {1}{\left(x_{0}-x_{2}\right)^{2}}}\left[\left(x_{2}^{2}+x_{2}x_{0}\right)f\left(x_{0}\right)-4\left(x_{2}x_{0}\right)f\left(x_{1}\right)+\left(x_{0}^{2}+x_{2}x_{0}\right)f\left(x_{2}\right)\right]}
Integrating this term between limits
x
0
{\displaystyle x_{0}}
and
x
2
{\displaystyle x_{2}}
, we get:
x
2
−
x
0
(
x
2
−
x
0
)
2
[
(
x
2
2
+
x
2
x
0
)
f
(
x
0
)
−
4
(
x
2
x
0
)
f
(
x
1
)
+
(
x
0
2
+
x
2
x
0
)
f
(
x
2
)
]
=
1
(
x
2
−
x
0
)
[
(
x
2
2
+
x
2
x
0
)
f
(
x
0
)
−
4
(
x
2
x
0
)
f
(
x
1
)
+
(
x
0
2
+
x
2
x
0
)
f
(
x
2
)
]
{\displaystyle {\frac {x_{2}-x_{0}}{\left(x_{2}-x_{0}\right)^{2}}}\left[\left(x_{2}^{2}+x_{2}x_{0}\right)f\left(x_{0}\right)-4\left(x_{2}x_{0}\right)f\left(x_{1}\right)+\left(x_{0}^{2}+x_{2}x_{0}\right)f\left(x_{2}\right)\right]={\frac {1}{\left(x_{2}-x_{0}\right)}}\left[\left(x_{2}^{2}+x_{2}x_{0}\right)f\left(x_{0}\right)-4\left(x_{2}x_{0}\right)f\left(x_{1}\right)+\left(x_{0}^{2}+x_{2}x_{0}\right)f\left(x_{2}\right)\right]}
Note that
I
2
(
f
)
=
T
e
r
m
1
+
T
e
r
m
2
+
T
e
r
m
3
{\displaystyle I_{2}\left(f\right)=Term\;1+Term\;2+Term\;3}
Now consolidating the coefficients of
f
(
x
0
)
,
f
(
x
1
)
a
n
d
f
(
x
2
)
{\displaystyle f\left(x_{0}\right),f\left(x_{1}\right)and\;f\left(x_{2}\right)}
in all the three terms, we get:
Consolidated Coefficient of
f
(
x
0
)
{\displaystyle f\left(x_{0}\right)}
as:
=
1
x
2
−
x
0
[
2
3
x
2
2
+
2
3
x
0
2
+
2
3
x
2
x
0
−
3
2
x
2
2
−
1
2
x
2
x
0
−
3
2
x
2
x
0
−
1
2
x
0
2
+
x
2
2
+
x
2
x
0
]
{\displaystyle ={\frac {1}{x_{2}-x_{0}}}\left[{\frac {2}{3}}x_{2}^{2}+{\frac {2}{3}}x_{0}^{2}+{\frac {2}{3}}x_{2}x_{0}-{\frac {3}{2}}x_{2}^{2}-{\frac {1}{2}}x_{2}x_{0}-{\frac {3}{2}}x_{2}x_{0}-{\frac {1}{2}}x_{0}^{2}+x_{2}^{2}+x_{2}x_{0}\right]}
=
1
x
2
−
x
0
[
(
1
+
2
3
−
3
2
)
x
2
2
+
(
2
3
−
1
2
)
x
0
2
+
(
2
3
−
1
2
−
3
2
+
1
)
x
0
x
2
]
{\displaystyle ={\frac {1}{x_{2}-x_{0}}}\left[\left(1+{\frac {2}{3}}-{\frac {3}{2}}\right)x_{2}^{2}+\left({\frac {2}{3}}-{\frac {1}{2}}\right)x_{0}^{2}+\left({\frac {2}{3}}-{\frac {1}{2}}-{\frac {3}{2}}+1\right)x_{0}x_{2}\right]}
=
1
6
(
x
2
−
x
0
)
[
(
x
2
−
x
0
)
2
]
=
(
x
2
−
x
0
)
6
{\displaystyle ={\frac {1}{6\left(x_{2}-x_{0}\right)}}\left[\left(x_{2}-x_{0}\right)^{2}\right]={\frac {\left(x_{2}-x_{0}\right)}{6}}}
Consolidated Coefficient of
f
(
x
1
)
{\displaystyle f\left(x_{1}\right)}
as:
=
1
x
2
−
x
0
[
−
4
3
x
2
2
−
4
3
x
0
2
−
4
3
x
2
x
0
+
4
2
x
2
2
+
4
2
x
0
2
+
(
4
2
)
2
x
2
x
0
−
4
x
2
x
0
]
{\displaystyle ={\frac {1}{x_{2}-x_{0}}}\left[{\frac {-4}{3}}x_{2}^{2}-{\frac {4}{3}}x_{0}^{2}-{\frac {4}{3}}x_{2}x_{0}+{\frac {4}{2}}x_{2}^{2}+{\frac {4}{2}}x_{0}^{2}+\left({\frac {4}{2}}\right)2x_{2}x_{0}-4x_{2}x_{0}\right]}
=
4
6
(
x
2
−
x
0
)
[
(
x
2
−
x
0
)
2
]
=
4
(
x
2
−
x
0
)
6
{\displaystyle ={\frac {4}{6\left(x_{2}-x_{0}\right)}}\left[\left(x_{2}-x_{0}\right)^{2}\right]={\frac {4\left(x_{2}-x_{0}\right)}{6}}}
Consolidated Coefficient of
f
(
x
2
)
{\displaystyle f\left(x_{2}\right)}
as:
=
1
x
2
−
x
0
[
2
3
x
2
2
+
2
3
x
0
2
+
2
3
x
2
x
0
−
3
2
x
2
x
0
−
3
2
x
0
2
−
1
2
x
2
2
−
1
2
x
2
x
0
+
x
0
2
+
x
2
x
0
]
{\displaystyle ={\frac {1}{x_{2}-x_{0}}}\left[{\frac {2}{3}}x_{2}^{2}+{\frac {2}{3}}x_{0}^{2}+{\frac {2}{3}}x_{2}x_{0}-{\frac {3}{2}}x_{2}x_{0}-{\frac {3}{2}}x_{0}^{2}-{\frac {1}{2}}x_{2}^{2}-{\frac {1}{2}}x_{2}x_{0}+x_{0}^{2}+x_{2}x_{0}\right]}
=
1
x
2
−
x
0
[
(
2
3
−
1
2
)
x
2
2
+
(
2
3
−
3
2
+
1
)
x
0
2
+
(
2
3
−
1
2
−
3
2
+
1
)
x
0
x
2
]
{\displaystyle ={\frac {1}{x_{2}-x_{0}}}\left[\left({\frac {2}{3}}-{\frac {1}{2}}\right)x_{2}^{2}+\left({\frac {2}{3}}-{\frac {3}{2}}+1\right)x_{0}^{2}+\left({\frac {2}{3}}-{\frac {1}{2}}-{\frac {3}{2}}+1\right)x_{0}x_{2}\right]}
=
1
6
(
x
2
−
x
0
)
[
(
x
2
−
x
0
)
2
]
=
(
x
2
−
x
0
)
6
{\displaystyle ={\frac {1}{6\left(x_{2}-x_{0}\right)}}\left[\left(x_{2}-x_{0}\right)^{2}\right]={\frac {\left(x_{2}-x_{0}\right)}{6}}}
Now the value of
I
2
(
f
)
{\displaystyle I_{2}\left(f\right)}
is the sum of all the consolidated coefficient multiplied by their respective
f
(
x
i
)
{\displaystyle f\left(x_{i}\right)}
term. i.e.
Where
h
:=
(
x
2
−
x
0
)
2
{\displaystyle h:={\frac {\left(x_{2}-x_{0}\right)}{2}}}
Thus, the simple Simpson's rule is derived using the Lagrange polynomial of second degree.
Solution for problem 2: Srikanth Madala 07:04, 11 February 2010 (UTC)
Proofread problem 2:
Problem-3: Study of Newton-Cotes method of numerical integration with the help of an example
edit
P.9-2 of Lecture 9 Notes
For the function:
F
(
x
)
=
exp
x
−
1
x
{\displaystyle F(x)={\frac {\exp ^{x}-1}{x}}}
on the interval between 0 and 1 and letting
x
0
=
a
a
n
d
x
n
=
b
{\displaystyle \qquad x_{0}=a\quad and\quad x_{n}=b}
Consider: n=1,2,4,8,16.
1) Construct
F
n
(
x
)
=
∑
i
n
l
i
,
n
(
x
)
f
(
x
i
)
{\displaystyle F_{n}(x)=\sum _{i}^{n}l_{i,n}(x)f(x_{i})}
Plot Fn for n=1,2,4,8,16
2) Compute the integral for n=1,2,4,8 and compare to I=1.3179022
∫
a
b
F
n
(
x
)
d
x
{\displaystyle \int _{a}^{b}F_{n}(x)dx}
3) for n=4 plot:
l
0
,
l
1
,
l
2
{\displaystyle l_{0}\quad ,\quad l_{1},\quad l_{2}}
1: Calculation of Function
edit
F
n
(
x
)
=
∑
i
n
L
i
,
n
(
x
)
F
(
x
i
)
{\displaystyle F_{n}(x)=\sum _{i}^{n}L_{i,n}(x)F(x_{i})}
For n=1
x
0
=
0
x
1
=
1
{\displaystyle x_{0}=0\quad x_{1}=1}
F
n
(
x
)
=
x
f
(
x
1
)
−
x
f
(
x
0
)
+
f
(
x
0
)
{\displaystyle \;F_{n}(x)=xf(x_{1})-xf(x_{0})+f(x_{0})}
For n=2
x
0
=
0
x
1
=
0.5
x
2
=
1
{\displaystyle x_{0}=0\quad x_{1}=0.5\quad x_{2}=1}
F
n
(
x
)
=
(
2
x
2
−
3
x
+
1
)
f
(
x
0
)
+
(
−
4
x
2
+
4
x
)
f
(
x
1
)
+
(
2
x
2
−
x
)
f
(
x
2
)
{\displaystyle \;F_{n}(x)=(2x^{2}-3x+1)f(x_{0})+(-4x^{2}+4x)f(x_{1})+(2x^{2}-x)f(x_{2})}
For n=4
x
0
=
0
x
1
=
0.25
x
2
=
0.5
x
3
=
0.75
x
4
=
1
{\displaystyle \;x_{0}=0\quad x_{1}=0.25\quad x_{2}=0.5\quad x_{3}=0.75\quad x_{4}=1}
F
n
(
x
)
=
L
0
(
x
)
F
(
x
0
)
+
L
1
(
x
)
F
(
x
1
)
+
L
2
(
x
)
F
(
x
2
)
+
L
3
(
x
)
F
(
x
3
)
+
L
4
(
x
)
F
(
x
4
)
{\displaystyle \;F_{n}(x)=L_{0}(x)F(x_{0})+L_{1}(x)F(x_{1})+L_{2}(x)F(x_{2})+L_{3}(x)F(x_{3})+L_{4}(x)F(x_{4})}
L
0
=
10.66667
x
4
−
26.66667
x
3
+
23.33333
x
2
−
8.33333
x
+
1
{\displaystyle \;L_{0}=10.66667x^{4}-26.66667x^{3}+23.33333x^{2}-8.33333x+1}
L
1
=
−
42.66667
x
4
+
96
x
3
−
69.33333
x
2
+
16
x
{\displaystyle \;L_{1}=-42.66667x^{4}+96x^{3}-69.33333x^{2}+16x}
L
2
=
64
x
4
−
128
x
3
+
76
x
2
−
12
x
{\displaystyle \;L_{2}=64x^{4}-128x^{3}+76x^{2}-12x}
L
3
=
−
42.66667
x
4
+
74.66667
x
3
−
37.33333
x
2
+
5.33333
x
{\displaystyle \;L_{3}=-42.66667x^{4}+74.66667x^{3}-37.33333x^{2}+5.33333x}
L
4
=
10.66667
x
4
−
16
x
3
+
7.33333
x
2
−
x
{\displaystyle \;L_{4}=10.66667x^{4}-16x^{3}+7.33333x^{2}-x}
For n=8
x
0
=
0
x
1
=
1
8
x
2
=
2
8
x
3
=
3
8
x
4
=
4
8
x
5
=
5
8
x
6
=
6
8
x
7
=
7
8
x
8
=
8
8
{\displaystyle \;x_{0}=0\quad x_{1}={\frac {1}{8}}\quad x_{2}={\frac {2}{8}}\quad x_{3}={\frac {3}{8}}\quad x_{4}={\frac {4}{8}}\quad x_{5}={\frac {5}{8}}\quad x_{6}={\frac {6}{8}}\quad x_{7}={\frac {7}{8}}\quad x_{8}={\frac {8}{8}}}
F
n
(
x
)
=
L
0
(
x
)
F
(
x
0
)
+
L
1
(
x
)
F
(
x
1
)
+
L
2
(
x
)
F
(
x
2
)
+
L
3
(
x
)
F
(
x
3
)
+
L
4
(
x
)
F
(
x
4
)
+
L
5
(
x
)
F
(
x
5
)
+
L
6
(
x
)
F
(
x
6
)
+
L
7
(
x
)
F
(
x
7
)
+
L
8
(
x
)
F
(
x
8
)
{\displaystyle \;F_{n}(x)=L_{0}(x)F(x_{0})+L_{1}(x)F(x_{1})+L_{2}(x)F(x_{2})+L_{3}(x)F(x_{3})+L_{4}(x)F(x_{4})+L_{5}(x)F(x_{5})+L_{6}(x)F(x_{6})+L_{7}(x)F(x_{7})+L_{8}(x)F(x_{8})}
L
0
=
416.10158
x
8
−
1872.45714
x
7
+
3549.86667
x
6
−
3686.40
x
5
+
2280.53334
x
4
−
854.40
x
3
+
187.49841
x
2
−
21.74286
x
+
1
{\displaystyle \;L_{0}=416.10158x^{8}-1872.45714x^{7}+3549.86667x^{6}-3686.40x^{5}+2280.53334x^{4}-854.40x^{3}+187.49841x^{2}-21.74286x+1}
L
1
=
−
3328.81269
x
8
+
14563.55555
x
7
−
26578.48889
x
6
+
26168.88889
x
5
−
14973.15556
x
4
+
4963.55556
x
3
−
879.54286
x
2
+
64
x
{\displaystyle \;L_{1}=-3328.81269x^{8}+14563.55555x^{7}-26578.48889x^{6}+26168.88889x^{5}-14973.15556x^{4}+4963.55556x^{3}-879.54286x^{2}+64x}
L
2
=
11650.84445
x
8
−
49516.08889
x
7
+
87017.24445
x
6
−
81464.88889
x
5
+
43488.71111
x
4
−
13051.02222
x
3
+
1987.2
x
2
−
112
x
{\displaystyle \;L_{2}=11650.84445x^{8}-49516.08889x^{7}+87017.24445x^{6}-81464.88889x^{5}+43488.71111x^{4}-13051.02222x^{3}+1987.2x^{2}-112x}
L
3
=
−
23301.688889
x
8
+
96119.46667
x
7
−
162747.73333
x
6
+
145408
x
5
−
73181.86667
x
4
+
20403.2
x
3
−
2848.71111
x
2
+
149.33333
x
{\displaystyle \;L_{3}=-23301.688889x^{8}+96119.46667x^{7}-162747.73333x^{6}+145408x^{5}-73181.86667x^{4}+20403.2x^{3}-2848.71111x^{2}+149.33333x}
L
4
=
29127.11111
x
8
−
116508.44444
x
7
+
190236.44444
x
6
−
162929.77778
x
5
+
78172.44444
x
4
−
20721.77778
x
3
+
2764
x
2
−
140
x
{\displaystyle \;L_{4}=29127.11111x^{8}-116508.44444x^{7}+190236.44444x^{6}-162929.77778x^{5}+78172.44444x^{4}-20721.77778x^{3}+2764x^{2}-140x}
L
5
=
−
23301.68889
x
8
+
90294.04444
x
7
−
142358.75556
x
6
+
117464.17778
x
5
−
54294.75556
x
4
+
13912.17778
x
3
−
1804.8
x
2
+
89.6
x
{\displaystyle \;L_{5}=-23301.68889x^{8}+90294.04444x^{7}-142358.75556x^{6}+117464.17778x^{5}-54294.75556x^{4}+13912.17778x^{3}-1804.8x^{2}+89.6x}
L
6
=
11650.84445
x
8
−
43690.66666
x
7
+
66628.26667
x
6
−
53248.0
x
5
+
23918.93333
x
4
−
5984
x
3
+
761.95556
x
2
−
37.33333
x
{\displaystyle \;L_{6}=11650.84445x^{8}-43690.66666x^{7}+66628.26667x^{6}-53248.0x^{5}+23918.93333x^{4}-5984x^{3}+761.95556x^{2}-37.33333x}
L
7
=
−
3328.81267
x
8
+
12066.94603
x
7
−
17840.35555
x
6
+
13880.88889
x
5
−
6098.48889
x
4
+
1499.02222
x
3
−
188.34286
x
2
+
9.14286
x
{\displaystyle \;L_{7}=-3328.81267x^{8}+12066.94603x^{7}-17840.35555x^{6}+13880.88889x^{5}-6098.48889x^{4}+1499.02222x^{3}-188.34286x^{2}+9.14286x}
L
8
=
416.10159
x
8
−
1456.35556
x
7
+
2093.51111
x
6
−
1592.88889
x
5
+
687.64444
x
4
−
166.75556
x
3
+
20.74285
x
2
−
x
{\displaystyle \;L_{8}=416.10159x^{8}-1456.35556x^{7}+2093.51111x^{6}-1592.88889x^{5}+687.64444x^{4}-166.75556x^{3}+20.74285x^{2}-x}
For n=16
L
0
=
881657.95157
x
16
−
7494092.58831
x
15
+
29273799.17310
x
14
−
69671642.03199
x
13
+
112925052.51958
x
12
−
131967887.58325
x
11
+
114825387.35065
x
10
−
75729669.30819
x
9
+
38171908.26140
x
8
−
14714527.588281
x
7
+
04309632.78652
x
6
−
945274.82454
x
5
+
151495.79946
x
4
−
17046.98375
x
3
+
1260.15769
x
2
−
54.09166
x
+
1
{\displaystyle \;L_{0}=881657.95157x^{16}-7494092.58831x^{15}+29273799.17310x^{14}-69671642.03199x^{13}+112925052.51958x^{12}-131967887.58325x^{11}+114825387.35065x^{10}-75729669.30819x^{9}+38171908.26140x^{8}-14714527.588281x^{7}+04309632.78652x^{6}-945274.82454x^{5}+151495.79946x^{4}-17046.98375x^{3}+1260.15769x^{2}-54.09166x+1}
L
1
=
−
14106527.22506
x
16
+
119023823.46147
x
15
−
460941797.80334
x
14
+
1085937410.14913
x
13
−
1738929752.17911
x
12
+
2002803091.82081
x
11
−
1712031004.37163
x
10
+
1104672771.15791
x
9
−
541708483.98513
x
8
+
201575661.16345
x
7
−
56355645.76161
x
6
+
11602169.33258
x
5
−
1698797.20815
x
4
+
166576.91462
x
3
−
9751.46595
x
2
+
256
x
{\displaystyle \;L_{1}=-14106527.22506x^{16}+119023823.46147x^{15}-460941797.80334x^{14}+1085937410.14913x^{13}-1738929752.17911x^{12}+2002803091.82081x^{11}-1712031004.37163x^{10}+1104672771.15791x^{9}-541708483.98513x^{8}+201575661.16345x^{7}-56355645.76161x^{6}+11602169.33258x^{5}-1698797.20815x^{4}+166576.91462x^{3}-9751.46595x^{2}+256x}
L
2
=
105798954.18798
x
16
−
0886066241.32429
x
15
+
3402097620.60708
x
14
−
7935334841.26295
x
13
+
12559089447.19286
x
12
−
14266260329.09093
x
11
+
11995763940.94187
x
10
−
7588089824.36582
x
9
+
3632117763.32303
x
8
−
1311728590.17858
x
7
+
353189860.61015
x
6
−
69284246.36891
x
5
+
9518965.13969
x
4
−
855767.40852
x
3
+
44247.99734
x
2
−
960
x
{\displaystyle \;L_{2}=105798954.18798x^{16}-0886066241.32429x^{15}+3402097620.60708x^{14}-7935334841.26295x^{13}+12559089447.19286x^{12}-14266260329.09093x^{11}+11995763940.94187x^{10}-7588089824.36582x^{9}+3632117763.32303x^{8}-1311728590.17858x^{7}+353189860.61015x^{6}-69284246.36891x^{5}+9518965.13969x^{4}-855767.40852x^{3}+44247.99734x^{2}-960x}
L
3
=
−
493728452.87722
x
16
+
4104117764.54188
x
15
−
15623805456.08729
x
14
+
36086656014.89820
x
13
−
56471781408.17665
x
12
+
63313558032.58708
x
11
−
52430924785.25504
x
10
+
32577816415.35461
x
9
−
15267928048.50856
x
8
+
5377398940.34311
x
7
−
1405132059.13719
x
6
+
265891640.65593
x
5
−
34982965.07744
x
4
+
2987004.95254
x
3
−
145624.88060
x
2
+
2986.66667
x
{\displaystyle \;L_{3}=-493728452.87722x^{16}+4104117764.54188x^{15}-15623805456.08729x^{14}+36086656014.89820x^{13}-56471781408.17665x^{12}+63313558032.58708x^{11}-52430924785.25504x^{10}+32577816415.35461x^{9}-15267928048.50856x^{8}+5377398940.34311x^{7}-1405132059.13719x^{6}+265891640.65593x^{5}-34982965.07744x^{4}+2987004.95254x^{3}-145624.88060x^{2}+2986.66667x}
L
4
=
1604617471.8510
x
16
−
13238094142.7704
x
15
+
49968790959.3588
x
14
−
114310190758.3826
x
13
+
176946047896.0571
x
12
−
195945043427.5014
x
11
+
159995944121.3113
x
10
−
97829012110.5894
x
9
+
45015620008.1122
x
8
−
15526535208.6470
x
7
+
3961897869.3057
x
6
−
729925713.3421
x
5
+
93240926.6909
x
4
−
7715278.7671
x
3
+
364667.3131
x
2
−
7280.0000
x
{\displaystyle \;L_{4}=1604617471.8510x^{16}-13238094142.7704x^{15}+49968790959.3588x^{14}-114310190758.3826x^{13}+176946047896.0571x^{12}-195945043427.5014x^{11}+159995944121.3113x^{10}-97829012110.5894x^{9}+45015620008.1122x^{8}-15526535208.6470x^{7}+3961897869.3057x^{6}-729925713.3421x^{5}+93240926.6909x^{4}-7715278.7671x^{3}+364667.3131x^{2}-7280.0000x}
L
5
=
−
3851081932.4423
x
16
+
31530733321.8714
x
15
−
118014600625.0386
x
14
+
267446169700.4090
x
13
−
409679701374.1887
x
12
+
448410826284.2035
x
11
−
361428908733.8343
x
10
+
217840661558.8782
x
9
−
98659688548.6735
x
8
+
33441903834.1596
x
7
−
8373881063.3471
x
6
+
1512122601.3085
x
5
−
189195339.1544
x
4
+
15337681.5698
x
3
−
711343.3212
x
2
+
13977.6
x
{\displaystyle \;L_{5}=-3851081932.4423x^{16}+31530733321.8714x^{15}-118014600625.0386x^{14}+267446169700.4090x^{13}-409679701374.1887x^{12}+448410826284.2035x^{11}-361428908733.8343x^{10}+217840661558.8782x^{9}-98659688548.6735x^{8}+33441903834.1596x^{7}-8373881063.3471x^{6}+1512122601.3085x^{5}-189195339.1544x^{4}+15337681.5698x^{3}-711343.3212x^{2}+13977.6x}
L
6
=
7060316876.1442
x
16
−
57365074618.6718
x
15
+
212912680796.2242
x
14
−
478088254093.5941
x
13
+
725020725291.7742
x
12
−
784916071782.2535
x
11
+
625178174985.6762
x
10
−
372001376200.4074
x
9
+
166180125282.1892
x
8
−
55516389946.1491
x
7
+
13692893124.6509
x
6
−
2434925873.1974
x
5
+
300081159.6671
x
4
−
23981811.0600
x
3
+
1098163.6741
x
2
−
21354.6667
x
{\displaystyle \;L_{6}=7060316876.1442x^{16}-57365074618.6718x^{15}+212912680796.2242x^{14}-478088254093.5941x^{13}+725020725291.7742x^{12}-784916071782.2535x^{11}+625178174985.6762x^{10}-372001376200.4074x^{9}+166180125282.1892x^{8}-55516389946.1491x^{7}+13692893124.6509x^{6}-2434925873.1974x^{5}+300081159.6671x^{4}-23981811.0600x^{3}+1098163.6741x^{2}-21354.6667x}
L
7
=
−
10086166965.920
x
16
+
81319721162.733
x
15
−
299314884531.628
x
14
+
666093322863.382
x
13
+
1000446772071.373
x
12
+
1072017171171.158
x
11
−
844594918904.077
x
10
+
496837139865.232
x
9
−
219320381819.450
x
8
+
72381528563.948
x
7
−
17635280331.068
x
6
+
3098508847.931
x
5
−
377514324.910
x
4
+
29854977.045
x
3
−
1354651.574
x
2
+
26148.571
x
{\displaystyle \;L_{7}=-10086166965.920x^{16}+81319721162.733x^{15}-299314884531.628x^{14}+666093322863.382x^{13}+1000446772071.373x^{12}+1072017171171.158x^{11}-844594918904.077x^{10}+496837139865.232x^{9}-219320381819.450x^{8}+72381528563.948x^{7}-17635280331.068x^{6}+3098508847.931x^{5}-377514324.910x^{4}+29854977.045x^{3}-1354651.574x^{2}+26148.571x}
L
8
=
11346937836.660
x
16
−
90775502693.283
x
15
+
331366044011.222
x
14
−
730991010946.104
x
13
+
1087849920454.064
x
12
−
1154501752969.400
x
11
+
900551858718.191
x
10
−
524364914637.391
x
9
+
229090002005.604
x
8
−
74830969058.400
x
7
+
18049489433.320
x
6
−
3140942275.210
x
5
+
379279801.510
x
4
−
29754780.212
x
3
+
1340839.429
x
2
−
25740
x
{\displaystyle \;L_{8}=11346937836.660x^{16}-90775502693.283x^{15}+331366044011.222x^{14}-730991010946.104x^{13}+1087849920454.064x^{12}-1154501752969.400x^{11}+900551858718.191x^{10}-524364914637.391x^{9}+229090002005.604x^{8}-74830969058.400x^{7}+18049489433.320x^{6}-3140942275.210x^{5}+379279801.510x^{4}-29754780.212x^{3}+1340839.429x^{2}-25740x}
L
9
=
−
10086166965.9203
x
16
+
80058950291.9925
x
15
−
289859103001.0773
x
14
+
633997839407.8629
x
13
−
935238816157.1799
x
12
+
983640799863.9704
x
11
−
760304481367.9756
x
10
+
438676146116.2794
x
9
−
189931298320.0814
x
8
+
61497840304.9114
x
7
−
14709663906.2828
x
6
+
2539758045.4894
x
5
−
304498045.2923
x
4
+
23737343.7162
x
3
−
1063948.1905
x
2
+
20337.7778
x
{\displaystyle \;L_{9}=-10086166965.9203x^{16}+80058950291.9925x^{15}-289859103001.0773x^{14}+633997839407.8629x^{13}-935238816157.1799x^{12}+983640799863.9704x^{11}-760304481367.9756x^{10}+438676146116.2794x^{9}-189931298320.0814x^{8}+61497840304.9114x^{7}-14709663906.2828x^{6}+2539758045.4894x^{5}-304498045.2923x^{4}+23737343.7162x^{3}-1063948.1905x^{2}+20337.7778x}
L
10
=
7060316876.1442
x
16
−
55599995399.6357
x
15
+
199674586653.4538
x
14
−
433133892733.7696
x
13
+
633595137618.2660
x
12
−
660801882755.2526
x
11
+
506520525181.9884
x
10
−
289867863581.2933
x
9
+
124513226619.0337
x
8
−
40013170290.0740
x
7
+
9503307923.1606
x
6
−
1630193342.9661
x
5
+
194307522.7623
x
4
−
15070044.2088
x
3
+
672565.1911
x
2
−
12812.8
x
{\displaystyle \;L_{10}=7060316876.1442x^{16}-55599995399.6357x^{15}+199674586653.4538x^{14}-433133892733.7696x^{13}+633595137618.2660x^{12}-660801882755.2526x^{11}+506520525181.9884x^{10}-289867863581.2933x^{9}+124513226619.0337x^{8}-40013170290.0740x^{7}+9503307923.1606x^{6}-1630193342.9661x^{5}+194307522.7623x^{4}-15070044.2088x^{3}+672565.1911x^{2}-12812.8x}
L
11
=
−
3851081932.4423
x
16
+
30086577597.2055
x
15
−
107183432690.0446
x
14
+
230637122421.3279
x
13
−
334693607740.9036
x
12
+
346333877641.7664
x
11
−
263452751068.9336
x
10
+
149663429178.3096
x
9
−
63841287725.7351
x
8
+
20382171194.1772
x
7
−
4811733315.5251
x
6
+
820893779.1809
x
5
−
97369178.8764
x
4
+
7519914.5780
x
3
−
334427.5394
x
2
+
6353.4545
x
{\displaystyle \;L_{11}=-3851081932.4423x^{16}+30086577597.2055x^{15}-107183432690.0446x^{14}+230637122421.3279x^{13}-334693607740.9036x^{12}+346333877641.7664x^{11}-263452751068.9336x^{10}+149663429178.3096x^{9}-63841287725.7351x^{8}+20382171194.1772x^{7}-4811733315.5251x^{6}+820893779.1809x^{5}-97369178.8764x^{4}+7519914.5780x^{3}-334427.5394x^{2}+6353.4545x}
L
12
=
1604617471.8510
x
16
−
12435785406.8449
x
15
+
43951475439.9177
x
14
−
93838781918.2841
x
13
+
135144509146.9397
x
12
−
138823173541.3109
x
11
+
104864824822.2035
x
10
−
59179379524.2647
x
9
+
25088338392.5610
x
8
−
7964186416.2542
x
7
+
1870391859.2768
x
6
−
317606286.2109
x
5
+
37517640.3682
x
4
−
2887280.1637
x
3
+
128026.8822
x
2
−
2426.6667
x
{\displaystyle \;L_{12}=1604617471.8510x^{16}-12435785406.8449x^{15}+43951475439.9177x^{14}-93838781918.2841x^{13}+135144509146.9397x^{12}-138823173541.3109x^{11}+104864824822.2035x^{10}-59179379524.2647x^{9}+25088338392.5610x^{8}-7964186416.2542x^{7}+1870391859.2768x^{6}-317606286.2109x^{5}+37517640.3682x^{4}-2887280.1637x^{3}+128026.8822x^{2}-2426.6667x}
L
13
=
−
493728452.87722
x
16
+
3795537481.49362
x
15
−
13309453333.22533
x
14
+
28202188704.66898
x
13
−
40323751088.42652
x
12
+
41138969287.27365
x
11
−
30876804370.45528
x
10
+
17321211261.59502
x
9
−
7302784476.34160
x
8
+
2306623062.41091
x
7
−
539263122.24266
x
6
+
91202614.92199
x
5
−
10735523.07630
x
4
+
823698.40506
x
3
−
36433.35509
x
2
+
689.23077
x
{\displaystyle \;L_{13}=-493728452.87722x^{16}+3795537481.49362x^{15}-13309453333.22533x^{14}+28202188704.66898x^{13}-40323751088.42652x^{12}+41138969287.27365x^{11}-30876804370.45528x^{10}+17321211261.59502x^{9}-7302784476.34160x^{8}+2306623062.41091x^{7}-539263122.24266x^{6}+91202614.92199x^{5}-10735523.07630x^{4}+823698.40506x^{3}-36433.35509x^{2}+689.23077x}
L
14
=
105798954.18797
x
16
−
806717025.68331
x
15
+
2806978503.29972
x
14
−
5904490853.45158
x
13
+
8384576805.58060
x
12
−
8499641805.10702
x
11
+
6341859902.60960
x
10
−
3538432902.20016
x
9
+
1484500201.94362
x
8
−
466805633.89329
x
7
+
108701004.725845
x
6
−
18319599.810063
x
5
+
2149846.10200
x
4
−
164522.71173
x
3
+
7261.55064
x
2
−
137.14286
x
{\displaystyle \;L_{14}=105798954.18797x^{16}-806717025.68331x^{15}+2806978503.29972x^{14}-5904490853.45158x^{13}+8384576805.58060x^{12}-8499641805.10702x^{11}+6341859902.60960x^{10}-3538432902.20016x^{9}+1484500201.94362x^{8}-466805633.89329x^{7}+108701004.725845x^{6}-18319599.810063x^{5}+2149846.10200x^{4}-164522.71173x^{3}+7261.55064x^{2}-137.14286x}
L
15
=
−
14106527.22506
x
16
+
106680612.13954
x
15
−
368367712.88886
x
14
+
769401541.678536
x
13
−
1085486894.98980
x
12
+
1093842237.27907
x
11
−
811729100.16131
x
10
+
450678677.52992
x
9
−
188239271.99821
x
8
+
58958123.91421
x
7
−
13680883.41476
x
6
+
2298568.99135
x
5
−
269024.36205
x
4
+
20541.40071
x
3
−
904.95995
x
2
+
17.06667
x
{\displaystyle \;L_{15}=-14106527.22506x^{16}+106680612.13954x^{15}-368367712.88886x^{14}+769401541.678536x^{13}-1085486894.98980x^{12}+1093842237.27907x^{11}-811729100.16131x^{10}+450678677.52992x^{9}-188239271.99821x^{8}+58958123.91421x^{7}-13680883.41476x^{6}+2298568.99135x^{5}-269024.36205x^{4}+20541.40071x^{3}-904.95995x^{2}+17.06667x}
L
16
=
881657.95157
x
16
−
6612434.63675
x
15
+
22661364.53636
x
14
−
47010277.49563
x
13
+
65914775.02395
x
12
−
66053112.55929
x
11
+
48772274.79135
x
10
−
26957394.51683
x
9
+
11214513.74456
x
8
−
3500013.84371
x
7
+
809618.94280
x
6
−
135655.88173
x
5
+
15839.91772
x
4
−
1207.06603
x
3
+
53.09166
x
2
−
x
{\displaystyle \;L_{16}=881657.95157x^{16}-6612434.63675x^{15}+22661364.53636x^{14}-47010277.49563x^{13}+65914775.02395x^{12}-66053112.55929x^{11}+48772274.79135x^{10}-26957394.51683x^{9}+11214513.74456x^{8}-3500013.84371x^{7}+809618.94280x^{6}-135655.88173x^{5}+15839.91772x^{4}-1207.06603x^{3}+53.09166x^{2}-x}
2:Integral Comparison
edit
Integrals using Newton Cotes
Actual Value
1.3179022
n
Estimated Value
Percent Difference
n=1
1.35915
3.12981%
n=2
1.318008
.00802791%
n=4
1.318009
.00810379%
n=8
1.31790215
3.7939E-6
3: Lagrange Polynomial Plots
edit
The plots for l3 and l4 (3rd and 4th Lagrange Polynomial) are not necessary to be plotted as their graph are symmetrical to one another (a mirror image of the l0 and l1 polynomials).
Solution for problem 3: Guillermo Varela
Problem-4: Simple to composite Simpson's rule
edit
Problem-5: Error Bound
edit
Refer to P. 11-1 on Lecture-11 Notes
Find
n
{\displaystyle n\!}
if:
|
f
n
T
(
7
π
8
)
−
f
(
7
π
8
)
|
≤
|
f
4
L
(
7
π
8
)
−
f
(
7
π
8
)
|
≤
|
q
4
+
1
(
t
)
|
(
4
+
1
)
!
{\displaystyle \left|f_{n}^{T}({\frac {7\pi }{8}})-f({\frac {7\pi }{8}})\right|\leq \left|f_{4}^{L}({\frac {7\pi }{8}})-f({\frac {7\pi }{8}})\right|\leq {\frac {\left|q_{4+1}(t)\right|}{(4+1)!}}}
For
f
(
x
)
=
s
i
n
(
x
)
{\displaystyle f(x)=sin(x)\!}
and
x
0
=
0
,
x
1
=
π
4
,
x
2
=
π
2
,
x
3
=
3
π
4
,
x
4
=
1
{\displaystyle x_{0}=0,x_{1}={\frac {\pi }{4}},x_{2}={\frac {\pi }{2}},x_{3}={\frac {3\pi }{4}},x_{4}=1}
Constructing the Lagrangian Interpolating Function:
f
4
L
(
x
)
=
P
4
(
x
)
=
∑
i
=
0
4
l
i
,
4
(
x
)
f
(
x
i
)
{\displaystyle f_{4}^{L}(x)=P_{4}(x)=\sum _{i=0}^{4}l_{i,4}(x)f(x_{i})}
Where
l
i
,
4
(
x
)
=
∏
j
=
0
,
j
≠
4
4
x
−
x
j
x
i
−
x
j
{\displaystyle l_{i,4}(x)=\prod _{j=0,j\neq 4}^{4}{\frac {x-x_{j}}{x_{i}-x_{j}}}}
The Lagrangian Error
E
4
L
(
7
π
8
)
=
|
f
4
L
(
7
π
8
)
−
f
(
7
π
8
)
|
≤
|
q
5
(
7
π
8
)
|
5
!
{\displaystyle E_{4}^{L}({\frac {7\pi }{8}})=\left|f_{4}^{L}({\frac {7\pi }{8}})-f({\frac {7\pi }{8}})\right|\leq {\frac {\left|q_{5}({\frac {7\pi }{8}})\right|}{5!}}}
By Computing
f
4
L
(
7
π
8
)
,
f
(
7
π
8
)
,
q
5
(
7
π
8
)
5
!
{\displaystyle f_{4}^{L}({\frac {7\pi }{8}}),f({\frac {7\pi }{8}}),{\frac {q_{5}({\frac {7\pi }{8}})}{5!}}}
Must plot the functions to compute
E
4
L
(
7
π
8
)
=
1.4808
e
−
3
{\displaystyle E_{4}^{L}({\frac {7\pi }{8}})=1.4808e-3}
The Taylor Series Error
|
f
n
T
(
7
π
8
)
−
f
(
7
π
8
)
|
{\displaystyle \left|f_{n}^{T}({\frac {7\pi }{8}})-f({\frac {7\pi }{8}})\right|}
For
n
=
0
,
1
,
2
,
3...
{\displaystyle n=0,1,2,3...\!}
n=0
|
f
0
T
(
x
)
−
f
(
x
)
|
=
|
s
i
n
(
x
)
−
s
i
n
(
x
)
|
=
0
{\displaystyle \left|f_{0}^{T}(x)-f(x)\right|=\left|sin(x)-sin(x)\right|=0}
n=1
=
|
1
2
[
1
+
7
π
8
−
π
4
1
!
]
−
s
i
n
(
7
π
8
)
|
{\displaystyle =\left|{\frac {1}{\sqrt {2}}}\left[1+{\frac {{\frac {7\pi }{8}}-{\frac {\pi }{4}}}{1!}}\right]-sin({\frac {7\pi }{8}})\right|}
=
1.7128
{\displaystyle =1.7128\!}
...n=9
|
f
n
T
(
7
π
8
)
−
f
(
7
π
8
)
|
=
6.31
E
−
4
≤
E
4
L
(
7
π
8
)
=
1.4808
e
−
3
{\displaystyle \left|f_{n}^{T}({\frac {7\pi }{8}})-f({\frac {7\pi }{8}})\right|=6.31E-4\leq E_{4}^{L}({\frac {7\pi }{8}})=1.4808e-3}
Solution for problem 5:Egm6341.s10.team2.patodon 21:43, 10 February 2010 (UTC)
Proofread problem 5:
Problem 6: (n+1)th derivative of Lagrange Interpolation Error
edit
P. 12-2 reference: Lecture-12 Notes
For the Lagrange Interpolation Error verify the following:
E
(
n
+
1
)
(
x
)
=
f
(
n
+
1
)
(
x
)
−
0
{\displaystyle \displaystyle {\boldsymbol {E^{(n+1)}(x)=f^{(n+1)}(x)-0}}}
(1)
We can write the Lagrange Interpolation error as
E
(
x
)
=
f
(
x
)
−
f
n
(
x
)
{\displaystyle {\boldsymbol {E(x)=f(x)-f_{n}(x)}}}
differentiating the above expression once we get
E
1
(
x
)
=
f
1
(
x
)
−
f
n
1
(
x
)
{\displaystyle {\boldsymbol {E^{1}(x)=f^{1}(x)-f_{n}^{1}(x)}}}
differentiating the expression (n+1) times we get
E
n
+
1
(
x
)
=
f
n
+
1
(
x
)
−
f
n
n
+
1
(
x
)
{\displaystyle {\boldsymbol {E^{n+1}(x)=f^{n+1}(x)-f_{n}^{n+1}(x)}}}
But since
f
n
(
x
)
{\displaystyle {\boldsymbol {f_{n}(x)}}}
is a polynomial of degree n the (n+1)th derivative is zero
E
n
+
1
(
x
)
=
f
n
+
1
(
x
)
−
0
{\displaystyle \displaystyle {\boldsymbol {E^{n+1}(x)=f^{n+1}(x)-0}}}
(1)
Solution for problem 6: Egm6341.s10.team2.niki 00:20, 8 February 2010 (UTC)
Proofread problem 6:
P. 12-3 (top); reference: Lecture-12 Notes
To Prove that the
(
n
+
1
)
t
h
{\displaystyle \left(n+1\right)^{th}}
derivative of
q
n
+
1
(
x
)
{\displaystyle q_{n+1}\left(x\right)}
is
(
n
+
1
)
!
{\displaystyle \left(n+1\right)!}
We know that by definition
q
n
+
1
(
x
)
{\displaystyle q_{n+1}\left(x\right)}
is:
q
n
+
1
(
x
)
=
∏
j
=
0
n
(
x
−
x
j
)
{\displaystyle q_{n+1}\left(x\right)=\prod _{j=0}^{n}\left(x-x_{j}\right)}
Expanding the above terms in the product, we get:
q
n
+
1
(
x
)
=
(
x
−
x
0
)
(
x
−
x
1
)
(
x
−
x
2
)
.
.
.
.
.
(
x
−
x
n
)
{\displaystyle q_{n+1}\left(x\right)=\left(x-x_{0}\right)\left(x-x_{1}\right)\left(x-x_{2}\right).....\left(x-x_{n}\right)}
We see that the above expression is a
(
n
+
1
)
t
h
{\displaystyle \left(n+1\right)^{th}}
degree polynomial in
x
{\displaystyle x}
Let it be expressed as:
q
n
+
1
(
x
)
=
x
n
+
1
+
C
0
x
n
+
C
1
x
n
−
1
+
C
2
x
n
−
2
+
.
.
.
.
.
+
C
n
x
0
{\displaystyle q_{n+1}\left(x\right)=x^{n+1}+C_{0}x^{n}+C_{1}x^{n-1}+C_{2}x^{n-2}+.....+C_{n}x^{0}}
Note that here the coefficient of
x
n
+
1
{\displaystyle \;x^{n+1}}
is 1. As we successively differentiate the
q
n
+
1
(
x
)
{\displaystyle q_{n+1}\left(x\right)}
term
(
n
+
1
)
{\displaystyle \;\left(n+1\right)}
times, all the lower degree terms that are less than
(
n
+
1
)
{\displaystyle \;\left(n+1\right)}
vanish. Therefore, we are concerned only about the
(
n
+
1
)
t
h
{\displaystyle \;\left(n+1\right)^{th}}
degree term i.e.
x
n
+
1
{\displaystyle \;x^{n+1}}
as we successively differentiate the equation.
d
d
x
[
q
n
+
1
(
x
)
]
=
(
n
+
1
)
x
(
n
+
1
)
−
1
+
o
t
h
e
r
t
e
r
m
s
{\displaystyle {\frac {\mathrm {d} }{\mathrm {d} x}}\left[q_{n+1}\left(x\right)\right]=\left(n+1\right)x^{\left(n+1\right)-1}+other\;terms}
d
2
d
x
2
[
q
n
+
1
(
x
)
]
=
(
n
+
1
)
(
(
n
+
1
)
−
1
)
x
(
n
+
1
)
−
2
+
o
t
h
e
r
t
e
r
m
s
{\displaystyle {\frac {\mathrm {d^{2}} }{\mathrm {d} x^{2}}}\left[q_{n+1}\left(x\right)\right]=\left(n+1\right)\left(\left(n+1\right)-1\right)x^{\left(n+1\right)-2}+other\;terms}
⋮
⋮
⋮
⋮
{\displaystyle \vdots \qquad \qquad \qquad \vdots \qquad \qquad \qquad \vdots \qquad \qquad \qquad \vdots }
⋮
⋮
⋮
⋮
{\displaystyle \vdots \qquad \qquad \qquad \vdots \qquad \qquad \qquad \vdots \qquad \qquad \qquad \vdots }
d
n
+
1
d
x
n
+
1
[
q
n
+
1
(
x
)
]
=
(
n
+
1
)
(
(
n
+
1
)
−
1
)
⋯
⋯
(
(
n
+
1
)
−
n
)
x
(
n
+
1
)
−
(
n
+
1
)
=
(
n
+
1
)
(
(
n
+
1
)
−
1
)
⋯
⋯
(
(
n
+
1
)
−
n
)
=
(
n
+
1
)
⋅
(
n
)
⋯
⋯
2
⋅
1
=
(
n
+
1
)
!
{\displaystyle {\begin{matrix}{\frac {\mathrm {d} ^{n+1}}{\mathrm {d} x^{n+1}}}\left[q_{n+1}\left(x\right)\right]&=&\left(n+1\right)\left(\left(n+1\right)-1\right)\cdots \cdots \left(\left(n+1\right)-n\right)x^{\left(n+1\right)-\left(n+1\right)}\\\\\ &=&\left(n+1\right)\left(\left(n+1\right)-1\right)\cdots \cdots \left(\left(n+1\right)-n\right)\\\\\ &=&\left(n+1\right)\cdot \left(n\right)\cdots \cdots 2\;\cdot 1\\\\\ &=&\left(n+1\right)!\end{matrix}}}
Thus, we proved that the
(
n
+
1
)
t
h
{\displaystyle \left(n+1\right)^{th}}
derivative of
q
n
+
1
(
x
)
{\displaystyle q_{n+1}\left(x\right)}
is
(
n
+
1
)
!
{\displaystyle \left(n+1\right)!}
Solution for problem 7: Egm6341.s10.team2.madala 11:58, 8 February 2010 (UTC)
Proofread problem 7:
Problem-8: Geometric Interpretation of G(x) Error for Log(x)
edit
P.12-3
Let
F
(
x
)
=
log
(
x
)
a
n
d
t
=
2
x
0
=
3
x
1
=
4
.
.
.
x
6
=
9
{\displaystyle \;F(x)=\log(x)\quad and\quad t=2\quad x_{0}=3\quad x_{1}=4\quad ...\quad x_{6}=9}
Plot:
1) A graph of
F
(
x
)
{\displaystyle \;F(x)}
and
F
n
(
x
)
{\displaystyle \;F_{n}(x)}
2) A plot of the Lagrange Polynomial when i=3
3) A plot of
q
n
+
1
(
t
)
{\displaystyle \;q_{n+1}(t)}
when n=6
The Lagrange Interpolation Function is as follows:
F
n
=
−
4.92641
E
−
6
x
6
+
.000212
5
+
−
.0039
x
4
+
.039876
x
3
−
.25286
x
2
+
1.114899
x
−
.77941
{\displaystyle \;F_{n}=-4.92641E-6x^{6}+.000212^{5}+-.0039x^{4}+.039876x^{3}-.25286x^{2}+1.114899x-.77941}
The plot is as follows:
The Lagrange Polynomial is as follows:
L
3
(
x
)
=
−
0.027777778
x
6
+
x
5
−
14.61111111
x
4
+
110.6666667
x
3
−
457.3611111
x
2
+
976.3333333
x
−
840
{\displaystyle \;L_{3}(x)=-0.027777778x{^{6}}+x^{5}-14.61111111x^{4}+110.6666667x^{3}-457.3611111x^{2}+976.3333333x-840}
The plot as follows:
q
7
(
x
)
=
x
7
−
42
x
6
+
742
x
5
−
7140
x
4
+
40369
x
3
−
133938
x
2
+
241128
x
−
181440
{\displaystyle \;q_{7}(x)=x^{7}-42x^{6}+742x^{5}-7140x^{4}+40369x^{3}-133938x^{2}+241128x-181440}
The Plot as Follows:
Solution for problem 8:
Proofread problem 8: Srikanth Madala 07:04, 11 February 2010 (UTC)
Problem-9: Error in simple Trapezoidal rule
edit
Problem 10: Simple Simpson's Rule Error
edit
P. 13-2
Show that the Error for the simple simpson's rule is:
n
=
2
q
3
(
x
)
=
(
x
−
x
0
)
(
x
−
x
1
)
(
x
−
x
2
)
{\displaystyle n=2\qquad q_{3}(x)=(x-x_{0})(x-x_{1})(x-x_{2})}
|
E
2
|
=
(
b
−
a
)
4
192
M
3
=
2
4
h
4
M
3
192
{\displaystyle \left|E_{2}\right|={\frac {(b-a)^{4}}{192}}M_{3}={\frac {2^{4}h^{4}M_{3}}{192}}}
h
=
a
+
b
2
{\displaystyle h={\frac {a+b}{2}}}
The error can be written:
M
3
3
!
∫
a
b
|
(
x
−
a
)
(
x
−
a
+
b
2
)
(
x
−
b
)
|
d
x
{\displaystyle {\frac {M_{3}}{3!}}\int _{a}^{b}\left|(x-a)(x-{\frac {a+b}{2}})(x-b)\right|dx}
with
x
0
=
a
x
1
=
a
+
b
2
x
2
=
b
{\displaystyle x_{0}=a\quad x_{1}={\frac {a+b}{2}}\quad x_{2}=b}
The Integral can be evaluated as follows:
∫
a
b
|
(
x
−
a
)
(
x
−
a
+
b
2
)
(
x
−
b
)
|
d
x
=
∫
a
b
(
x
−
a
)
(
x
−
a
+
b
2
)
(
b
−
x
)
d
x
{\displaystyle \int _{a}^{b}\left|(x-a)(x-{\frac {a+b}{2}})(x-b)\right|dx=\int _{a}^{b}(x-a)(x-{\frac {a+b}{2}})(b-x)dx}
∫
a
b
(
x
b
−
x
2
−
a
b
+
x
a
)
(
x
−
a
+
b
2
d
x
{\displaystyle \int _{a}^{b}(xb-x^{2}-ab+xa)(x-{\frac {a+b}{2}}dx}
∫
a
b
−
x
3
+
x
2
(
(
b
+
a
)
+
(
a
+
b
2
)
+
x
(
−
a
b
−
b
a
+
b
2
−
a
(
b
+
a
2
)
)
+
a
b
(
a
+
b
2
)
d
x
{\displaystyle \int _{a}^{b}-x^{3}+x^{2}((b+a)+({\frac {a+b}{2}})+x(-ab-b{\frac {a+b}{2}}-a({\frac {b+a}{2}}))+ab({\frac {a+b}{2}})dx}
After algebraic manipulation and simplification the following is obtained:
1
4
[
−
b
4
−
a
4
+
(
2
a
+
2
b
)
(
b
3
−
a
3
)
+
(
a
2
+
b
2
)
(
b
2
−
a
2
)
+
(
a
+
b
)
(
2
a
b
2
−
2
a
2
b
)
]
{\displaystyle {\frac {1}{4}}\left[-b^{4}-a^{4}+(2a+2b)(b^{3}-a{3})+(a^{2}+b^{2})(b^{2}-a^{2})+(a+b)(2ab^{2}-2a^{2}b)\right]}
which reduces to:
1
32
(
b
−
a
)
4
{\displaystyle {\frac {1}{32}}(b-a)^{4}}
This result is used in the error function to yield:
(
b
−
a
)
4
32
M
3
3
!
=
(
b
−
a
)
4
192
M
3
=
h
4
16
192
M
3
{\displaystyle {\frac {(b-a)^{4}}{32}}{\frac {M_{3}}{3!}}={\frac {(b-a)^{4}}{192}}M_{3}={\frac {h^{4}16}{192}}M_{3}}
Solution for problem 10: Guillermo Varela
Problem 11:To show that Simpson's rule can be used to integrate a cubic polynomial exactly
edit
P. 13-3, reference: Lecture-13 Notes
Given the polynomial
f
3
(
x
)
=
P
3
(
x
)
=
3
+
8
x
1
−
2
x
2
+
6
x
3
{\displaystyle {\boldsymbol {f_{3}(x)=P_{3}(x)=3+8x^{1}-2x^{2}+6x^{3}}}}
where
x
ϵ
[
0
,
1
]
{\displaystyle {\boldsymbol {x\epsilon \left[0,1\right]}}}
determine the exact integral
I
{\displaystyle {\boldsymbol {I}}}
and the integral using Simpson's Rule
I
n
{\displaystyle {\boldsymbol {I_{n}}}}
Case A: Determination of Exact Integral
edit
I
=
∫
0
1
(
3
+
8
x
−
2
x
2
+
6
x
3
)
d
x
{\displaystyle {\boldsymbol {I=\int _{0}^{1}(3+8x-2x^{2}+6x^{3})dx}}}
I
=
[
3
x
+
4
x
2
−
2
3
x
3
+
3
2
x
4
]
0
1
{\displaystyle {\boldsymbol {I=[3x+4x^{2}-{\frac {2}{3}}x^{3}+{\frac {3}{2}}x^{4}]_{0}^{1}}}}
I
=
3
+
4
−
2
3
+
1.5
{\displaystyle {\boldsymbol {I=3+4-{\frac {2}{3}}+1.5}}}
I
=
7.833
{\displaystyle \displaystyle {\boldsymbol {I=7.833}}}
(1)
Case B: Using Simple Simpson's rule
edit
We have the Simple Simpson's rule as
I
2
=
h
3
{
f
(
x
0
)
+
4
f
(
x
1
)
+
f
(
x
2
)
}
{\displaystyle \displaystyle {\boldsymbol {I_{2}={\frac {h}{3}}\left\{f(x_{0})+4f(x_{1})+f(x_{2})\right\}}}}
(2 p7-2)
where
h
=
a
+
b
2
=
0
+
1
2
=
0.5
{\displaystyle {\boldsymbol {h={\frac {a+b}{2}}={\frac {0+1}{2}}=0.5}}}
I
2
=
0.5
3
{
f
(
0
)
+
4
f
(
0.5
)
+
f
(
1
)
}
{\displaystyle {\boldsymbol {I_{2}={\frac {0.5}{3}}\left\{f(0)+4f(0.5)+f(1)\right\}}}}
we know
f
(
0
)
=
3
;
f
(
0.5
)
=
7.25
;
f
(
1
)
=
15
{\displaystyle {\boldsymbol {f(0)=3;f(0.5)=7.25;f(1)=15}}}
substituting we get
I
2
=
0.5
3
{
3
+
4
(
7.25
)
+
15
}
=
0.5
3
{
47
}
{\displaystyle {\boldsymbol {I_{2}={\frac {0.5}{3}}\left\{3+4(7.25)+15\right\}={\frac {0.5}{3}}\left\{47\right\}}}}
I
2
=
7.833
{\displaystyle \displaystyle {\boldsymbol {I_{2}=7.833}}}
(2)
From the above we see that
I
=
I
2
=
7.833
{\displaystyle {\boldsymbol {I=I_{2}=7.833}}}
which proves that the Simpsons rule can integrate a cubic polynomial exactly
Solution for problem 11: Egm6341.s10.team2.niki 00:23, 8 February 2010 (UTC)
Proofread problem 11:
Problem-12: Differentiation of a definite integral
edit
P. 15-2 (bottom), Refer: Lecture-15 Notes
To Prove that:
e
(
3
)
(
t
)
=
−
t
3
[
F
(
3
)
(
t
)
−
F
(
3
)
(
−
t
)
]
{\displaystyle e^{(3)}\left(t\right)={\frac {-t}{3}}\left[F^{(3)}\left(t\right)-F^{(3)}\left(-t\right)\right]}
which is an intermediate step in the proof of tight error bound of simple Simpson's rule
We know by the definition
e
(
t
)
{\displaystyle e\left(t\right)}
e
(
t
)
{\displaystyle e\left(t\right)}
=
[
∫
−
t
t
F
(
τ
)
.
d
τ
]
−
(
t
3
)
[
F
(
−
t
)
+
4
F
(
0
)
+
F
(
t
)
]
{\displaystyle =\left[\int _{-t}^{t}F\left(\tau \right).d\tau \right]-\left({\frac {t}{3}}\right)\left[F\left(-t\right)+4F\left(0\right)+F\left(t\right)\right]}
=
[
∫
−
t
k
F
(
τ
)
.
d
τ
+
∫
k
t
F
(
τ
)
.
d
τ
]
−
(
t
3
)
[
F
(
−
t
)
+
4
F
(
0
)
+
F
(
t
)
]
{\displaystyle =\left[\int _{-t}^{k}F\left(\tau \right).d\tau +\int _{k}^{t}F\left(\tau \right).d\tau \right]-\left({\frac {t}{3}}\right)\left[F\left(-t\right)+4F\left(0\right)+F\left(t\right)\right]}
Differentiating with respect to 't', we get:
e
(
1
)
(
t
)
=
[
F
(
−
t
)
+
F
(
t
)
]
−
(
1
3
)
[
F
(
−
t
)
+
4
F
(
0
)
+
F
(
t
)
]
−
(
t
3
)
[
−
F
′
(
−
t
)
+
F
′
(
t
)
]
{\displaystyle e^{(1)}\left(t\right)=\left[F\left(-t\right)+F\left(t\right)\right]-\left({\frac {1}{3}}\right)\left[F\left(-t\right)+4F\left(0\right)+F\left(t\right)\right]-\left({\frac {t}{3}}\right)\left[-{F}'\left(-t\right)+{F}'\left(t\right)\right]}
Again Differentiating with respect to 't', we get:
e
(
2
)
(
t
)
{\displaystyle e^{(2)}\left(t\right)}
=
[
−
F
′
(
−
t
)
+
F
′
(
t
)
]
−
(
1
3
)
[
−
F
′
(
−
t
)
+
F
′
(
t
)
]
−
(
1
3
)
[
−
F
′
(
−
t
)
+
F
′
(
t
)
]
−
(
t
3
)
[
F
″
(
−
t
)
+
F
″
(
t
)
]
{\displaystyle =\left[-{F}'\left(-t\right)+{F}'\left(t\right)\right]-\left({\frac {1}{3}}\right)\left[-{F}'\left(-t\right)+{F}'\left(t\right)\right]-\left({\frac {1}{3}}\right)\left[-{F}'\left(-t\right)+{F}'\left(t\right)\right]-\left({\frac {t}{3}}\right)\left[{F}''\left(-t\right)+{F}''\left(t\right)\right]}
=
(
1
3
)
[
−
F
′
(
−
t
)
+
F
′
(
t
)
]
−
(
t
3
)
[
F
″
(
−
t
)
+
F
″
(
t
)
]
{\displaystyle =\left({\frac {1}{3}}\right)\left[-{F}'\left(-t\right)+{F}'\left(t\right)\right]-\left({\frac {t}{3}}\right)\left[{F}''\left(-t\right)+{F}''\left(t\right)\right]}
Again Differentiating with respect to 't', we get:
e
(
3
)
(
t
)
{\displaystyle e^{(3)}\left(t\right)}
=
(
1
3
)
[
F
″
(
−
t
)
+
F
″
(
t
)
]
−
(
1
3
)
[
F
″
(
−
t
)
+
F
″
(
t
)
]
−
(
t
3
)
[
−
F
‴
(
−
t
)
+
F
‴
(
t
)
]
{\displaystyle =\left({\frac {1}{3}}\right)\left[{F}''\left(-t\right)+{F}''\left(t\right)\right]-\left({\frac {1}{3}}\right)\left[{F}''\left(-t\right)+{F}''\left(t\right)\right]-\left({\frac {t}{3}}\right)\left[-{F}'''\left(-t\right)+{F}'''\left(t\right)\right]}
=
−
t
3
[
F
‴
(
t
)
−
F
‴
(
−
t
)
]
=
−
t
3
[
F
(
3
)
(
t
)
−
F
(
3
)
(
−
t
)
]
{\displaystyle ={\frac {-t}{3}}\left[{F}'''\left(t\right)-{F}'''\left(-t\right)\right]={\frac {-t}{3}}\left[F^{(3)}\left(t\right)-F^{(3)}\left(-t\right)\right]}
Thus Proved.
Solution for problem 14: Srikanth Madala 07:04, 11 February 2010 (UTC)
Proofread problem 14:
Problem-15: Relationship between ζ and ζ 4
edit
P. 15-3 on Lecture-15 Notes
Proof:
−
F
(
4
)
(
ζ
4
)
90
=
−
(
b
−
a
)
4
f
(
4
)
(
ζ
)
1440
{\displaystyle {\frac {-F^{(4)}(\zeta _{4})}{90}}={\frac {-(b-a)^{4}f^{(4)}(\zeta )}{1440}}}
Given:
x
(
t
)
=
x
1
+
h
t
a
n
d
h
=
b
−
a
2
{\displaystyle x(t)=x_{1}+ht\qquad and\qquad h={\frac {b-a}{2}}}
d
x
(
t
)
d
t
=
h
{\displaystyle {\frac {dx(t)}{dt}}=h}
F
(
t
)
=
F
(
x
(
t
)
)
{\displaystyle \;F(t)=F(x(t))}
F
1
(
t
)
=
d
f
(
x
(
t
)
)
d
t
=
d
f
(
x
)
d
x
d
x
d
t
=
f
1
(
x
)
h
{\displaystyle F^{1}(t)={\frac {df(x(t))}{dt}}={\frac {df(x)}{dx}}{\frac {dx}{dt}}=f^{1}(x)h}
F
2
(
t
)
=
d
f
1
(
x
(
t
)
)
d
t
=
h
d
f
1
(
x
)
d
x
d
x
d
t
=
f
2
(
x
)
h
2
{\displaystyle F^{2}(t)={\frac {df^{1}(x(t))}{dt}}=h{\frac {df^{1}(x)}{dx}}{\frac {dx}{dt}}=f^{2}(x)h^{2}}
F
3
(
t
)
=
d
f
2
(
x
(
t
)
)
d
t
=
h
2
d
f
2
(
x
)
d
x
d
x
d
t
=
f
3
(
x
)
h
3
{\displaystyle F^{3}(t)={\frac {df^{2}(x(t))}{dt}}=h^{2}{\frac {df^{2}(x)}{dx}}{\frac {dx}{dt}}=f^{3}(x)h^{3}}
F
4
(
t
)
=
d
f
3
(
x
(
t
)
)
d
t
=
h
3
d
f
3
(
x
)
d
x
d
x
d
t
=
f
4
(
x
)
h
4
{\displaystyle F^{4}(t)={\frac {df^{3}(x(t))}{dt}}=h^{3}{\frac {df^{3}(x)}{dx}}{\frac {dx}{dt}}=f^{4}(x)h^{4}}
The next step is to substitute h, and manipulate the equations as follows:
F
4
(
t
)
=
f
4
(
x
)
(
b
−
a
)
4
16
{\displaystyle F^{4}(t)=f^{4}(x){\frac {(b-a)^{4}}{16}}}
−
F
4
(
ζ
4
)
=
−
(
b
−
a
)
4
16
f
4
(
x
)
{\displaystyle -F^{4}(\zeta _{4})={\frac {-(b-a)^{4}}{16}}f^{4}(x)}
−
F
4
(
ζ
4
)
90
=
−
(
b
−
a
)
4
1440
F
4
(
x
)
{\displaystyle {\frac {-F^{4}(\zeta _{4})}{90}}={\frac {-(b-a)^{4}}{1440}}F^{4}(x)}
It is then seen that the relation between
ζ
a
n
d
ζ
4
{\displaystyle \zeta \quad and\quad \zeta _{4}}
must be:
ζ
=
x
1
+
h
ζ
4
{\displaystyle \;\zeta =x1+h\zeta _{4}}
Solution for problem 15:
Proofread problem 15:
Problem 16: Illustration of Runge Phenomenon
edit
P. 16-1 on Lecture-16 Notes
Given data:
I
=
∫
−
5
5
(
1
1
+
x
2
)
⋅
d
x
{\displaystyle I=\int _{-5}^{5}\left({\frac {1}{1+x^{2}}}\right)\cdot dx}
To find:
Using Newton-Cotes for
n
=
1
,
2
,
3
⋯
⋯
15
{\displaystyle n=1,2,3\cdots \cdots 15}
find the numerical integral
I
n
{\displaystyle \;I_{n}}
, and find Exact Integral
I
{\displaystyle \;I}
also for comparison
Plot
f
,
f
n
{\displaystyle f,\;f_{n}}
for selected values of
n
=
1
,
2
,
3
,
8
,
12
{\displaystyle \;n=1,2,3,8,12}
Plot
I
n
{\displaystyle \;I_{n}}
vs
n
{\displaystyle \;n}
and prove that the value of
I
n
{\displaystyle \;I_{n}}
does not converge with increasing value of
n
{\displaystyle \;n}
Prove that the weights
W
i
,
n
:=
∫
a
b
l
i
,
n
(
x
)
⋅
d
x
{\displaystyle W_{i,n}:=\int _{a}^{b}l_{i,n}\left(x\right)\cdot dx}
for
n
≥
8
{\displaystyle n\geq 8}
are not all positive and plot the
l
i
,
n
(
x
)
{\displaystyle l_{i,n}\left(x\right)}
for
i
=
1
,
2
,
3
⋯
8
{\displaystyle i=1,2,3\cdots 8}
with
n
=
8
{\displaystyle \;n=8}
1. From the below Matlab code, we generate the values of
I
{\displaystyle \;I}
and various values of
I
n
{\displaystyle \;I_{n}}
as tabulated below:
Integrals using Newton Cotes
Exact Integral value (I i.e 'IE' in Matlab code)
2 Arctan(5)=2.7468
n
Numerical Integral Value (I_{n} i.e 'I' in Matlab code)
Percent Difference
n=1
0.3846
614.1684
n=2
6.7949
-59.5754
n=3
2.0814
31.9659
n=4
2.3740
15.7033
n=5
2.3077
19.0281
n=6
3.8704
-29.0314
n=7
2.8990
-5.2499
n=8
1.5005
83.0604
n=9
2.3986
14.5160
n=10
4.6733
-41.2235
n=11
3.2448
-15.3469
n=12
-0.3129
-977.7504
n=13
1.9198
43.0777
n=14
7.8995
-65.2284
n=15
4.1556
-33.9006
2. We already know that:
f
(
x
)
=
(
1
1
+
x
2
)
{\displaystyle f\left(x\right)=\left({\frac {1}{1+x^{2}}}\right)}
And from Matlab code below we know that:
f
1
(
x
)
=
1
26
{\displaystyle f_{1}(x)={\frac {1}{26}}}
f
2
(
x
)
=
−
1
/
130
∗
y
∗
(
−
1
/
10
∗
y
+
1
/
2
)
+
(
1
/
5
∗
y
+
1
)
∗
(
−
1
/
5
∗
y
+
1
)
+
1
/
130
∗
(
1
/
10
∗
y
+
1
/
2
)
∗
y
{\displaystyle \;f_{2}(x)=-1/130*y*(-1/10*y+1/2)+(1/5*y+1)*(-1/5*y+1)+1/130*(1/10*y+1/2)*y}
f
3
(
x
)
=
1
/
26
∗
(
−
3
/
10
∗
y
−
1
/
2
)
∗
(
−
3
/
20
∗
y
+
1
/
4
)
∗
(
−
1
/
10
∗
y
+
1
/
2
)
+
9
/
34
∗
(
3
/
10
∗
y
+
3
/
2
)
∗
(
−
3
/
10
∗
y
+
1
/
2
)
∗
(
−
3
/
20
∗
y
+
3
/
4
)
+
9
/
34
∗
(
3
/
20
∗
y
+
3
/
4
)
∗
(
3
/
10
∗
y
+
1
/
2
)
∗
(
−
3
/
10
∗
y
+
3
/
2
)
+
1
/
26
∗
(
1
/
10
∗
y
+
1
/
2
)
∗
(
3
/
20
∗
y
+
1
/
4
)
∗
(
3
/
10
∗
y
−
1
/
2
)
{\displaystyle \;f_{3}(x)=1/26*(-3/10*y-1/2)*(-3/20*y+1/4)*(-1/10*y+1/2)+9/34*(3/10*y+3/2)*(-3/10*y+1/2)*(-3/20*y+3/4)+9/34*(3/20*y+3/4)*(3/10*y+1/2)*(-3/10*y+3/2)+1/26*(1/10*y+1/2)*(3/20*y+1/4)*(3/10*y-1/2)}
f
8
(
x
)
=
−
1
/
130
∗
(
−
4
/
5
∗
y
−
3
)
∗
(
−
2
/
5
∗
y
−
1
)
∗
(
−
4
/
15
∗
y
−
1
/
3
)
∗
y
∗
(
−
4
/
25
∗
y
+
1
/
5
)
∗
(
−
2
/
15
∗
y
+
1
/
3
)
∗
(
−
4
/
35
∗
y
+
3
/
7
)
∗
(
−
1
/
10
∗
y
+
1
/
2
)
−
64
/
3615
∗
(
4
/
5
∗
y
+
4
)
∗
(
−
4
/
5
∗
y
−
2
)
∗
(
−
2
/
5
∗
y
−
1
/
2
)
∗
y
∗
(
−
1
/
5
∗
y
+
1
/
4
)
∗
(
−
4
/
25
∗
y
+
2
/
5
)
∗
(
−
2
/
15
∗
y
+
1
/
2
)
∗
(
−
4
/
35
∗
y
+
4
/
7
)
−
8
/
145
∗
(
2
/
5
∗
y
+
2
)
∗
(
4
/
5
∗
y
+
3
)
∗
(
−
4
/
5
∗
y
−
1
)
∗
y
∗
(
−
4
/
15
∗
y
+
1
/
3
)
∗
(
−
1
/
5
∗
y
+
1
/
2
)
∗
(
−
4
/
25
∗
y
+
3
/
5
)
∗
(
−
2
/
15
∗
y
+
2
/
3
)
−
64
/
205
∗
(
4
/
15
∗
y
+
4
/
3
)
∗
(
2
/
5
∗
y
+
3
/
2
)
∗
(
4
/
5
∗
y
+
2
)
∗
y
∗
(
−
2
/
5
∗
y
+
1
/
2
)
∗
(
−
4
/
15
∗
y
+
2
/
3
)
∗
(
−
1
/
5
∗
y
+
3
/
4
)
∗
(
−
4
/
25
∗
y
+
4
/
5
)
+
(
1
/
5
∗
y
+
1
)
∗
(
4
/
15
∗
y
+
1
)
∗
(
2
/
5
∗
y
+
1
)
∗
(
4
/
5
∗
y
+
1
)
∗
(
−
4
/
5
∗
y
+
1
)
∗
(
−
2
/
5
∗
y
+
1
)
∗
(
−
4
/
15
∗
y
+
1
)
∗
(
−
1
/
5
∗
y
+
1
)
+
64
/
205
∗
(
4
/
25
∗
y
+
4
/
5
)
∗
(
1
/
5
∗
y
+
3
/
4
)
∗
(
4
/
15
∗
y
+
2
/
3
)
∗
(
2
/
5
∗
y
+
1
/
2
)
∗
y
∗
(
−
4
/
5
∗
y
+
2
)
∗
(
−
2
/
5
∗
y
+
3
/
2
)
∗
(
−
4
/
15
∗
y
+
4
/
3
)
+
8
/
145
∗
(
2
/
15
∗
y
+
2
/
3
)
∗
(
4
/
25
∗
y
+
3
/
5
)
∗
(
1
/
5
∗
y
+
1
/
2
)
∗
(
4
/
15
∗
y
+
1
/
3
)
∗
y
∗
(
4
/
5
∗
y
−
1
)
∗
(
−
4
/
5
∗
y
+
3
)
∗
(
−
2
/
5
∗
y
+
2
)
+
64
/
3615
∗
(
4
/
35
∗
y
+
4
/
7
)
∗
(
2
/
15
∗
y
+
1
/
2
)
∗
(
4
/
25
∗
y
+
2
/
5
)
∗
(
1
/
5
∗
y
+
1
/
4
)
∗
y
∗
(
2
/
5
∗
y
−
1
/
2
)
∗
(
4
/
5
∗
y
−
2
)
∗
(
−
4
/
5
∗
y
+
4
)
+
1
/
130
∗
(
1
/
10
∗
y
+
1
/
2
)
∗
(
4
/
35
∗
y
+
3
/
7
)
∗
(
2
/
15
∗
y
+
1
/
3
)
∗
(
4
/
25
∗
y
+
1
/
5
)
∗
y
∗
(
4
/
15
∗
y
−
1
/
3
)
∗
(
2
/
5
∗
y
−
1
)
∗
(
4
/
5
∗
y
−
3
)
{\displaystyle \;f_{8}(x)=-1/130*(-4/5*y-3)*(-2/5*y-1)*(-4/15*y-1/3)*y*(-4/25*y+1/5)*(-2/15*y+1/3)*(-4/35*y+3/7)*(-1/10*y+1/2)-64/3615*(4/5*y+4)*(-4/5*y-2)*(-2/5*y-1/2)*y*(-1/5*y+1/4)*(-4/25*y+2/5)*(-2/15*y+1/2)*(-4/35*y+4/7)-8/145*(2/5*y+2)*(4/5*y+3)*(-4/5*y-1)*y*(-4/15*y+1/3)*(-1/5*y+1/2)*(-4/25*y+3/5)*(-2/15*y+2/3)-64/205*(4/15*y+4/3)*(2/5*y+3/2)*(4/5*y+2)*y*(-2/5*y+1/2)*(-4/15*y+2/3)*(-1/5*y+3/4)*(-4/25*y+4/5)+(1/5*y+1)*(4/15*y+1)*(2/5*y+1)*(4/5*y+1)*(-4/5*y+1)*(-2/5*y+1)*(-4/15*y+1)*(-1/5*y+1)+64/205*(4/25*y+4/5)*(1/5*y+3/4)*(4/15*y+2/3)*(2/5*y+1/2)*y*(-4/5*y+2)*(-2/5*y+3/2)*(-4/15*y+4/3)+8/145*(2/15*y+2/3)*(4/25*y+3/5)*(1/5*y+1/2)*(4/15*y+1/3)*y*(4/5*y-1)*(-4/5*y+3)*(-2/5*y+2)+64/3615*(4/35*y+4/7)*(2/15*y+1/2)*(4/25*y+2/5)*(1/5*y+1/4)*y*(2/5*y-1/2)*(4/5*y-2)*(-4/5*y+4)+1/130*(1/10*y+1/2)*(4/35*y+3/7)*(2/15*y+1/3)*(4/25*y+1/5)*y*(4/15*y-1/3)*(2/5*y-1)*(4/5*y-3)}
f
12
(
x
)
=
−
1
/
130
∗
(
−
6
/
5
∗
y
−
5
)
∗
(
−
3
/
5
∗
y
−
2
)
∗
(
−
2
/
5
∗
y
−
1
)
∗
(
−
3
/
10
∗
y
−
1
/
2
)
∗
(
−
6
/
25
∗
y
−
1
/
5
)
∗
y
∗
(
−
6
/
35
∗
y
+
1
/
7
)
∗
(
−
3
/
20
∗
y
+
1
/
4
)
∗
(
−
2
/
15
∗
y
+
1
/
3
)
∗
(
−
3
/
25
∗
y
+
2
/
5
)
∗
(
−
6
/
55
∗
y
+
5
/
11
)
∗
(
−
1
/
10
∗
y
+
1
/
2
)
−
216
/
16525
∗
(
6
/
5
∗
y
+
6
)
∗
(
−
6
/
5
∗
y
−
4
)
∗
(
−
3
/
5
∗
y
−
3
/
2
)
∗
(
−
2
/
5
∗
y
−
2
/
3
)
∗
(
−
3
/
10
∗
y
−
1
/
4
)
∗
y
∗
(
−
1
/
5
∗
y
+
1
/
6
)
∗
(
−
6
/
35
∗
y
+
2
/
7
)
∗
(
−
3
/
20
∗
y
+
3
/
8
)
∗
(
−
2
/
15
∗
y
+
4
/
9
)
∗
(
−
3
/
25
∗
y
+
1
/
2
)
∗
(
−
6
/
55
∗
y
+
6
/
11
)
−
27
/
1090
∗
(
3
/
5
∗
y
+
3
)
∗
(
6
/
5
∗
y
+
5
)
∗
(
−
6
/
5
∗
y
−
3
)
∗
(
−
3
/
5
∗
y
−
1
)
∗
(
−
2
/
5
∗
y
−
1
/
3
)
∗
y
∗
(
−
6
/
25
∗
y
+
1
/
5
)
∗
(
−
1
/
5
∗
y
+
1
/
3
)
∗
(
−
6
/
35
∗
y
+
3
/
7
)
∗
(
−
3
/
20
∗
y
+
1
/
2
)
∗
(
−
2
/
15
∗
y
+
5
/
9
)
∗
(
−
3
/
25
∗
y
+
3
/
5
)
−
8
/
145
∗
(
2
/
5
∗
y
+
2
)
∗
(
3
/
5
∗
y
+
5
/
2
)
∗
(
6
/
5
∗
y
+
4
)
∗
(
−
6
/
5
∗
y
−
2
)
∗
(
−
3
/
5
∗
y
−
1
/
2
)
∗
y
∗
(
−
3
/
10
∗
y
+
1
/
4
)
∗
(
−
6
/
25
∗
y
+
2
/
5
)
∗
(
−
1
/
5
∗
y
+
1
/
2
)
∗
(
−
6
/
35
∗
y
+
4
/
7
)
∗
(
−
3
/
20
∗
y
+
5
/
8
)
∗
(
−
2
/
15
∗
y
+
2
/
3
)
−
27
/
170
∗
(
3
/
10
∗
y
+
3
/
2
)
∗
(
2
/
5
∗
y
+
5
/
3
)
∗
(
3
/
5
∗
y
+
2
)
∗
(
6
/
5
∗
y
+
3
)
∗
(
−
6
/
5
∗
y
−
1
)
∗
y
∗
(
−
2
/
5
∗
y
+
1
/
3
)
∗
(
−
3
/
10
∗
y
+
1
/
2
)
∗
(
−
6
/
25
∗
y
+
3
/
5
)
∗
(
−
1
/
5
∗
y
+
2
/
3
)
∗
(
−
6
/
35
∗
y
+
5
/
7
)
∗
(
−
3
/
20
∗
y
+
3
/
4
)
−
216
/
305
∗
(
6
/
25
∗
y
+
6
/
5
)
∗
(
3
/
10
∗
y
+
5
/
4
)
∗
(
2
/
5
∗
y
+
4
/
3
)
∗
(
3
/
5
∗
y
+
3
/
2
)
∗
(
6
/
5
∗
y
+
2
)
∗
y
∗
(
−
3
/
5
∗
y
+
1
/
2
)
∗
(
−
2
/
5
∗
y
+
2
/
3
)
∗
(
−
3
/
10
∗
y
+
3
/
4
)
∗
(
−
6
/
25
∗
y
+
4
/
5
)
∗
(
−
1
/
5
∗
y
+
5
/
6
)
∗
(
−
6
/
35
∗
y
+
6
/
7
)
+
(
1
/
5
∗
y
+
1
)
∗
(
6
/
25
∗
y
+
1
)
∗
(
3
/
10
∗
y
+
1
)
∗
(
2
/
5
∗
y
+
1
)
∗
(
3
/
5
∗
y
+
1
)
∗
(
6
/
5
∗
y
+
1
)
∗
(
−
6
/
5
∗
y
+
1
)
∗
(
−
3
/
5
∗
y
+
1
)
∗
(
−
2
/
5
∗
y
+
1
)
∗
(
−
3
/
10
∗
y
+
1
)
∗
(
−
6
/
25
∗
y
+
1
)
∗
(
−
1
/
5
∗
y
+
1
)
+
216
/
305
∗
(
6
/
35
∗
y
+
6
/
7
)
∗
(
1
/
5
∗
y
+
5
/
6
)
∗
(
6
/
25
∗
y
+
4
/
5
)
∗
(
3
/
10
∗
y
+
3
/
4
)
∗
(
2
/
5
∗
y
+
2
/
3
)
∗
(
3
/
5
∗
y
+
1
/
2
)
∗
y
∗
(
−
6
/
5
∗
y
+
2
)
∗
(
−
3
/
5
∗
y
+
3
/
2
)
∗
(
−
2
/
5
∗
y
+
4
/
3
)
∗
(
−
3
/
10
∗
y
+
5
/
4
)
∗
(
−
6
/
25
∗
y
+
6
/
5
)
+
27
/
170
∗
(
3
/
20
∗
y
+
3
/
4
)
∗
(
6
/
35
∗
y
+
5
/
7
)
∗
(
1
/
5
∗
y
+
2
/
3
)
∗
(
6
/
25
∗
y
+
3
/
5
)
∗
(
3
/
10
∗
y
+
1
/
2
)
∗
(
2
/
5
∗
y
+
1
/
3
)
∗
y
∗
(
6
/
5
∗
y
−
1
)
∗
(
−
6
/
5
∗
y
+
3
)
∗
(
−
3
/
5
∗
y
+
2
)
∗
(
−
2
/
5
∗
y
+
5
/
3
)
∗
(
−
3
/
10
∗
y
+
3
/
2
)
+
8
/
145
∗
(
2
/
15
∗
y
+
2
/
3
)
∗
(
3
/
20
∗
y
+
5
/
8
)
∗
(
6
/
35
∗
y
+
4
/
7
)
∗
(
1
/
5
∗
y
+
1
/
2
)
∗
(
6
/
25
∗
y
+
2
/
5
)
∗
(
3
/
10
∗
y
+
1
/
4
)
∗
y
∗
(
3
/
5
∗
y
−
1
/
2
)
∗
(
6
/
5
∗
y
−
2
)
∗
(
−
6
/
5
∗
y
+
4
)
∗
(
−
3
/
5
∗
y
+
5
/
2
)
∗
(
−
2
/
5
∗
y
+
2
)
+
27
/
1090
∗
(
3
/
25
∗
y
+
3
/
5
)
∗
(
2
/
15
∗
y
+
5
/
9
)
∗
(
3
/
20
∗
y
+
1
/
2
)
∗
(
6
/
35
∗
y
+
3
/
7
)
∗
(
1
/
5
∗
y
+
1
/
3
)
∗
(
6
/
25
∗
y
+
1
/
5
)
∗
y
∗
(
2
/
5
∗
y
−
1
/
3
)
∗
(
3
/
5
∗
y
−
1
)
∗
(
6
/
5
∗
y
−
3
)
∗
(
−
6
/
5
∗
y
+
5
)
∗
(
−
3
/
5
∗
y
+
3
)
+
216
/
16525
∗
(
6
/
55
∗
y
+
6
/
11
)
∗
(
3
/
25
∗
y
+
1
/
2
)
∗
(
2
/
15
∗
y
+
4
/
9
)
∗
(
3
/
20
∗
y
+
3
/
8
)
∗
(
6
/
35
∗
y
+
2
/
7
)
∗
(
1
/
5
∗
y
+
1
/
6
)
∗
y
∗
(
3
/
10
∗
y
−
1
/
4
)
∗
(
2
/
5
∗
y
−
2
/
3
)
∗
(
3
/
5
∗
y
−
3
/
2
)
∗
(
6
/
5
∗
y
−
4
)
∗
(
−
6
/
5
∗
y
+
6
)
+
1
/
130
∗
(
1
/
10
∗
y
+
1
/
2
)
∗
(
6
/
55
∗
y
+
5
/
11
)
∗
(
3
/
25
∗
y
+
2
/
5
)
∗
(
2
/
15
∗
y
+
1
/
3
)
∗
(
3
/
20
∗
y
+
1
/
4
)
∗
(
6
/
35
∗
y
+
1
/
7
)
∗
y
∗
(
6
/
25
∗
y
−
1
/
5
)
∗
(
3
/
10
∗
y
−
1
/
2
)
∗
(
2
/
5
∗
y
−
1
)
∗
(
3
/
5
∗
y
−
2
)
∗
(
6
/
5
∗
y
−
5
)
{\displaystyle \;f_{12}(x)=-1/130*(-6/5*y-5)*(-3/5*y-2)*(-2/5*y-1)*(-3/10*y-1/2)*(-6/25*y-1/5)*y*(-6/35*y+1/7)*(-3/20*y+1/4)*(-2/15*y+1/3)*(-3/25*y+2/5)*(-6/55*y+5/11)*(-1/10*y+1/2)-216/16525*(6/5*y+6)*(-6/5*y-4)*(-3/5*y-3/2)*(-2/5*y-2/3)*(-3/10*y-1/4)*y*(-1/5*y+1/6)*(-6/35*y+2/7)*(-3/20*y+3/8)*(-2/15*y+4/9)*(-3/25*y+1/2)*(-6/55*y+6/11)-27/1090*(3/5*y+3)*(6/5*y+5)*(-6/5*y-3)*(-3/5*y-1)*(-2/5*y-1/3)*y*(-6/25*y+1/5)*(-1/5*y+1/3)*(-6/35*y+3/7)*(-3/20*y+1/2)*(-2/15*y+5/9)*(-3/25*y+3/5)-8/145*(2/5*y+2)*(3/5*y+5/2)*(6/5*y+4)*(-6/5*y-2)*(-3/5*y-1/2)*y*(-3/10*y+1/4)*(-6/25*y+2/5)*(-1/5*y+1/2)*(-6/35*y+4/7)*(-3/20*y+5/8)*(-2/15*y+2/3)-27/170*(3/10*y+3/2)*(2/5*y+5/3)*(3/5*y+2)*(6/5*y+3)*(-6/5*y-1)*y*(-2/5*y+1/3)*(-3/10*y+1/2)*(-6/25*y+3/5)*(-1/5*y+2/3)*(-6/35*y+5/7)*(-3/20*y+3/4)-216/305*(6/25*y+6/5)*(3/10*y+5/4)*(2/5*y+4/3)*(3/5*y+3/2)*(6/5*y+2)*y*(-3/5*y+1/2)*(-2/5*y+2/3)*(-3/10*y+3/4)*(-6/25*y+4/5)*(-1/5*y+5/6)*(-6/35*y+6/7)+(1/5*y+1)*(6/25*y+1)*(3/10*y+1)*(2/5*y+1)*(3/5*y+1)*(6/5*y+1)*(-6/5*y+1)*(-3/5*y+1)*(-2/5*y+1)*(-3/10*y+1)*(-6/25*y+1)*(-1/5*y+1)+216/305*(6/35*y+6/7)*(1/5*y+5/6)*(6/25*y+4/5)*(3/10*y+3/4)*(2/5*y+2/3)*(3/5*y+1/2)*y*(-6/5*y+2)*(-3/5*y+3/2)*(-2/5*y+4/3)*(-3/10*y+5/4)*(-6/25*y+6/5)+27/170*(3/20*y+3/4)*(6/35*y+5/7)*(1/5*y+2/3)*(6/25*y+3/5)*(3/10*y+1/2)*(2/5*y+1/3)*y*(6/5*y-1)*(-6/5*y+3)*(-3/5*y+2)*(-2/5*y+5/3)*(-3/10*y+3/2)+8/145*(2/15*y+2/3)*(3/20*y+5/8)*(6/35*y+4/7)*(1/5*y+1/2)*(6/25*y+2/5)*(3/10*y+1/4)*y*(3/5*y-1/2)*(6/5*y-2)*(-6/5*y+4)*(-3/5*y+5/2)*(-2/5*y+2)+27/1090*(3/25*y+3/5)*(2/15*y+5/9)*(3/20*y+1/2)*(6/35*y+3/7)*(1/5*y+1/3)*(6/25*y+1/5)*y*(2/5*y-1/3)*(3/5*y-1)*(6/5*y-3)*(-6/5*y+5)*(-3/5*y+3)+216/16525*(6/55*y+6/11)*(3/25*y+1/2)*(2/15*y+4/9)*(3/20*y+3/8)*(6/35*y+2/7)*(1/5*y+1/6)*y*(3/10*y-1/4)*(2/5*y-2/3)*(3/5*y-3/2)*(6/5*y-4)*(-6/5*y+6)+1/130*(1/10*y+1/2)*(6/55*y+5/11)*(3/25*y+2/5)*(2/15*y+1/3)*(3/20*y+1/4)*(6/35*y+1/7)*y*(6/25*y-1/5)*(3/10*y-1/2)*(2/5*y-1)*(3/5*y-2)*(6/5*y-5)}
Using the above equations, we generate plots (as show in the picture below) of the function
f
(
x
)
,
f
n
(
x
)
{\displaystyle f\left(x\right),\;f_{n}\left(x\right)}
for selected values of
n
=
1
,
2
,
3
,
8
,
12
{\displaystyle \;n=1,2,3,8,12}
3. The following picture is generated using the Matlab code below and from the graph we can observe that the value of
I
n
{\displaystyle \;I_{n}}
does not converge with increasing value of
n
{\displaystyle \;n}
For each projected dotted line from X-axis on to the blue curve, we have a distinct numerical value of
I
n
{\displaystyle \;I_{n}}
on the Y-axis. The Exact Integral-
I
{\displaystyle \;I}
is the green straight line on the plot. We can clearly see that there is no convergence in the value of
I
n
{\displaystyle \;I_{n}}
(on Y-axis) as
n
{\displaystyle \;n}
(on X-axis) value increases.
4. The Values of weights are evaluated by integrated the Lagrange polynomials within the integration limits and they are presented in the table below. It can be noted that the Bold weights in the table are negative
Weights of the function
n-value
W0 Value
W1 Value
W2 Value
W3 Value
W4 Value
W5 Value
W6 Value
W7 Value
W8 Value
W9 Value
W10 Value
W11 Value
W12 Value
W13 Value
W14 Value
W15 Value
8
989/2835
5888/2835
-928/2835
10496/2835
-908/567
10496/2835
-928/2835
5888/2835
989/2835
9
2857/8960
15741/8960
27/224
1209/560
2889/4480
2889/4480
1209/560
27/224
15741/8960
2857/8960
10
80335/299376
132875/74844
-80875/99792
28375/6237
-24125/5544
89035/12474
-24125/5544
28375/6237
-80875/99792
132875/74844
80335/299376
11
434293/1741824
4495513/2903040
-3237113/8709120
560593/193536
-1599257/1451520
2582261/1451520
2582261/1451520
-1599257/1451520
560593/193536
-3237113/8709120
4495513/2903040
434293/1741824
12
1364651/6306300
25008/15925
-210774/175175
1786256/315315
-1144251/140140
2431008/175175
-1045204/75075
2431008/175175
-1144251/140140
1786256/315315
-210774/175175
25008/15925
1364651/6306300
13
8181904909/40236134400
56280729661/40236134400
-1737125143/2235340800
11148172711/2874009600
-6066382933/1609445376
22964826443/4470681600
-3592666051/3353011200
-3592666051/3353011200
22964826443/4470681600
-6066382933/1609445376
11148172711/2874009600
-1737125143/2235340800
56280729661/40236134400
8181904909/40236134400
14
90241897/500385600
44436679/31274100
-770720657/500385600
109420087/15637050
-6625093363/500385600
789382601/31274100
-5600756791/166795200
101741867/2606175
-5600756791/166795200
789382601/31274100
-6625093363/500385600
109420087/15637050
-770720657/500385600
44436679/31274100
90241897/500385600
15
25221445/147603456
147529925/114802688
-129408925/114802688
1746295975/344408064
-124034975/16400384
1367713705/114802688
-10001664025/1033224192
566004225/114802688
566004225/114802688
-10001664025/1033224192
1367713705/114802688
-124034975/16400384
1746295975/344408064
-129408925/114802688
147529925/114802688
25221445/147603456
The plot of
l
i
,
n
(
x
)
{\displaystyle l_{i,n}\left(x\right)}
for
i
=
1
,
2
,
3
⋯
8
{\displaystyle i=1,2,3\cdots 8}
with
n
=
8
{\displaystyle \;n=8}
MATLAB Code:
To generate the values of numerical Intergrals:
I
1
,
I
2
,
⋯
I
15
{\displaystyle I_{1},I_{2},\cdots I_{15}}
%To generate Lagrange polynomials l(x)%
for n = 1 : 15
for i = 1 : n + 1
x ( n , i ) = - 5 + ( i - 1 ) * 10 / n ;
f ( n , i ) = 1 / ( 1 + x ( n , i ) ^2 );
end
end
syms y ;
for n = 1 : 15
for i = 1 : n + 1
pr = 1 ;
for j = 1 : n + 1
if j ~= i
pr = pr * (( y - x ( n , j )) / ( x ( n , i ) - x ( n , j )));
end
end
l ( n , i )= pr ;
end
end
%To generate Fn(x)for numerically integrating%
for n = 1 : 15
for i = 1 : n + 1
F ( n , i )= l ( n , i ) * f ( n , i );
end
end
for n = 1 : 15
sum = 0 ;
for i = 1 : n + 1
sum = sum + F ( n , i );
end
G ( n )= sum ;
end
for n = 1 : 15
T ( n , 1 )= G ( n );
end
%for calculating Exact Integral and Numerical Integral%
Ie = double ( int ( 1 / ( 1 + y ^2 ), y , - 5 , 5 ));
for n = 1 : 15
I ( n , 1 )= int ( T ( n , 1 ), y , - 5 , 5 );
IE ( n , 1 )= Ie ;
end
n = linspace ( 1 , 15 , 15 );
I = double ( I );
plot ( n , I , n , IE );
legend ( 'I=Numerical Integral(I_n)' , 'IE=Exact Integral(I)' );
xlabel ( 'n-Value (Degree of the Newton-Cotes appoximating polynomial)' );
ylabel ( 'Numerical Value of Exact Integral (I) and Numerical Integrals (I_n)' );
%code for calculating percentage error%
for n = 1 : 15
PE ( n , 1 )=((( IE ( n , 1 ) - I ( n , 1 )) / I ( n , 1 )) * 100 );
end
Te =( 1 / ( 1 + y ^2 ));
%code for plotting f,f1,f2,f3,f8 and f12 that are represented by Te, T(1,1), T(2,1), T(3,1), T(8,1), T(12,1) respectively in this code%
figure ( 2 );
EZPLOT ( Te );
hold on ;
EZPLOT ( T ( 1 , 1 ))
hold on ;
EZPLOT ( T ( 2 , 1 ))
hold on ;
EZPLOT ( T ( 3 , 1 ))
hold on ;
EZPLOT ( T ( 8 , 1 ))
hold on ;
EZPLOT ( T ( 12 , 1 ))
hold on ;
xlabel ( 'x- Value ' );
ylabel ( 'f(x),f1(x),f2(x),f3(x),f8(x) and f12(x)' );
%code for calculating the Weights by integrating the lagrange polnomial%
for n = 1 : 15
for i = 1 : n + 1
W ( n , i )= int ( l ( n , i ), y , - 5 , 5 );
end
end
%code for plotting L0,L1,L2,L3,L4...L7 and L8 for n=8%
figure ( 3 );
ezplot ( l ( 8 , 1 ));
hold on ;
ezplot ( l ( 8 , 2 ));
hold on ;
ezplot ( l ( 8 , 3 ));
hold on ;
ezplot ( l ( 8 , 4 ));
hold on ;
ezplot ( l ( 8 , 5 ));
hold on ;
ezplot ( l ( 8 , 6 ));
hold on ;
ezplot ( l ( 8 , 7 ));
hold on ;
ezplot ( l ( 8 , 8 ));
hold on ;
ezplot ( l ( 8 , 9 ));
hold on ;
xlabel ( 'x- Value ' );
ylabel ( 'L0(x),L1(x),L2(x),L3(x)....L7(x) and L8(x)' );
Solution for problem 16: Srikanth Madala 07:04, 11 February 2010 (UTC)
Proofread problem 16:
Contributing Authors
edit
Solutions for problem 5 and proofread problems: 3,6,8,and 12--Egm6341.s10.team2.patodon 16:42, 10 February 2010 (UTC)
--Egm6341.s10.Team2.GV 21:55, 10 February 2010 (UTC)
Solutions for problems 1,6,11 and proofread 5,9,14--Niki Nachappa Chenanda Ganapathy
Solutions for problems 4,9,12,13 and proofread 2,10,11--Pengxiang Jiang
Solutions for problems 2,7,14,16 and proofread 1,8,13--Srikanth Madala 07:04, 11 February 2010 (UTC)
Problem Assignments
Problem
Solution
Proofread
Problem 1
NN
SM
Problem 2
SM
JP
Problem 3
GV
PO
Problem 4
JP
GV
Problem 5
PO
NN
Problem 6
NN
PO
Problem 7
SM
GV
Problem 8
PO
SM
Problem 9
JP
NN
Problem 10
GV
JP
Problem 11
NN
JP
Problem 12
GV
PO
Problem 13
JP
SM
Problem 14
SM
NN
Problem 15
PO
GV
Problem 16
SM
PO