0 ratings 0% found this document useful (0 votes) 30 views 29 pages Numerical Methods Tailor Euler and Kutta
The document discusses numerical methods for solving initial value problems, particularly focusing on Taylor's series method for first-order differential equations. It provides examples of applying the method to approximate solutions at specific points and compares numerical results with analytical solutions. Additionally, it outlines the use of modified Euler's method for further approximations and emphasizes the importance of step sizes in calculations.
AI-enhanced title and description
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here .
Available Formats
Download as PDF or read online on Scribd
Go to previous items Go to next items
Save numerical methods tailor euler and kutta For Later Module - 1
a
Numerical Methods - 1 <
[aa] Numerical Solution of Ora;
Order and First Degree "#"Y Differentiay aie
” NS Of First
We have studied various analytical ( the
equations, applicable only to equations e7etieal) meth
equations arising out of many physical problose a”
some times analytical solation may not even eenes
degree of accuracy.
1.2] Numerical methods for initial value Problems
Consider a differential equation of first order and first degree in the §
n the forr
dy i initi Fe
a = f(x,y) with the initial condition ¥(%) = Yy thatis y = Yo at x=
This problem of finding y is called an initial value problem,
We discuss several numerical methods for come ay initial value problem
1.21] Taylor's series method
onsider the initial value problem : eee f(xy) and y (25) = 4g
he solution y (x) is approximated to a power series in (x — Xq) using Tay
ries. Then we can find the value of y for various values of x inthe neighbour
at
0° ,
lehave Taylor's series expansion of y(x) about the point x, in the form:
(=F = Salat
Y= y(%q) + (x-29) (XQ) + at Y ktade 39 (%)ENGINEERING MA THEMA Tig
¥
z
beets OU ay
.. denote the value of the derivatives yy’ ge’
Here y’(%), y"(%) +
data.
found by ma
WORKE!
king use of the
D PROBLEMS
x = 0.1, 02,03 considerits
at xp which can be
ig terns UPLO the
{ise Taylor’s series method to. find yat
dy _ 2+ and y(0)=1
third degree given that 7
PreloniGky/(=))J8 sven BY,
“Taylor's series exP
(x-%)
(2-%))
tx,) + (-%)¥ (70) + 2 — 9" (%q)* 31 9 (CH) Fo
B= 0, Yo= 1 Bet x toh
--@)
3
(x)= y(0)+xy"(O) + y”(0) + A (0)
Become y/(0), y” (0), y” (0).
yar sy i y(oy=8+ly(oyp=0+1=1
fing y’ wrt. x we have,
z wa2x+2yy’ i
+ y7(0) = (2)(0) + 2-y(0)-¥'(O) =(2)(1)1) =2
jating y” wart. x we have,
ee 2 yy WF
y” (0) =2+2[(1)(2)+ V1 =8
Substituting these valucs in (1) we have,
e x 3
: ee tio? ts *
ene ot
3
his is called as T:
ut x = aylor’s series approximati ;
0.1, 0.2, 0.3 in the same. eee the third degree and we need to
aecaliNOinetinine MATHEMATIO9
YOO TR waped 7
Differentiating (2 Wants x
¥'(Qeeyry * (2 ey? wo
Substituting the initial values and the value of wv’ (4) wehave,
0.05 [(2)(4) + OOS] % [42 w APY" Ca) @ 0
ie, 0.05 (8 + 0.05) + 20y"(4) 0
ie, 0.4025 + 20y” (4) & O
Sy" (4) = -0.020125
We observe that the value of the derivatives are small enough and the third degre
ie la also be neglected. Substituting these values in (1 ) for computing y (4.1
or yh) i © 108
(ata)?
&
¥ (AL) = 44 (41-4) (005) + (+ 0.020125 )
Thus) y(41) = 40049
isnt
6. Use Taylor's series method tosolve y’ = x° + y in the range 0.€ x € 0.2 by takin,
step size h = 0.1 given that y = 10 at x = 0 initially considering terms upto th
fourth degree .
>> In this problem, since the step size is specified as 0.1, the problem has to be don
‘in two stages. We have to first find: y( 0.1) and use this as the initial condition t
compute y (0.2).
‘Taylor's series expansion is given by
Cx =X -
Y(XY = YC XQ) + (em ay IY" Ody) FE gag)
(=a)? (x=xy)"
oo fie Age yada: +f
ot
TStage: By data y’ = x7 + y, x = 0, yy = 10
y'(0)=0 +10=10 or y’(0)= 10
Differentiating y’ w.r.t.x successively we have;
y"s&wry’ i 9 (O) = (2)(0) + y’ (0) = 0 + 10 = 10
y”=2+y” rf yy” (O)=2+y"(0) = 24 = 12
ve = 3” p y""(O) = 12
meean
We OF ey
HOR) = 910) © Org -4o, , CHI?
-
w7tey
oy Cf
ofr, (oy Ey oy
= 10 + (02510 , OF ones
we 09 + OM aay i
The 900.2) = 11.05205 ~ a1.055
Stage : Now taking % = 04
wreway
* Mg = 11082 we have
y'(O1) = (O17 + 1082) = Thee
° >
y°ewey” sy (o1y = 2¢01)+11082 = 1882
eT ese” 3 y™ (62) = 24 1198 = 19.262
grease cy tea) = 13292
With x = 0.2 and x) = 0.1, (1) becomes
(02) = y(01) + (01)y’ taths 2 Oty” (01)
anes 3 0.0001
+ y” (01) + 2A
y” (OL)
t ).0001
= 11.0524 (0.1) (11.062) + 924 (11.262) + 9001 (13.262) + oe (13.262
y(0.2) = 12.216776 = 12.2168
Employ Taylor's series method to find y at x = 0,3uil 0:2 correc to four place teat
in step size of 0.1 given the linear differential equation — 2y = 3e* whose solution
passes through the origin. Also find y (0.1) and <2 ty enka onl
By data, y’ = 2y+3e* and y(0) = 0. That is x) = 0 Yo = _
or’s series expansion is given by :
Ke
(opts 20)¥" (yes eaan:
gn), .tep-1: We shall compute y (0.1)
Eato)+ae = 2
Consider = 2y+3e y/(0)
Rey erg, y7coyts m2 (aes ="
y= 2y"43e yo) = 2(9)+3 = 21
From (1) we have,
Bicep cory'coy2 S022 cor! age)
by considering terms upto third degree. Further we have
y(01) = 0+(01)3+2% (99+ (21)
Thus (0.1) = 0.3485
Step -2: We shall compute y (0.2)
Consider y” = 2y+3e* and let eae Yo = 0.3485
Now y’(0.1) = 2y(0.1)+3e"" y/ (0.1) = 4.0125
y= 2y'43e
y7(O1) = 2(4.0125) +32" ad
y” m= Dy 4 BE 5 y (OL) = 211.3405) + 3-27 5 G0) Jando
We have from (1)
aaa y (01)
y(02) = y(01)+(0.1) y’ (01) +o y’ (0.1)
yee) = o2sss (01) cooizs) +92 (x13400)+9 2" (25.9965 )
Thus (0.2) = 0.8108
Solution by analytical method
ad 2y = 3" is of the form 2 py =Q where =O = sen
olution : yelPax = foclPa dxte
go ?* = fae o* dee
ca =-3ée*+c or
y = -3e*+ce** is the general solution.a
AUMERICAL METHODS sy
Applying the condition y (4 ) ye
ee
the genet solition Vecomen
Ge-Ste w@ cag
Qe
yes(eMoory y he betting scan
Thus yCO.1) = 0.3487 ang ;
(02) 80.143 By the analytiest method,
I Taylor's series
& erie figure if Y eatiapeeetath ihe valives of y ab x = 0.1 (0.1) 03 to four
y = lwhenx = 0 taking the fist five ert Ye =—~xy given that y’ = 05 and
Taylor's series expansion.
=> Taylor's series expansion is Biven by
“ ee gl 2 %OP
TERY = y (39) + (x35) y (x) # a 9” Cx) -- - OD
Gydaa, y= ay Mecc, . oo. ecyeus,
Consider. -y” = ~xy
% CO) =0
t Gy say
YO =-xy"-2yr
y” =axy’-y
poy 2-1
Fromy.(1), fhe 'first five terms of the Taylor’s Series expansion is given by
a ee ee hy 6
Pavey (0)+xy/(0)+5, w"one & ercnss, JPM
Now, g(01)
00D — 0.0001
1+ (01) (05)-222 ., 20004 = 1.0498
, 0.008 _ 0.0016
y(02) - = 14(02) (05)=°%8 « laa roe oo
0.027
g(03) =
1+(0.3) CO
Y(O1) = 1.0498, y(0.2) = 1.0986, y(03) = 11452IRICAL_ METHODS «
1 h
WY = ¥ +3 [Fox
‘OY Mg) EE viOy|
HW 9a [Mo Ws seep] ,
yf ay * : [Fx 4%) * Fay?)
Biles corected values’ eproy aon i tier san she preceding onan, They eo
‘called as Euler’s predictor and COMO Re Euler's formula jointly are also
1ulae.
WORKED PROBLEMS
a ¥v 1
. Meret ye ys
eC a x’ ¥ = 2 ate = 1, find the approximate value of y atx = 14 by
taking step size h =0.2 applyin: i
ne 5; 8 Modified Euler's method. Also find the value of y at
x= 12and1.4 from the analytical Solution of the equation. a i
>> The problem has to be worked in two stages.
SEBS PX = WY = 2) F(a PS 1 4 yxy WS 02
ap 3 sp y= 1.2, y(%q) = y, =y(12) =?
Now, - f(%y¥9) = 1 + (2/1) =3
We have Euler’s formula : y{) = Yo + hf (xy Yo) =.)
yf = 2 + (02)(3) = 26
Further we have modified Euler’s formula:
h 0 :
YEP = + 5 [Fo Hp) + ovyt »| “3
= 2+ (01) [3 #¢1 + ¥6x,)}
= 2+ (01) [4+ y121
=2+(01) [4+2.6/1.2]
2h:
t. yf) = 2.6167 4
ie
ae ‘ i
Nextapproximation yi? is got just by replacing the value of y;
ie
1) in place of y{°
Now, yy ant (0.2) 4 + 2.6167/1.2] = 2.6181
xENGINEERING’ Kay
. 3
Cea gf e24-002)q8 + 2G18171.2} =(2.6182. Also {4
Thus y (1.2) 2x7
WStage: We repe,
= Zig,
‘at the process by taking-y (1.2) = 2.6182 as thé initial cond
% = 1.2, yy = 26182 ; F(%y¥p) = 1 + (Yp/%p) = 3.1818
5 XN the 14, y(%) =y =y(4) =?
We have from (1),
yf) = 2.6182 4 (0.2) (3.1818) = 3.2546
Now from (2),
yf? = 2.6182 + (01) [3.1818 + (4 ¥{7/*,)]
Hy yt) = 2.6182 + (0,1) [4.1818 + 3.2546/1.4 ] = 3.2689
Y = 2°6182 + (0.1) [4.1818 + 3:268971.4] = 3.2699
Hf) = 26182 + (0.1) [4.1818 + 3:2699/1.4] = 3269
Thus y(14) = 32599 = 6:27
Now, let us find the analytical solution of the equation <
This is a linear DE of fhe form ee + Py = Q whose solution is givenby
ye SP > Jae fax detec
Here, P=-1/x andQ=1
3 pfPae . fue as. ploge _ 1eB® = 17y
Thesolution becomes, y-1/x = fut ax to
\ & ¥/x = logx +o.
_ Applying the initial condition hat ¥=2 atx =1 wehave,
Wl=logitc «+ c=2 since log1 = 0
‘Thesolution now becomes,
\ Wx = logx + 2 oF y =x (logx + 2)
‘This is the analytical solution of the given initial value problem.INUMERIOAL METHODI 1
——— - ee
Now by putting «e120 and 1dwe obtain,
VCA2) #12 Clog, 1.2 42) = 26188 vila) 1A (log, VA #2) @ S271
Solutions are labulated for comparisons se
Solution ified By analytical |
v0) ‘es mvethod method \
y (a) 2.0182 2.0186 \
‘ wv (ha) 4.2099 B27 )
——_— ——— — :
Or Using modified Buler's method find y at x» 02 given a = on oy with
y(O)@ 1 taking He 0.1, Perform three ierations at each step,
o> We nved.to find y (0.2) by taking, I 0.1,
‘This implies that the problem has to be done in two stages.
LStage : By data xy = 0, yo = Uhm Ol, f(xy) Ox + (y/2)
F(X Yo) B05, x, =X +h = O4
yx) yy By (01) =?
From Euler's formula: yg? = ¥y + Hf (%y Vo) we obtain
yf) = 1 + (0.1) (0.5) = 1.05
We have modified Euler's formula,
gf?) ey + 3 [ £090) + Fy) | (first iteration)
(0)
ae
c
‘ (0)
= 1+ 0,05 | 0.5 + 3(0.1) + a
OA
ett. 0.5: + 3x, +
gf?
=1+ 0,05 08+
Be, ye 4.0.05 |os + eh. 1,06625:
‘The second iterative value is got simply by replacing, uf (0) by 7m
Thatis by replacing 1.06625 in place of 1.05Q 5
wy? = 1+ 0.05 | 08 4 106628 | = 1.0667
, yf) = 1 + 0.05 [os ' 1966 | = 1.0667
Thus y (0.1) = 1.0667
M Stage: Now, let x = 0.1, yp = 1.0667
We have f(x,y) = 3x + (y/2)
x Flap, yg) = 3(0.1) + 29 = 0.83308
say th = 02; y, =¥ (4) = y(02) =?
1
From Euler's formula we obtain
yf) = 1.0667 + 0.1 ( 0.83335) = 1.15
Next, from modified Euler’s formula,
y, (0)
0.1 t
1 eel
yf") = 1.0667 + > | 0.83335 + 9x, + 5
(0)
1
1.0667 + 0.05 | 0.83335 + 3(0.2) + -]
ed)
1.0667 + 0.05 | 1.43335 + a5. |e 1.1671
1.1671
1.0667 + 0.05 | 1.43335 + a = 1.1675
"
tae
wl
1.1675
yf?) = 1.0667 + 0.05 [sao + | = 1.1676
Thus (0.2) = 1.1676
11. Using modified Euler’s method find y (0.2) correct to four decimal places solving
a
equation A =x-yy(0) =1 taking h = 01
>> We shall first compute y (0.1) and use this value to compute y (0.2)
Stage: By data x= 0, yy =1,h=01, f(xy)=x-¥
fl%y Yo) = 0-7 =-1, x, =x th = 01
¥(4) =y, =y(01) =?ie ENGINEERING Marie
P ( Ay
ing modified Euler's method find y( 20.2) and y (20,4) Siven that
= logig (:] with y(20) = 5 taking h = 0.2
dx
>> We shall first compute y (20.2) and use this value to compute ¥(204
)
TStage: By data x) = 20, yy = 5 and h = 0.2
x
f(%y) =Iogig Zl 7 £%q Yo) = l0gi9(4) = 0.6021
x, +h = 20.2; ¥(%,) = y= y (20.2) =?
1
From Euler's formula: y{°) = y+ h(x yy) we obtain
yf =5 + (0.2) (0.6020) = 5.1204
Next by modified Euler’s formula
UP =¥%9 + 5 [Flap + Fay HO |
v3 | waar (5 |
wy
: 6 5 +01 [om tg 22,|] «52198
(125 +01 | cam « tg (202,)] - 5.1198
I 9 (202) = 5.1198
Stage > Now,leb x, = 202; yy = S119
f(y) = login (:) i f(%y¥q) = C596D
X= %y FH= 204, Y(%,) = yy =Y( 204) =?
Substituting in the Euler's formala,
. GL) = 5.1198 + (0.2) (0.5961NUMERICAL METHODS «1
Now by modified Buler’s formula,
02
yi) = 5.1198 + 0.5961 + logy
|
= 5.1198 + 0.1 | 05961 + logi9 (2s) i = 5.2384
5.1198 + 0.1 [ 03961 + logig am Zan | = 5.2385
Thus y (20.4) = 5.2385
ye
AS Use modified Euter’s method to solve “= x + | Vy | inthe ranged > Weneed to compute (0.2) and y¥(04) with h = 0.2
TStage: By datax) = 0, y= 1, f(x,y) =x+ Vy, h=02
where the modulus sign indicates that we have to take only the positive value of Vy.
f(%y¥) = 04+ Vi = x1 =x) +h = 02
y¥(q) = ¥ = (02) =
From Euler's formula: y{°) = y, + hf(xy yg) we obtain
yf =14+02(1) =12
Wehave modified Euler's formula,
| yf = y+ 2 [Feo m) +9)
0.2
: 1+ y [teat 4]
1 +01 [1+ 02+ V1.2] = 1.2295
yf?) = 1+ 0.1 [1.2 + ¥1.2295] = 1.2309
yf?) =1 + 0.1 [1.2 + ¥12309] = 1.2309
Thus y(0.2) = 1.2309
UW Stage: Now let X%q = 0.2, yg = 1.2309
flay) =x + Vy 5 f(xy yp) = 02 + V12309 = 1.3095ENGINEERING tany
xy 2c te THEA,
“XH +heo4 v(x "Vi *y(04) =?
0 4, x) |
’ 1 174 {
Substituting in the Buler’s formula.
yf
My = 1.2309 + 0.2 (1.3095 ) = 1.4928
Next from Modified Euler’s formula,
a) 0.2
y = 12508 + | 13085 + 2, + 4}
1.2309 + 0.1 [1.3095 + 0.4 + Vi4928 | = 1.524
(2).
My" = 1.2309 + 0.1 [1.7095 + i524] ano
(3) _ .
My” = 1.2309 + 0.1 [1.7095 + 1.5253 | = 15254
Also y{4) = 1.5954
Thus y(0.4) = 15254
a
44. Use modified Euler’s method to compute y(0.1) given that = i
y(0) =1 by taking h = 0.05 considering the accuracy upto two approximati
each step .
>> We need to compute y (0.05) first and use this value to compute y (0.1).
TStage: By datax, = 0, yy) =1, f(xy) =x +y,h = 0.05
fl%y Yo) = 0 +1 =1, x, =x) +h = 0.05
y(x,) = y, = y(0.05) =?
From Euler's formula: y{°) = yy + hf (xj ¥q) we obtain
yf?) = 1+ (0.05) (1) = 1.05
Next by modified Euler's formula,
h
WP = % +5 [fay ¥) +fayy)|
Bat [trata]
= 1+ 0.025 [1 + (0.05)? + 1.05]
= 14981 nn 4 1AR1 — 4 ne1aNUMERYOAL METHODS «1 19
= ee —_
2)
yi?) = 1 + 0.028 [1.0028 4 1.0513) * 1.0513
Thus (0.08) = 1.0818
MWStage: Nov, let Xp = 0.05, yo = 1.0513
FOGY) =F 4 5 F%q Yo) = (0.05)? + 1.0513 = 1.0538
y= Xy th = OL, yxy) = yy = (01) =?
Substituting in the Euler's formula,
yf = 1.0513 + 0.05 (1.0538) = 1,104
Next from the modified Euler's formula,
0.05
yD = 1.0513 + al 0538 + x3 + yi
1.0513 + 0.025 [ 1.0538 + (0.1)? + 1.104]
1.0513 + 0,025 [ 1.0638 + 1.104] = 1.1055
i
y{?) = 1.0513 + 0.025 [ 1.0638 + 1.1055] = 1.1055
Thus the required y (0.1) = 1.1055
d
15. Using Euler’s predictor and corrector formulae solve ea = x+y at x = 0.2 giv
that y(0) = 1.
>> Weneed to compute y (0.2) and since the step size isnot specified we shall t
it to be 0.2 itself.
By data we have, x) = 0, y= 1, f(sy)=x+y and h = 0.2 (assumed)
Fl%y¥) =O+1 a1 x =x +h=02
y (x4) = y, = (0.2) = i
We have Euler’s formula (predictor formula)
yf) = yp + hf(Xy Yo) = 1+ (0.2)1 = 12
Next consider modified Euler’s formula (corrector formula)ENGINEERING MA THE MA,
Se
E (0)
)
hn yo) + LCV
f% %0
y= y+ 2 :
0
O2[ 44x, + yf ]
e1+2| |
1+ 0101 + 0.2 + (1.2)) = 1.24
(2) 21401 (2+ (1.24)] = 1.244
a
(3) 21401 [12+ 4,244] = 1.2444
1
yf) =1+ 01 [12 + 1.2444] = 1.24444
1
‘Thus the required y(0.2) = 1.2444
Remark : Ifwe had worked the problem in two stages ( Taking h = 0.1) we would har
got ia accurate answer. It may be noted that lesser is the step size, greater is the accun
and corrector formula compute y(1.1) correct to five deci
G6) using Euler's predictor °
WY - © and y = 1 at x = 1. Also find the analytical solut
places given that rar
eye ly dy _ Inxy
> ey 2 Peo, pe
Wehave f(x, y) = —>* i X= 1, Y= 1. Letustake h = 0.1
F(%- Yo) = 9, X, = xXyth=11
904) =% = y(11) =?
?rom Euler’s formula : De = Yothf(%, Yo), we obtain ae aon
Ve have modified Euler’s formula,
0 h
HO = ¥o43 [501 Yo) + Fl, 4]
Ona ee 4
pepe 100METHODS «1
2
1=1.1(.0,995
vO) = 140.05 % et = 0.99605
3 114 (0.99605
y§® = 140.08 | + eat | = avn
¥(L1) = 0.99605
lytical Solution
Ri a
: +t = 8 of the form ant Py = Q where P = 1/x and Q = 1/2
ose solution is given by
y efPax . Jelrae dx +c
eJPax _ efl/x dx _ ea
Solution : y-x = So dx +e
1 xy = logxte. Using y(1)=1, 1=logite « c=1.
befitting solution isx y = logx+1 or y = 28*+1
x
log (1.1) +1
low y(t) = SBCA*2 _ 9.99574
us y(11) = 0.99574 isthe analytical solution.
[1.23] Runge - Kutta method of fourth order
onsider the initial value problem w = £(%Y),¥ (%) = Yo. Weneed to find
¥(% + ) where It is the step size.
le have to first compute k,, k,, k,, ky by the following formulae.
ky =hf(Xq, Yo)
h ua
k, =hf Xp For Vg t
h i
k, = hf % + 57M ta
ky = hf (% +h, yy + ky)
1
le required y(Xq +h) = yo + G Oh + ky + 2k, + ky)lultiplying with e”? we obtain, y = = 6x - 12 + ce?
1=0-R+e . c= 13
The analytical solution of the initial value problem is given by,
y =-6x - 12 + 13e*”?
Now by putting x = 0.2 wehave
y(0.2) = -—6(0.2) —12 + 136%! = 11672219
Thus (0.2) = 11672219, by analytical method.
F d
18. Use fourth order Runge-Kutta method to solve (x + y) eA
x = 0.5 correct to four decimal places .
Applying the initial condition that y = 1 at x = 0. the solution becomes ,
=1, y(04) =1 at
> Wehave = = and y=1 atx =04 5G + 8°4
_—— = = 05) =? as
ey) ay Xq = 04, Yo = 1- yC
Here Xyth=05 &. = 05 — Xp 05 -04=01
We shall first compute ky, ky ky ky
4B
k, =f (%9- Yo) = (0.1) f(04,1)= ona is i|- 0.0714
h 4) Ode eect
k= hf | a+ Fo Od WE 2
"1
E
= 0.0674
es ie + raw)
Uh =hf (x +h, Yo + ky ) = 1) f( 05, 1.0674)
= 0.0638
1
ky = (04) F045, 1.0387) = (01) (peer
0.0714 )
= 0.0673
= (0.1) f(0.45, 1.03365 )24 ENGINEERING MATHp,
EM,
‘
1
We have, y(x +) =% + e (ky + 2k, + 2k, + ky)
6 4
) + 0.0638 |
y(0.5)=1+ 5 [0074 + 2( 0.0673) + 2 (0.0674
Thus (0.5) = 1.0674
fs) Using Runge-Kutta method of fourth order,
dy _y-x ,
Benge (OD) 2 Poking = 0.2
find y (02) for the cqug
>> Bydata f(xy) = To, x % = 0, Y= 1, k= 02
We shall first compute k,, ky, ky, ky-
i 1-0
er aca y= (02) f(0. 1) = on | 55] 2
B h i
kK=hfl%+5, +a) = (0.2) f (0.1, 1.1)
11-01
= (0.2)] ~—~ | = 0.1667
ie oa) 75 + nl
, = as ( + 2 Yt eI. (0.2) f (0.1, 1.0835 )
1.0835 - 0.1
= (0.2) | 29832 =O | os
bs Bare var | cee
kK =hf(%y+h +k)= (0.2) f( 0.2, 1.1662 )
1.1662 ~ 0.2
k, = (0.2) Nae 7 al = 0.1414
Wehave, y(% +h) = Yp +2 (ky + 2ky +2ky +hy)
1
(02) =1+ < [02 + 2(0.1667) +2 (0.1662) + 0.1414 |
Thus y (0.2) = 1.1679cc
25
sree wb
& Use fourth order Runge-Kutta method to find y atx = 0.4
4 > given that
ax 7 + 2, ¥(0) = 0 and hw O41
>> By data, f(x, y) = 3e* + 2y, Zo
“Y= 90, h=01
We shall first compute kj, ky ky ky.
ky = AF(%y Yo) = (0.1) F(0,0) = (0.1), 3 + 2x0] = 03
hk k.
k ah = 2
2 sl ree a } = (0.1) f( 0.05, 0.15)
1
ky = (0.1) [3e° + 2(0.15)] = 0.3454
- h k,
kg = hf (+ 75: Yo 2) = (0.1) f( 0.05, 0.1727)
ky = (0.1) [3e> + 2(0.1727)] = 0.3499
ky = Hf (% + ht, Yo + ky) = (01) F (01, 0.3499)
ky = (0.1) [3297 + 2( 0.3499) ] = 0.4015
1
Wehave, y(% +h) = Yo + 6 (ky, + 2k, + 2k + ky)
1
y(O1)=045 [03 + 2( 0.3454) + 2(0.3499) + 0.4015 |
Thus y(0.1) = 0.3487
21. Use fourth order Runge-Kutta method to compute y(1.1) given that
y(1)=1
>> By data f(x,y) = xy, x= Ly =1
We need to compute y(1.1). This implies that x9 h=01
+h=il
We shall first compute ky, ky ky kg-
k, = hf(%y Yo)
ky = (OL)f(1A) = (01) LAI ANA] = 04NUMERICAL METHODS «)
i
ae —___n
k= (01 r ,
“a FOAM, 2.91428) = CO) (2011) 2.91425 |
Ky = =0.071425
We have, 1
YO +h) = yy 4 6 MH ah 2hy + ky)
1
v1) = 34 ra | O.1 + 2(~0.085) + 2( = 0.08975) ~ O.o71425
Thus y(1.1) = 2.9145125 ~ 2.9145
23. Using Runge-kutta method of fourth order find y (0.2) for the equation ML « Y=
dx” ysx’
y(0)=1 taking h = 0.1
>> The problem has to be done in two stages.
=x
T Stage: f(x,y) =, x = 0, ¥=1, h=01
We shall first compute ky, k,, ky, ky.
k, = hf (x, Yo) = (0.1) f(01) = cory | 9] = oa
h ky
k= as{ayet. wt | = (0.1) f(0.05, 1.05)
1.05 - 0.05
Ol) [ a pe
h U7
is as [spe ye] = (0.1) f (0.05, 1.0455)
1.0455 — 0.05
sien) [ fe bE once
ky = hf (xg +, York) = (0.1) f(01, 1.0909)
1.0909 - 0.1
e BOeO2 DH 9 0832
|
1
Wehave, y(%)+h) = Yrs (ky + 2ky + 2ky + ky)
y(01) = 142 (01 + 0,182 + 0.1818 + 0.0832 )
Thus (0.1) = 1.091167 = 1.0912ey Ma
=X yxy = 01 Yo = 1.0912, » 9 ty
oe a
ye ver
chine formulae for ky, ky, ky, 5
using the
ut 4 We have,
= (0.1) (Ot, 1.0912) = (0-1) [i 12-04
1.0912+0.1 | = 0.0435
ke (0.1) £0.15, 1.1328 ) = 0.0766
aes = (0.1) f(0.15, 1.1295) = 0.07655
ky = (0.1) f(0.2, 1.16775 ) = 0.07075
J
y(%th) = YotE (k + 2ky + 2k, +k, )
1
y(O1+0.1) = 1.0912 +5 ( 0.0832 + 0.1532 + 0.1531 + 0.07075
Thus y(0.2) = 1.167908 ~ 1.1679
- Remark: Referring to Problem-19, the problem has been wo}
and we have obtained y (0.2) = 1.1679
rked in one stage yi,
7
D4 Solve: (7-2) ax = (F422) dy for x = 0(0.2) 04 given thy
‘x = 0 initially, by applying Runge - Kutta method of order 4. 7
ae
we Webave =H 29-040 ~ V-
¢ ae hall
IStage: f(x, Y= 72 fe shall compute k,, ky, ky, ky.
Peeycag, 3) = (02) F(9. 1) = (02)1 = 02
ae
y= uifaort. Ps = (02) f(O1, 11) = 0.1967
h k
k= asf sor. oa = (0.2) f(0.1, 1.0984) = 0.1967
kg = hf (xt, yotks) = (0.2) f(0.2, 1.1967) = 0.1891
i
We have, y(%) +h) = YotE (ky +2ky +2ky thy)
Thus y(0.2) = 1.19598 ~ 1.196