(10) Prove Simple trapezoidal rule
edit
Ref. Lecture notes [[[media:Egm6341.s10.mtg8.pdf|p.8-2]]]
Use (2) in Slide [[[media:Egm6341.s10.mtg8.pdf|8-2]]] to obtain Simple trapezoidal rule.
Given
+
where
,
,
Now +
=
=
=
=
which is same as equation (1) Slide p.7-1
This completes the Proof of trapezoidal rule
(11) Expansion of Lagrange functions
edit
Ref: Lecture notes p.8-3 [[[media:Egm6341.s10.mtg8.pdf]]|
Expand(4) from Slide (8-3 [[[media:Egm6341.s10.mtg8.pdf]]]]) to obtain
where
but when
and when i j
then only surviving terms are given by
(3) Plot Functions Sin (x),-cos (x)and Sin(x)+cos(x)
edit
Ref. Lecture notes p.3-3 [[[media:Egm6341.s10.mtg3.pdf]]|
Plot f(x)= sin(x) and g(x) = - cos(x) in the interval of [0,pi]]
and also find
Plot f(x)= sin(x) in interval [0,pi]
Matlab code :
x = 0:pi/100:pi;
y = sin(x);
plot(x,y)
xlabel('x = 0:pi');
ylabel('Sine of x');
title('Plot of the Sine Function');
Plot :
f(x)=y= Sin(x)
Plot g(x)= - cos(x) in interval [0,pi]
Matlab code :
x = 0:pi/100:pi;
y = -cos(x);
plot(x,y)
xlabel('x = 0:pi');
ylabel('cosine of x');
title('Plot of the cosine Function');
Plot :
g(x)= y = - cos(x)
Plot f(x)-g(x)= Sin(x)+cos(x)
Matlab code :
x = 0:pi/100:pi;
y = sin(x)+cos(x);
plot(x,y)
title('Plot of the Sine+Cosine Function');
ylabel('Sine+Cosine of x');
xlabel('x = 0:pi');
Abhishekksingh 16:25, 27 January 2010 (UTC)