< University of Florida < Egm6341

University of Florida/Egm6341/s10.team3.aks

(10) Prove Simple trapezoidal rule

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

Problem Statement

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

Solution

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

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

Problem Statement

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


Solution


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)

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

Problem Statement

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

and also find

Solution

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)

This article is issued from Wikiversity. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.