0% found this document useful (0 votes)
11 views5 pages

Assignment 04 - Numerical Computing II

The document outlines various numerical methods for solving differential equations, including Euler's method, modified Euler's method, and the Runge-Kutta method. It provides specific examples and calculations for each method, comparing approximate solutions with exact solutions. The results include error analysis for the different methods applied to various equations.

Uploaded by

Shaikh Firdous
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views5 pages

Assignment 04 - Numerical Computing II

The document outlines various numerical methods for solving differential equations, including Euler's method, modified Euler's method, and the Runge-Kutta method. It provides specific examples and calculations for each method, comparing approximate solutions with exact solutions. The results include error analysis for the different methods applied to various equations.

Uploaded by

Shaikh Firdous
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

PAGE Na,

DATE

3o/09/25
Assiqnm ent o4
Tuesday
Fuler's method wilh h 0 ta
1. Arlg
the solution oF
te
y': xt y
at X= 0, o-2, 0-3 05. CompoTe the
exact solutiom y(*)= 2e*-x-.

tuler's method formul 4nty yo bf(Xn)
IteyationS Exact Solution Ere
yo1

y,: 11 4,-11103

X, 0 2 y2-1.22 y2:1.242 Oc2?


Y3=| 362 Y31399 O037

y4=|5282 Y4:|58 3 O-0548

K7 =05 Ys=72 |0 2 Y51797

2. Use the odified fuler method with h: 0-2


to solve
y(o) =| for X02,040b

ynt1 yn th (f(«o,yn)+ f(*n+1o yn +hki))


2
tulers modfed ne

+(1+ol(t CS
2 02 9e =1 t o-2(1+ cos (0) +
2

- 1+0-2(2 + 21800)
2

- 1.418
PAGE No

DATE

Y2:4S+ 02 (2 3980+ 2 8186)


2

: 19396

y3-1-939Gt 0-2 (2-S6066t f(0'6,


2

25|17))

E1-9396t 02 (2 86066t333 70)


2

= 2559

USin the Run ge - Kuta method of oYder4 uith


:0 25 approximate Solution of
y'= xs+x3

for x=0 25 , 05

yo=1

X1-0-25 Y1 = | (K, + 2k2 t 2k3 + ky)

k,f(0, 1) = 0x0.25=o
o.03|72
k2 =hf(8,1) = 0-|264 x o-25 =
o-0322
K3 ht (/s, l-o158)= 0128 9x0 25:
ky hf (d25,-0322) - 0-2736 ixo 25
0-0684

094)
y,= (0+ 2(0-03 172) + 2(G-0322) t 0

EH(G"9624)= 1.0327
PAGE No,

DATE

X): 05 Y231 (k, +2k, +2k3 tk)

kË hf (o.25, 10327) :
: 0-2738X o 25
= 0:068 45
k2= hf(3/8,1-066) = 0"4528x 025
0-)32

ka: hf(3/8,1-0893) =0.46122


0|53

ky :hf( 1-148): 0-699xo 28


=0-1747

Y2-1-0321+ \ (0-6845 +2(0-1132)


6

2(0-|153)+O.747)

-1-0327+ 09366
: 1.252

4. Solve the Iv? y' -2y +e


uSing Euler Aod. fied tuler, and RK4 method
with h=05 to x=2
ex act:
up
tulers Method.
Yn
O5
O5 O5 O-3032
O3032 o-1s39
15 O1839 o[||5

odifed Euler Nethod

k y*
1 -1 -0.3934 O-6515

O-5 O6515 -06967 o-2729 -0-1779 o-433

1 o433 -0498lo85 -o 1447 O-2723


-0-32]4 16 -0-0878 O-117
15 0-2723

Ruge kutta 4 method.


K k ky
Yn -0-4302 -0-2664 O-60
-05 -6-3605
-01862 -0:2794 -01452 0-36
06087 -0-3725
C5
-o1323 -0"577 -0979
-o)832
0-3672
- 00807
-0-0807 -009635 o14
15 O-22 36 -0.j1 20
of TeSults
Compar150n
Ey Euler Ery Hod Euler Err RK4
)3 03333 O3333 0-3333
O-570O 007 O0815 O-0387
0-5
1 0-2579 00453 O751 0-\093
15 O-0598 0-(482 0 0995
0-05)6 00536 Q-0776
2 O-0634

You might also like