You are on page 1of 4

T.C.

DOKUZ EYLUL UNIVERSITY


MARITIME FACULTY
MARINE ENGINEERING DEPARTMENT

Name Student ID Due Date Time


B 9020051, 19.01.2022 75 min.
Course Code and Name Year —Term ExamT e
MEN 2053- Numerical Anal sis 2021-22. Fall Final
Learnin Outcomes 0 LOI L02 L03 L04 L05
Related Question Numbers 3 2 1

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;

for i —al: ...t:b2;

'Trapez Integral value: num2str (I)l);

'With increasing distance, our knowledge


fades, andfades rapidly.
Edwin HUBBLE
limit
*higher

s3•b;

value: % num2str

value: % num2str ;

(RK4)computer code of the solution of initialvalue


Runge.Kutta
from to t=2 is given in the following section where initial
".vtheinterval
the code for parallel proposed fifth order Runge-Kutta
complete
Pitease
togiventable with step size h=O.1.
PRF) accor&tng
PPRKF-RK5 Method:

2h
k;= + 160

k, + 24 24

=f(ti +TYi ++¯16 4


12
k6 = f (ti + h, Yi ¯ 14 31
92
442 %
17
UNIVERSITY
EYINL
FACULTY
MARITIME DEPARTMENT
ENGINEERING
MARINE

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

Inatrix solver (unct.ion -Ta + (2 + = h'Ax2T


ion B)

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...

You might also like