Professional Documents
Culture Documents
4
S
1) (40 pts) Please solve evaluate this integral f (2—x-5x 3+4x )
a) Analytically,
Complete the code for;
b) Trapezoidal rule
c) Simpson's 3/8 rule
d) Boole's Rule
TABLE 19.2 closed integration formulas. The formulas are presented in the of Eq. 19,
Sothatthe weightingof the data pointsto estimatethe average height is apparent Thestep size is
given by h (b —a)/n.
3 3/8 tub
exact Integral
b) Trapezodial Rule:
clear all,• close all; clc;
Slower b—4; uppe r 1 imit
n- 700;
s3•b;
value: % num2str
value: % num2str ;
2h
k;= + 160
k, + 24 24
elc;
e',ose all;
y-o.i:
yo-I ;
+h/2*ki);
ih/2, ;
(kl+2'k2+2*k3+k4) 'h/6) ;
'
( T, Y, ,% Ytrue,
hold •a;
(2008)
and K. ?onnawnal
Ref: R. Ponaiagusamy
3) (30 pts) Accordingto given rod and ambient conditions, please complete the computer
codethat gives temperature profile of the rod with finite diference method.
L: 20m Ax-I m.
Cmv«tion r = 0.25m
k: 250 W/(m.K)
h: 2 W/(m2 K)
Tm=600K
To=300 K, T -400 K
hpr= 2*h/(r*k)
d2T
d.x2
"Withincreasingdistance,
our knowledgefades,
andfades rapidly...
Edwin
nto
by
OOF. te
-Tl_l + (2 + h' h' Ax2T
-To + (2 + - % = h'Ax2T
tor
-Ti + (2 + -T3 = h' Ax2Tu
T2 0 2 d 68 10 -T2 + (2 + h' Ax2)T3 -T, h'Ax2T
for :n-l
: : ) -m'A(i, :);
ond
for
end
ond
-1 h' AX2Too + TO
-1 2 + h'Ax2 -1
00
-1 2+h'Ax2 Tn-l
"Withincreasingdistance,
our knowledgefades, andfades
rapidly...