SlideShare a Scribd company logo
Numerical solution of ordinary and
partial dierential Equations
Module 10: Second order equations
Dr.rer.nat. Narni Nageswara Rao
Ā£
August 2011
1 Second Order Equations
Many dierential equations which appear in practice are systems of the sec-
ond order
y
HH
= f(t; y; y
H
); y(t0) = y0; y
H
(t0) = y
H
0 t0 t b (1)
This is mainly due to the fact that the forces are proportional to acceleration.
i.e, to second derivatives. The equation (1) can be transformed into a
rst
order dierential equation of doubled dimension by considering the vector
(y; yH
) as the new variable.
y
yH
!H
=
yH
f(t; y; yH
)
!
y(t0) = y0; (2)
y
H
(t0) = y
H
0
In order to solve (1) numerically, one can for instance apply a Taylor series
method or Runge-Kutta method.
Ā£nnrao maths@yahoo.co.in
1
1.1 Taylor series method of order p
We write the Taylor series method to
nd yj+1 and yH
j+1 as
yj+1 = yj + hy
H
j +
h2
2!
y
HH
j + Ā”Ā”Ā”+
hp
p!
y
(p)
j
y
H
j+1 = y
H
j + hy
HH
j + Ā”Ā”Ā”+
hp
p!
y
(p+1)
j ; j = 0; 1; Ā”Ā”Ā” ; N Ā 1 (3)
The truncation error is y(hp+1
) in both yj+1 and yH
j+1.
The hider order derivatives are calculated as follows:
y
HH
j = f(tj; yj; y
H
j) = fj
y
HHH
j = (ft + y
H
fy + ffy0 )j
=

@
@t
+ y
H @
@y
+ f
@
@yH

fj
= Dfj
y
iv
j = [ftt + (y
H
)2
fyy + f
2
fy0
y0 + 2y
H
fty + 2ffty0
+2y
H
ffyy0 + f
H
y(ft + y
H
fy + ffy0 + ffy]j
= D
2
fj + (fy0 )jDfj + fj(fy)j
where D =
@
@t
+ y
H
j
@
@y
+ fj
@
@yH
and D
2
= D(D) (4)
) yj+1 = yj + hy
H
j +
h2
2
fj +
h3
6
Dfj +
h4
24
Ā¢
D
2
fj + (fy0 )j + fj(fy)j
Ā£
+ Ā”Ā”Ā”
y
H
j+1 = y
H
j + hfj +
h2
2
Dfj +
h3
6
Ā¢
D
2
fj + (fy0 )jDfj + fj(fy)j
Ā£
+ Ā”Ā”Ā” (5)
1.2 Runge-Kutta methods
For the second order initial value problem (1), we de
ne the method as
yj+1 = yj + hy
H
j + W1K1 + W2K2
y
H
j+1 = y
H
j +
1
h
(W
Ā£
1 K1 + W
Ā£
2 K2) (6)
K1 =
h2
2!
f(tj; yj; y
H
j)
K2 =
h2
2!
f

tj + c2h; yj + c2hy
H
j + a21K1; y
H
j +
1
h
b21K1

2
where c2, a21,b21,W1,W2,W Ā£
1 ,W Ā£
2 are arbitrary constants to be determined.
Note that b21K1=h is an y(h) term, in the argument of f in K2. Because of
the de
nition of K1, we choose b21 = 2c2. Expanding K1 and K2 in Taylor
series about tj, we get
K1 =
h2
2
fj
K2 =
h2
2
fj + hc2Dfj +
h2
2
Ā 
c
2
2D
2
fj + a21fjfy
Ā”
+ Ā”Ā”Ā”
!
where D and D2
are as de
ned in (4).
Substituting in (6), we obtain
yj+1 = yj + hy
H
j +
h2
2
(W1 + W2)fj +
h3
2
c2W2Dfj +
h4
4
Ā 
W2c
2
2D
2
fj
+W2a21fjfy) + y(h
5
)
y
H
j+1 = y
H
j +
h
2
(W
Ā£
1 + W
Ā£
2 )fj +
h2
2
c2W
Ā£
2 Dfj +
h3
4
Ā 
W
Ā£
2 c
2
2D
2
fj
+ W
Ā£
2 a21fjfy) + y(h
4
) (7)
Comparing (7) with (3), we get
W1 + W2 = 1; W
Ā£
1 + W
Ā£
2 = 2
c2W2 =
1
3
; c2W
Ā£
2 = 1 (8)
The coecient of h4
in yj+1 and of h3
in yH
j+1 of equation (7) will not match
with the corresponding coecients in (3) for any choice of c2, a21,W2 and
W Ā£
2 . Therefore,the error is y(h4
) in yj+1 and o(h3
) in yH
j+1. We have four
equations to determine the six parameters c2, a21,W1,W2,W Ā£
1 ,W Ā£
2 . Choose
c2 = 2
3
and a21 = c2. Then, we obtain from (8)
W1 = W2 =
1
2
; c2 = a21 =
2
3
; b21 =
4
3
; W
Ā£
1 =
1
2
; W
Ā£
2 =
3
2
Thus, the Runge-Kutta method (6) becomes
yj+1 = yj + hy
H
j +
1
2
(K1 + K2)
y
H
j+1 = y
H
j +
1
2h
(K1 + 3K2) (9)
K1 =
h2
2
f(tj; yj; y
H
j)
K2 =
h2
2
f

tj +
2
3
h; yj +
2
3
hy
H
j +
2
3
K1; y
H
j +
4
3h
K1

3
If we use four evaluations of f, then we get the following Runge-Kutta
method.
yj+1 = yj + hy
H
j +
1
2
(K1 + K2 + K3)
y
H
j+1 = y
H
j +
1
3h
(K1 + 2K2 + 2K3 + K4) (10)
K1 =
h2
2
f(tj; yj; y
H
j)
K2 =
h2
2
f

tj +
h
2
; yj +
h
2
y
H
j +
1
4
K1; y
H
j +
K1
h

K3 =
h2
2
f

tj +
h
2
; yj +
h
2
y
H
j +
1
4
K1; y
H
j +
1
h
K2

K4 =
h2
2
f

tj + h; yj + hy
H
j + K3; y
H
j +
2
h
K3

The error is y(h5
) in yj+1 and y(h4
) in yH
j+1
1.3 Special second order equations
Now, let the function f be independent of yH
. Thus the equation yHH
= f(t; y)
is called the special second order equation. The initial value problem becomes
y
HH
= f(t; y); t0 t b
y(t0) = y0; y
H
(t0) = y
H
0 (11)
Consider the Runge-Kutta method (6) using 2 evaluations of f. Since fy0 = 0,
we have from (4)
y
iv
j = D
2
fj + fj(fy)j
where D = @
@t + yH
j
@
@y and D2
is suitably de
ned.
) it is possible to compare y(h3
) terms in yH
j+1 and yH
(tj+1). Comparing
y(h3
) terms in (7) and (3) we get two more equations, besides the four
equations in (8). We now have the equations
W1+W2 = 1; c2W2 =
1
3
; c
2
2W
Ā£
2 =
2
3
; a21W
Ā£
2 =
2
3
; W
Ā£
1 +W
Ā£
2 = 2; c2W
Ā£
2 = 1
This system uniquely determines the six parameters. The solution is
c2 =
2
3
; a21 = c
2
2 =
4
9
; W1 =
1
2
; W2 =
1
2
; W
Ā£
1 =
1
2
; W
Ā£
2 =
3
2
4

More Related Content

What's hot

Chap 4 complex numbers focus exam ace
Chap 4 complex numbers focus exam aceChap 4 complex numbers focus exam ace
Chap 4 complex numbers focus exam ace
SMK Tengku Intan Zaharah
Ā 
Chapter 2 sequencess and series
Chapter 2 sequencess and seriesChapter 2 sequencess and series
Chapter 2 sequencess and series
SMK Tengku Intan Zaharah
Ā 
Ejercicios varios de algebra widmar aguilar
Ejercicios varios de  algebra   widmar aguilarEjercicios varios de  algebra   widmar aguilar
Ejercicios varios de algebra widmar aguilar
Widmar Aguilar Gonzalez
Ā 
Ejercicios prueba de algebra de la UTN- widmar aguilar
Ejercicios prueba de algebra de la UTN-  widmar aguilarEjercicios prueba de algebra de la UTN-  widmar aguilar
Ejercicios prueba de algebra de la UTN- widmar aguilar
Widmar Aguilar Gonzalez
Ā 
1. ct 1 (paper-1) 10 aug 2014
1. ct 1 (paper-1) 10 aug 20141. ct 1 (paper-1) 10 aug 2014
1. ct 1 (paper-1) 10 aug 2014
shikha112
Ā 
Hosoya polynomial, wiener and hyper wiener indices of some regular graphs
Hosoya polynomial, wiener and hyper wiener indices of some regular graphsHosoya polynomial, wiener and hyper wiener indices of some regular graphs
Hosoya polynomial, wiener and hyper wiener indices of some regular graphs
ieijjournal
Ā 
On The Homogeneous Biquadratic Equation with 5 Unknowns
On The Homogeneous Biquadratic Equation with 5 UnknownsOn The Homogeneous Biquadratic Equation with 5 Unknowns
On The Homogeneous Biquadratic Equation with 5 Unknowns
IJSRD
Ā 
Introduction to Bayesian Inference
Introduction to Bayesian InferenceIntroduction to Bayesian Inference
Introduction to Bayesian InferencePeter Chapman
Ā 
C142530
C142530C142530
C142530
IJRES Journal
Ā 
Product analysis formulas: The catalan numbers and its relation with the prod...
Product analysis formulas: The catalan numbers and its relation with the prod...Product analysis formulas: The catalan numbers and its relation with the prod...
Product analysis formulas: The catalan numbers and its relation with the prod...
Carlos LĆ³pez
Ā 
Para mayra
Para mayraPara mayra
Para mayra
shulacerrato
Ā 
1105 ch 11 day 5
1105 ch 11 day 51105 ch 11 day 5
1105 ch 11 day 5festivalelmo
Ā 
Explicit upper bound for the function of sum of divisors
Explicit upper bound for the function of sum of divisorsExplicit upper bound for the function of sum of divisors
Explicit upper bound for the function of sum of divisorsAlexander Decker
Ā 
Leidy rivadeneira deber_1
Leidy rivadeneira deber_1Leidy rivadeneira deber_1
Leidy rivadeneira deber_1
L.R. Rivadeneira
Ā 
Chapter 6 algebraic expressions iii
Chapter 6   algebraic expressions iiiChapter 6   algebraic expressions iii
Chapter 6 algebraic expressions iii
Khusaini Majid
Ā 

What's hot (19)

Chap 4 complex numbers focus exam ace
Chap 4 complex numbers focus exam aceChap 4 complex numbers focus exam ace
Chap 4 complex numbers focus exam ace
Ā 
Chapter 2 sequencess and series
Chapter 2 sequencess and seriesChapter 2 sequencess and series
Chapter 2 sequencess and series
Ā 
Ejercicios varios de algebra widmar aguilar
Ejercicios varios de  algebra   widmar aguilarEjercicios varios de  algebra   widmar aguilar
Ejercicios varios de algebra widmar aguilar
Ā 
Ejercicios prueba de algebra de la UTN- widmar aguilar
Ejercicios prueba de algebra de la UTN-  widmar aguilarEjercicios prueba de algebra de la UTN-  widmar aguilar
Ejercicios prueba de algebra de la UTN- widmar aguilar
Ā 
1. ct 1 (paper-1) 10 aug 2014
1. ct 1 (paper-1) 10 aug 20141. ct 1 (paper-1) 10 aug 2014
1. ct 1 (paper-1) 10 aug 2014
Ā 
Hosoya polynomial, wiener and hyper wiener indices of some regular graphs
Hosoya polynomial, wiener and hyper wiener indices of some regular graphsHosoya polynomial, wiener and hyper wiener indices of some regular graphs
Hosoya polynomial, wiener and hyper wiener indices of some regular graphs
Ā 
On The Homogeneous Biquadratic Equation with 5 Unknowns
On The Homogeneous Biquadratic Equation with 5 UnknownsOn The Homogeneous Biquadratic Equation with 5 Unknowns
On The Homogeneous Biquadratic Equation with 5 Unknowns
Ā 
Introduction to Bayesian Inference
Introduction to Bayesian InferenceIntroduction to Bayesian Inference
Introduction to Bayesian Inference
Ā 
C142530
C142530C142530
C142530
Ā 
final19
final19final19
final19
Ā 
Product analysis formulas: The catalan numbers and its relation with the prod...
Product analysis formulas: The catalan numbers and its relation with the prod...Product analysis formulas: The catalan numbers and its relation with the prod...
Product analysis formulas: The catalan numbers and its relation with the prod...
Ā 
Integral table
Integral tableIntegral table
Integral table
Ā 
Para mayra
Para mayraPara mayra
Para mayra
Ā 
1105 ch 11 day 5
1105 ch 11 day 51105 ch 11 day 5
1105 ch 11 day 5
Ā 
Explicit upper bound for the function of sum of divisors
Explicit upper bound for the function of sum of divisorsExplicit upper bound for the function of sum of divisors
Explicit upper bound for the function of sum of divisors
Ā 
Leidy rivadeneira deber_1
Leidy rivadeneira deber_1Leidy rivadeneira deber_1
Leidy rivadeneira deber_1
Ā 
Chapter 6 algebraic expressions iii
Chapter 6   algebraic expressions iiiChapter 6   algebraic expressions iii
Chapter 6 algebraic expressions iii
Ā 
Sub1567
Sub1567Sub1567
Sub1567
Ā 
Basic m4-2-chapter1
Basic m4-2-chapter1Basic m4-2-chapter1
Basic m4-2-chapter1
Ā 

Viewers also liked

Ma2002 1.6 rm
Ma2002 1.6 rmMa2002 1.6 rm
Ma2002 1.6 rm
Ramakrishna Paduchuri
Ā 
M 1.3 ap1
M 1.3 ap1M 1.3 ap1
Ma2002 1.12 rm
Ma2002 1.12 rmMa2002 1.12 rm
Ma2002 1.12 rm
Ramakrishna Paduchuri
Ā 
Ma2002 1.23 rm
Ma2002 1.23 rmMa2002 1.23 rm
Ma2002 1.23 rm
Ramakrishna Paduchuri
Ā 
Ma2002 1.13 rm
Ma2002 1.13 rmMa2002 1.13 rm
Ma2002 1.13 rm
Ramakrishna Paduchuri
Ā 
M 1.4 ap1
M 1.4 ap1M 1.4 ap1
Ma2002 1.16 rm
Ma2002 1.16 rmMa2002 1.16 rm
Ma2002 1.16 rm
Ramakrishna Paduchuri
Ā 
Ma2002 1.18 rm
Ma2002 1.18 rmMa2002 1.18 rm
Ma2002 1.18 rm
Ramakrishna Paduchuri
Ā 
Ma2002 1.22 rm
Ma2002 1.22 rmMa2002 1.22 rm
Ma2002 1.22 rm
Ramakrishna Paduchuri
Ā 
Ma2002 1.21 rm
Ma2002 1.21 rmMa2002 1.21 rm
Ma2002 1.21 rm
Ramakrishna Paduchuri
Ā 

Viewers also liked (12)

Ma2002 1.6 rm
Ma2002 1.6 rmMa2002 1.6 rm
Ma2002 1.6 rm
Ā 
M 1.3 ap1
M 1.3 ap1M 1.3 ap1
M 1.3 ap1
Ā 
Ma2002 1.12 rm
Ma2002 1.12 rmMa2002 1.12 rm
Ma2002 1.12 rm
Ā 
Ma2002 1.23 rm
Ma2002 1.23 rmMa2002 1.23 rm
Ma2002 1.23 rm
Ā 
Ma2002 1.13 rm
Ma2002 1.13 rmMa2002 1.13 rm
Ma2002 1.13 rm
Ā 
M 1.4 ap1
M 1.4 ap1M 1.4 ap1
M 1.4 ap1
Ā 
Ma2002 1.16 rm
Ma2002 1.16 rmMa2002 1.16 rm
Ma2002 1.16 rm
Ā 
Ma2002 1.18 rm
Ma2002 1.18 rmMa2002 1.18 rm
Ma2002 1.18 rm
Ā 
M 1.4 rm
M 1.4 rmM 1.4 rm
M 1.4 rm
Ā 
Ma2002 1.22 rm
Ma2002 1.22 rmMa2002 1.22 rm
Ma2002 1.22 rm
Ā 
M 1.5 rm
M 1.5 rmM 1.5 rm
M 1.5 rm
Ā 
Ma2002 1.21 rm
Ma2002 1.21 rmMa2002 1.21 rm
Ma2002 1.21 rm
Ā 

Similar to Ma2002 1.10 rm

Runge-Kutta methods with examples
Runge-Kutta methods with examplesRunge-Kutta methods with examples
Runge-Kutta methods with examples
Sajjad Hossain
Ā 
General equation of a circle
General equation of a circleGeneral equation of a circle
General equation of a circle
Janak Singh saud
Ā 
Second order derivatives
Second order derivativesSecond order derivatives
Second order derivatives
sumanmathews
Ā 
Newton two Equation method
Newton two Equation  method Newton two Equation  method
Newton two Equation method
shanto017
Ā 
CIRCLES.pptx
CIRCLES.pptxCIRCLES.pptx
CIRCLES.pptx
vannessafaithgobot
Ā 
Matematika Dasar (exponen,dan banyak lagi)
Matematika Dasar (exponen,dan banyak lagi)Matematika Dasar (exponen,dan banyak lagi)
Matematika Dasar (exponen,dan banyak lagi)
Lufikome
Ā 
Equation of a Circle in standard and general form
Equation of  a Circle in standard and general formEquation of  a Circle in standard and general form
Equation of a Circle in standard and general form
AraceliLynPalomillo
Ā 
35182797 additional-mathematics-form-4-and-5-notes
35182797 additional-mathematics-form-4-and-5-notes35182797 additional-mathematics-form-4-and-5-notes
35182797 additional-mathematics-form-4-and-5-notesWendy Pindah
Ā 
Laplace transformation
Laplace transformationLaplace transformation
Laplace transformation
Akanksha Diwadi
Ā 
Proyecto parcial iii_ proyecciones lineales
Proyecto parcial iii_ proyecciones linealesProyecto parcial iii_ proyecciones lineales
Proyecto parcial iii_ proyecciones lineales
JOSUESANTIAGOPILLAJO
Ā 
8 Continuous-Time Fourier Transform Solutions To Recommended Problems
8 Continuous-Time Fourier Transform Solutions To Recommended Problems8 Continuous-Time Fourier Transform Solutions To Recommended Problems
8 Continuous-Time Fourier Transform Solutions To Recommended Problems
Sara Alvarez
Ā 
differential-calculus-1-23.pdf
differential-calculus-1-23.pdfdifferential-calculus-1-23.pdf
differential-calculus-1-23.pdf
IILSASTOWER
Ā 
Lesson 8: Curves, Arc Length, Acceleration
Lesson 8: Curves, Arc Length, AccelerationLesson 8: Curves, Arc Length, Acceleration
Lesson 8: Curves, Arc Length, Acceleration
Matthew Leingang
Ā 
Tang 05 calculations given keq 2
Tang 05   calculations given keq 2Tang 05   calculations given keq 2
Tang 05 calculations given keq 2mrtangextrahelp
Ā 
Hosoya polynomial, Wiener and Hyper-Wiener indices of some regular graphs
Hosoya polynomial, Wiener and Hyper-Wiener indices of some regular graphsHosoya polynomial, Wiener and Hyper-Wiener indices of some regular graphs
Hosoya polynomial, Wiener and Hyper-Wiener indices of some regular graphs
ieijjournal
Ā 
HOSOYA POLYNOMIAL, WIENER AND HYPERWIENER INDICES OF SOME REGULAR GRAPHS
HOSOYA POLYNOMIAL, WIENER AND HYPERWIENER INDICES OF SOME REGULAR GRAPHSHOSOYA POLYNOMIAL, WIENER AND HYPERWIENER INDICES OF SOME REGULAR GRAPHS
HOSOYA POLYNOMIAL, WIENER AND HYPERWIENER INDICES OF SOME REGULAR GRAPHS
ieijjournal
Ā 
CĆ”lculo ii howard anton - capĆ­tulo 16 [tĆ³picos do cĆ”lculo vetorial]
CĆ”lculo ii   howard anton - capĆ­tulo 16 [tĆ³picos do cĆ”lculo vetorial]CĆ”lculo ii   howard anton - capĆ­tulo 16 [tĆ³picos do cĆ”lculo vetorial]
CĆ”lculo ii howard anton - capĆ­tulo 16 [tĆ³picos do cĆ”lculo vetorial]
Henrique Covatti
Ā 

Similar to Ma2002 1.10 rm (20)

Ma2002 1.7 rm
Ma2002 1.7 rmMa2002 1.7 rm
Ma2002 1.7 rm
Ā 
Runge-Kutta methods with examples
Runge-Kutta methods with examplesRunge-Kutta methods with examples
Runge-Kutta methods with examples
Ā 
General equation of a circle
General equation of a circleGeneral equation of a circle
General equation of a circle
Ā 
Second order derivatives
Second order derivativesSecond order derivatives
Second order derivatives
Ā 
Newton two Equation method
Newton two Equation  method Newton two Equation  method
Newton two Equation method
Ā 
CIRCLES.pptx
CIRCLES.pptxCIRCLES.pptx
CIRCLES.pptx
Ā 
Matematika Dasar (exponen,dan banyak lagi)
Matematika Dasar (exponen,dan banyak lagi)Matematika Dasar (exponen,dan banyak lagi)
Matematika Dasar (exponen,dan banyak lagi)
Ā 
Equation of a Circle in standard and general form
Equation of  a Circle in standard and general formEquation of  a Circle in standard and general form
Equation of a Circle in standard and general form
Ā 
Ch08 3
Ch08 3Ch08 3
Ch08 3
Ā 
VCU(Seminar)
VCU(Seminar)VCU(Seminar)
VCU(Seminar)
Ā 
35182797 additional-mathematics-form-4-and-5-notes
35182797 additional-mathematics-form-4-and-5-notes35182797 additional-mathematics-form-4-and-5-notes
35182797 additional-mathematics-form-4-and-5-notes
Ā 
Laplace transformation
Laplace transformationLaplace transformation
Laplace transformation
Ā 
Proyecto parcial iii_ proyecciones lineales
Proyecto parcial iii_ proyecciones linealesProyecto parcial iii_ proyecciones lineales
Proyecto parcial iii_ proyecciones lineales
Ā 
8 Continuous-Time Fourier Transform Solutions To Recommended Problems
8 Continuous-Time Fourier Transform Solutions To Recommended Problems8 Continuous-Time Fourier Transform Solutions To Recommended Problems
8 Continuous-Time Fourier Transform Solutions To Recommended Problems
Ā 
differential-calculus-1-23.pdf
differential-calculus-1-23.pdfdifferential-calculus-1-23.pdf
differential-calculus-1-23.pdf
Ā 
Lesson 8: Curves, Arc Length, Acceleration
Lesson 8: Curves, Arc Length, AccelerationLesson 8: Curves, Arc Length, Acceleration
Lesson 8: Curves, Arc Length, Acceleration
Ā 
Tang 05 calculations given keq 2
Tang 05   calculations given keq 2Tang 05   calculations given keq 2
Tang 05 calculations given keq 2
Ā 
Hosoya polynomial, Wiener and Hyper-Wiener indices of some regular graphs
Hosoya polynomial, Wiener and Hyper-Wiener indices of some regular graphsHosoya polynomial, Wiener and Hyper-Wiener indices of some regular graphs
Hosoya polynomial, Wiener and Hyper-Wiener indices of some regular graphs
Ā 
HOSOYA POLYNOMIAL, WIENER AND HYPERWIENER INDICES OF SOME REGULAR GRAPHS
HOSOYA POLYNOMIAL, WIENER AND HYPERWIENER INDICES OF SOME REGULAR GRAPHSHOSOYA POLYNOMIAL, WIENER AND HYPERWIENER INDICES OF SOME REGULAR GRAPHS
HOSOYA POLYNOMIAL, WIENER AND HYPERWIENER INDICES OF SOME REGULAR GRAPHS
Ā 
CĆ”lculo ii howard anton - capĆ­tulo 16 [tĆ³picos do cĆ”lculo vetorial]
CĆ”lculo ii   howard anton - capĆ­tulo 16 [tĆ³picos do cĆ”lculo vetorial]CĆ”lculo ii   howard anton - capĆ­tulo 16 [tĆ³picos do cĆ”lculo vetorial]
CĆ”lculo ii howard anton - capĆ­tulo 16 [tĆ³picos do cĆ”lculo vetorial]
Ā 

More from Ramakrishna Paduchuri

M 1.5 p3.q
M 1.5 p3.qM 1.5 p3.q
M 1.5 p3.q
Ramakrishna Paduchuri
Ā 
M 1.5 p1.s
M 1.5 p1.sM 1.5 p1.s
M 1.5 p1.s
Ramakrishna Paduchuri
Ā 
M 1.3 rm
M 1.3 rmM 1.3 rm
Ma2002 1.19 rm
Ma2002 1.19 rmMa2002 1.19 rm
Ma2002 1.19 rm
Ramakrishna Paduchuri
Ā 
Ma2002 1.17 rm
Ma2002 1.17 rmMa2002 1.17 rm
Ma2002 1.17 rm
Ramakrishna Paduchuri
Ā 

More from Ramakrishna Paduchuri (12)

M 1.5 p4.s
M 1.5 p4.sM 1.5 p4.s
M 1.5 p4.s
Ā 
M 1.5 p4.q
M 1.5 p4.qM 1.5 p4.q
M 1.5 p4.q
Ā 
M 1.5 p3.s
M 1.5 p3.sM 1.5 p3.s
M 1.5 p3.s
Ā 
M 1.5 p3.q
M 1.5 p3.qM 1.5 p3.q
M 1.5 p3.q
Ā 
M 1.5 p2.s
M 1.5 p2.sM 1.5 p2.s
M 1.5 p2.s
Ā 
M 1.5 p2.q
M 1.5 p2.qM 1.5 p2.q
M 1.5 p2.q
Ā 
M 1.5 p1.s
M 1.5 p1.sM 1.5 p1.s
M 1.5 p1.s
Ā 
M 1.5 p1.q
M 1.5 p1.qM 1.5 p1.q
M 1.5 p1.q
Ā 
M 1.3 rm
M 1.3 rmM 1.3 rm
M 1.3 rm
Ā 
M 1.1 rm
M 1.1 rmM 1.1 rm
M 1.1 rm
Ā 
Ma2002 1.19 rm
Ma2002 1.19 rmMa2002 1.19 rm
Ma2002 1.19 rm
Ā 
Ma2002 1.17 rm
Ma2002 1.17 rmMa2002 1.17 rm
Ma2002 1.17 rm
Ā 

Recently uploaded

2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
Ā 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
Ā 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
Ā 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
Ā 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
Ā 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
Ā 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
Ā 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
Ā 
BƀI Tįŗ¬P Bį»” TRį»¢ TIįŗ¾NG ANH GLOBAL SUCCESS Lį»šP 3 - Cįŗ¢ NĂM (CƓ FILE NGHE Vƀ ĐƁP Ɓ...
BƀI Tįŗ¬P Bį»” TRį»¢ TIįŗ¾NG ANH GLOBAL SUCCESS Lį»šP 3 - Cįŗ¢ NĂM (CƓ FILE NGHE Vƀ ĐƁP Ɓ...BƀI Tįŗ¬P Bį»” TRį»¢ TIįŗ¾NG ANH GLOBAL SUCCESS Lį»šP 3 - Cįŗ¢ NĂM (CƓ FILE NGHE Vƀ ĐƁP Ɓ...
BƀI Tįŗ¬P Bį»” TRį»¢ TIįŗ¾NG ANH GLOBAL SUCCESS Lį»šP 3 - Cįŗ¢ NĂM (CƓ FILE NGHE Vƀ ĐƁP Ɓ...
Nguyen Thanh Tu Collection
Ā 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
Ā 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
Ā 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
Ā 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
Ā 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
Ā 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
Ā 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
Ā 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
Ā 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
Ā 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
Ā 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
Ā 

Recently uploaded (20)

2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Ā 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
Ā 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Ā 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Ā 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Ā 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Ā 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
Ā 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
Ā 
BƀI Tįŗ¬P Bį»” TRį»¢ TIįŗ¾NG ANH GLOBAL SUCCESS Lį»šP 3 - Cįŗ¢ NĂM (CƓ FILE NGHE Vƀ ĐƁP Ɓ...
BƀI Tįŗ¬P Bį»” TRį»¢ TIįŗ¾NG ANH GLOBAL SUCCESS Lį»šP 3 - Cįŗ¢ NĂM (CƓ FILE NGHE Vƀ ĐƁP Ɓ...BƀI Tįŗ¬P Bį»” TRį»¢ TIįŗ¾NG ANH GLOBAL SUCCESS Lį»šP 3 - Cįŗ¢ NĂM (CƓ FILE NGHE Vƀ ĐƁP Ɓ...
BƀI Tįŗ¬P Bį»” TRį»¢ TIįŗ¾NG ANH GLOBAL SUCCESS Lį»šP 3 - Cįŗ¢ NĂM (CƓ FILE NGHE Vƀ ĐƁP Ɓ...
Ā 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ā 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Ā 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Ā 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
Ā 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
Ā 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
Ā 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Ā 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
Ā 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
Ā 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Ā 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Ā 

Ma2002 1.10 rm

  • 1. Numerical solution of ordinary and partial dierential Equations Module 10: Second order equations Dr.rer.nat. Narni Nageswara Rao Ā£ August 2011 1 Second Order Equations Many dierential equations which appear in practice are systems of the sec- ond order y HH = f(t; y; y H ); y(t0) = y0; y H (t0) = y H 0 t0 t b (1) This is mainly due to the fact that the forces are proportional to acceleration. i.e, to second derivatives. The equation (1) can be transformed into a
  • 2. rst order dierential equation of doubled dimension by considering the vector (y; yH ) as the new variable. y yH !H = yH f(t; y; yH ) ! y(t0) = y0; (2) y H (t0) = y H 0 In order to solve (1) numerically, one can for instance apply a Taylor series method or Runge-Kutta method. Ā£nnrao maths@yahoo.co.in 1
  • 3. 1.1 Taylor series method of order p We write the Taylor series method to
  • 4. nd yj+1 and yH j+1 as yj+1 = yj + hy H j + h2 2! y HH j + Ā”Ā”Ā”+ hp p! y (p) j y H j+1 = y H j + hy HH j + Ā”Ā”Ā”+ hp p! y (p+1) j ; j = 0; 1; Ā”Ā”Ā” ; N Ā 1 (3) The truncation error is y(hp+1 ) in both yj+1 and yH j+1. The hider order derivatives are calculated as follows: y HH j = f(tj; yj; y H j) = fj y HHH j = (ft + y H fy + ffy0 )j = @ @t + y H @ @y + f @ @yH fj = Dfj y iv j = [ftt + (y H )2 fyy + f 2 fy0 y0 + 2y H fty + 2ffty0 +2y H ffyy0 + f H y(ft + y H fy + ffy0 + ffy]j = D 2 fj + (fy0 )jDfj + fj(fy)j where D = @ @t + y H j @ @y + fj @ @yH and D 2 = D(D) (4) ) yj+1 = yj + hy H j + h2 2 fj + h3 6 Dfj + h4 24 Ā¢ D 2 fj + (fy0 )j + fj(fy)j Ā£ + Ā”Ā”Ā” y H j+1 = y H j + hfj + h2 2 Dfj + h3 6 Ā¢ D 2 fj + (fy0 )jDfj + fj(fy)j Ā£ + Ā”Ā”Ā” (5) 1.2 Runge-Kutta methods For the second order initial value problem (1), we de
  • 5. ne the method as yj+1 = yj + hy H j + W1K1 + W2K2 y H j+1 = y H j + 1 h (W Ā£ 1 K1 + W Ā£ 2 K2) (6) K1 = h2 2! f(tj; yj; y H j) K2 = h2 2! f tj + c2h; yj + c2hy H j + a21K1; y H j + 1 h b21K1 2
  • 6. where c2, a21,b21,W1,W2,W Ā£ 1 ,W Ā£ 2 are arbitrary constants to be determined. Note that b21K1=h is an y(h) term, in the argument of f in K2. Because of the de
  • 7. nition of K1, we choose b21 = 2c2. Expanding K1 and K2 in Taylor series about tj, we get K1 = h2 2 fj K2 = h2 2 fj + hc2Dfj + h2 2 Ā  c 2 2D 2 fj + a21fjfy Ā” + Ā”Ā”Ā” ! where D and D2 are as de
  • 8. ned in (4). Substituting in (6), we obtain yj+1 = yj + hy H j + h2 2 (W1 + W2)fj + h3 2 c2W2Dfj + h4 4 Ā  W2c 2 2D 2 fj +W2a21fjfy) + y(h 5 ) y H j+1 = y H j + h 2 (W Ā£ 1 + W Ā£ 2 )fj + h2 2 c2W Ā£ 2 Dfj + h3 4 Ā  W Ā£ 2 c 2 2D 2 fj + W Ā£ 2 a21fjfy) + y(h 4 ) (7) Comparing (7) with (3), we get W1 + W2 = 1; W Ā£ 1 + W Ā£ 2 = 2 c2W2 = 1 3 ; c2W Ā£ 2 = 1 (8) The coecient of h4 in yj+1 and of h3 in yH j+1 of equation (7) will not match with the corresponding coecients in (3) for any choice of c2, a21,W2 and W Ā£ 2 . Therefore,the error is y(h4 ) in yj+1 and o(h3 ) in yH j+1. We have four equations to determine the six parameters c2, a21,W1,W2,W Ā£ 1 ,W Ā£ 2 . Choose c2 = 2 3 and a21 = c2. Then, we obtain from (8) W1 = W2 = 1 2 ; c2 = a21 = 2 3 ; b21 = 4 3 ; W Ā£ 1 = 1 2 ; W Ā£ 2 = 3 2 Thus, the Runge-Kutta method (6) becomes yj+1 = yj + hy H j + 1 2 (K1 + K2) y H j+1 = y H j + 1 2h (K1 + 3K2) (9) K1 = h2 2 f(tj; yj; y H j) K2 = h2 2 f tj + 2 3 h; yj + 2 3 hy H j + 2 3 K1; y H j + 4 3h K1 3
  • 9. If we use four evaluations of f, then we get the following Runge-Kutta method. yj+1 = yj + hy H j + 1 2 (K1 + K2 + K3) y H j+1 = y H j + 1 3h (K1 + 2K2 + 2K3 + K4) (10) K1 = h2 2 f(tj; yj; y H j) K2 = h2 2 f tj + h 2 ; yj + h 2 y H j + 1 4 K1; y H j + K1 h K3 = h2 2 f tj + h 2 ; yj + h 2 y H j + 1 4 K1; y H j + 1 h K2 K4 = h2 2 f tj + h; yj + hy H j + K3; y H j + 2 h K3 The error is y(h5 ) in yj+1 and y(h4 ) in yH j+1 1.3 Special second order equations Now, let the function f be independent of yH . Thus the equation yHH = f(t; y) is called the special second order equation. The initial value problem becomes y HH = f(t; y); t0 t b y(t0) = y0; y H (t0) = y H 0 (11) Consider the Runge-Kutta method (6) using 2 evaluations of f. Since fy0 = 0, we have from (4) y iv j = D 2 fj + fj(fy)j where D = @ @t + yH j @ @y and D2 is suitably de
  • 10. ned. ) it is possible to compare y(h3 ) terms in yH j+1 and yH (tj+1). Comparing y(h3 ) terms in (7) and (3) we get two more equations, besides the four equations in (8). We now have the equations W1+W2 = 1; c2W2 = 1 3 ; c 2 2W Ā£ 2 = 2 3 ; a21W Ā£ 2 = 2 3 ; W Ā£ 1 +W Ā£ 2 = 2; c2W Ā£ 2 = 1 This system uniquely determines the six parameters. The solution is c2 = 2 3 ; a21 = c 2 2 = 4 9 ; W1 = 1 2 ; W2 = 1 2 ; W Ā£ 1 = 1 2 ; W Ā£ 2 = 3 2 4
  • 11. ) The method is given by yj+1 = yj + hy H j + 1 2 (K1 + K2) y H j+1 = y H j + 1 2h (K1 + 3K2) K1 = h2 2 f(tj; yj) K2 = h2 2 f tj + 2 3 h; yj + 2 3 hy H j + 4 9 K1 The error in both yj+1 and yH j+1 is y(h4 ). The Runge-Kutta method using four evaluations for (11) is given by yj+1 = yj + hy H j + 1 96 [23K1 + 75K2 Ā 27K3 + 25K4] y H j+1 = y H j + 1 96h (23K1 + 125K2 Ā 81K3 + 125K4) (12) K1 = h2 2 f(tj; yj) K2 = h2 2 f tj + 2 5 h; yj + 2 5 hy H j + 4 25 K1 K3 = h2 2 f tj + 2 3 h; yj + 2 3 hy H j + 4 9 K1 K4 = h2 2 f tj + 4 5 h; yj + 4 5 hy H j + 8 25 (K1 + K2) The error in both yj+1 and yH j+1 is y(h5 ). This method is called the Runge- Kutta-Nystroem method. Example Use the Runge-Kutta method (10) for solving the initial value problem y HH = y H y(0) = 1; y H (0) = 1 with step length h. Show that yj+1 yH j+1 ! = A yj yH j ! where A is a real 2Ā¢2 matrix. Compute the solution at t = 0:2 with h = 0:1. Compare with the exact solution y(t) = et . 5
  • 12. Solution We have f(t; y; y H ) = y H ) K1 = h2 2 f(tj; yj; y H j) = h2 2 y H j K2 = h2 2 f tj + h 2 ; yj + h 2 y H j + 1 h K1; y H j + K1 h = h2 2 y H j + K1 h = h2 2 y H j + h 2 y H j = h2 2 1 + h 2 y H j K3 = h2 2 f tj + h 2 ; yj + h 2 y H j + 1 4 K1; y H j + K2 h = h2 2 y H j + K2 h ! = h2 2 y H j + h 2 1 + h 2 y H j ! = h2 2 1 + h 2 + h2 4 ! y H j K4 = h2 2 f tj + h; yj + hy H j + K3; y H j + 2 h K3 = h2 2 y H j + 2 h K2 ! = h2 2 y H j + h 1 + h 2 + h2 4 y H j ! = h2 2 1 + h + h2 2 + h4 4 y H j yj+1 = yj + hy H j + 1 3 (K1 + K2 + K3) = yj + hy H j + 1 3 h2 2 y H j + h2 2 1 + h 2 y H j + h2 2 1 + h 2 + h2 4 y H j ! = yj + h + h2 2 + h3 6 + h4 24 ! y H j y H j+1 = y H j + 1 3h (K1 + 2K2 + 2K3 + K4) = y H j + 1 3h h2 2 y H j + h 1 + h 2 y H j + h 2 1 + h 2 + h2 4 ! y H j + h2 2 1 + h + h2 2 + h3 4 ! y H j ' = 1 + h + h2 2 + h3 6 + h4 24 ! y H j 6
  • 13. ) yj+1 yH j+1 ! = 1 E(h) Ā 1 0 E(h) ! yj yH j ! where E(h) = 1 + h + h2 2 + h3 6 + h4 24 Thus, we
  • 14. nd A = 1 E(h) Ā 1 0 E(h) ! The matrix A for h = 0:1 becomes A = 1 0:1051708 0 1:1051708 ! For j = 0, we have y0 = 1; y H 0 = 1; t1 = 0:1 y1 yH 1 ! = 1 0:1051708 0 1:1051708 ! 1 1 ! = 1:1051708 1:1051708 ! For j = 1, we have y1 = 1:1051708; y H 1 = 1:1051708; t2 = 0:2 y2 yH 2 ! = 1 0:1051708 0 1:1051708 ! 1:1051708 1:1051708 ! = 1:2214025 1:2214025 ! The exact solution is y(t) = et and the exact values at t = 0:2 are given by y2 yH 2 ! = 1:2214028 1:2214028 ! Example Solve the initial value problem y HH = (1 + t 2 )y; y(0) = 1; y H (0) = 0; t[0; 0:4] by the Runge-Kutta-Nystrom method with h = 0:2. Compare with the exact solution y(t) = et2=2 . Solution For j = 0, we have t0 = 0; y0 = 1; y H 0 = 0 K1 = h2 2 f(t0; y0) = h2 2 (1 + t 2 0)y0 = (0:2)2 2 (1 + 0)1 = 0:02 7
  • 15. K2 = h2 2 f t0 + 2 5 h; y0 + 2 5 hy H 0 + 4 25 K1 = h2 2 4 1 + t0 + 2 5 h 2 5 y0 + 2 5 hy H 0 + 4 25 K1 ! = (0:2)2 2 Ā¢ 1 + (0:08)2 Ā£ 1 + 0 + 4 25 Ā¢0:02 ! = (0:02)(1:0064)(1:0032) = 0:0201924 K3 = h2 2 f t0 + 2 3 h; y0 + 2 3 hy H 0 + 4 9 K1 = h2 2 4 1 + t0 + 2 3 h 2 5 y0 + 2 3 hy H 0 + 4 9 K1 ! = (0:2)2 2 Ā¢ 1 + (0:1333333)2 Ā£ 1 + 0 + 4 9 (0:0201924) ! = (0:02)(1:0177778)(1:0089744) = 0:0205382 K4 = h2 2 f t0 + 4 5 h; y0 + 4 5 hy H 0 + 8 25 (K1 + K2) = h2 2 4 1 + t0 + 4 5 h 2 5 y0 + 4 5 hy H 0 + 8 25 (K1 + K2) ! = (0:2)2 2 Ā¢ 1 + (0:16)2 Ā£ 1 + 0 + 8 25 (0:0401924) ! = (0:02)(0:0256)(1:0128616) = 0:0207758 y1 = y0 + hy H 0 + 1 96 (23K1 + 75K2 Ā 27K3 + 25K4) = 1 + 0 + 1 96 [23(0:02) + 75(0:0201924) Ā 27(0:0205382) + 25(0:0207758)] = 1 + 1 96 (1:9392936) = 1:0202010 y H 1 = y H 0 + 1 96h (23K1 + 125K2 Ā 81K3 + 125K4) = 0 + 1 96(0:2) [23(0:02) + 125(0:0201924) Ā 81(0:0205382) + 125(0:0207758)] = 0 + 1 19:2 (3:9174308) = 0:2040329 8
  • 16. For j = 1, we have t1 = 0:2; y2 = 1:0202010; y H 1 = 0:2040329 K1 = h2 2 f(t1; y1) = h2 2 (1 + t 2 1)y2 = (0:2)2 2 [1 + (0:2)2 ](1:0212202) = (0:02)(1:04)(1:0202010) = 0:0212202 K2 = h2 2 f t1 + 2 5 h; y1 + 2 5 hy H 1 + 4 25 K1 = h2 2 4 1 + 1 + 2 5 h 2 5 y1 + 2 5 hy H 1 + 4 25 K1 ! = (0:2)2 2 [1 + (0:28)2 ][1:0202010 + (0:08)(0:2040329) + (0:16)(0:0212202)] = (0:02)(1:0784)(1:0399189) = 0:0224290 K3 = h2 2 f t1 + 2 3 h; y1 + 2 3 hy H 1 + 4 9 K1 = h2 2 4 1 + 1 + 2 3 h 2 5 y1 + 2 3 hy H 1 + 4 9 K1 ! = (0:2)2 2 [1 + (0:3333333)2 ][1:0202010 + (0:133333)(0:2040329) +(0:4444444)(0:0212202)] = (0:02)(1:1111111)(1:0568366) = 0:0234853 K4 = h2 2 f t1 + 4 5 h; y1 + 4 5 hy H 1 + 8 25 (K1 + K2) = h2 2 1 + (t1 + 4 5 h)2 ! y1 + 4 5 hy H 1 + 8 25 (K1 + K2) ! = (0:2)2 2 [1 + (0:36)2 ][1:0202010 + (0:16)(0:2040329) + (0:32)(0:0436492) = (0:02)(1:1296)(1:0668140) = 0:0241015 y2 = y1 + hy H 1 + 1 96 [23K1 + 75K2 Ā 27K3 + 25K4)] = 1:0202010 + (0:2)(0:2040329) + 1 96 [23(0:0212202) +75(0:0224290) Ā 27(0:0234853) + 25(0:0241015)] = 1:0202010 + 0:0408066 + 1 96 (2:1386740) = 1:0832855 9
  • 17. y H 2 = y H 1 + 1 96h (23K1 + 125K2 Ā 81K3 + 125K4) = 0:2040329 + 1 19:2 [23(0:0212202) + 125(0:0224290) Ā 81(0:0234853) +125(0:0241015)] = 0:2040329 + 1 19:2 (4:4020678) = 0:4333073 ) we have y(0:2) % y1 = 1:0202010; y H (0:2) % y H 1 = 0:2040329; y(0:4) % y2 = 1:0832855; y H (0:4) % y H 2 = 0:4333073 The exact solution is y(t) = et2=2 . The exact values are given by y(0:2) = 1:02020134; y H (0:2) = 0:20404027 y(0:4) = 1:0832871; y H (0:4) = 0:43331484 10