University of Florida/Egm6341/s10.team3.aks

From Wikiversity
Jump to navigation Jump to search

(10) Prove Simple trapezoidal rule[edit | edit source]

Ref. Lecture notes [[[media:Egm6341.s10.mtg8.pdf|p.8-2]]]

Problem Statement[edit | edit source]

Use (2) in Slide [[[media:Egm6341.s10.mtg8.pdf|8-2]]] to obtain Simple trapezoidal rule.

Solution[edit | edit source]

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 | edit source]

Ref: Lecture notes p.8-3 [[[media:Egm6341.s10.mtg8.pdf]]|

Problem Statement[edit | edit source]

Expand(4) from Slide (8-3 [[[media:Egm6341.s10.mtg8.pdf]]]]) to obtain


Solution[edit | edit source]


where

but when

and when ij

then only surviving terms are given by

(3) Plot Functions Sin (x),-cos (x)and Sin(x)+cos(x)[edit | edit source]

Ref. Lecture notes p.3-3 [[[media:Egm6341.s10.mtg3.pdf]]|

Problem Statement[edit | edit source]

Plot f(x)= sin(x) and g(x) = - cos(x) in the interval of [0,pi]]

and also find

Solution[edit | edit source]

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)