How to handle a system of initial value problems using Runge-Kutta method?
#WikiCourses #Num001
https://wikicourses.wikispaces.com/Topic+Initial+Value+Problems
1. System of Initial Value Problems
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
System of Initial Value
Problems
Mohammad Tawfik
2. System of Initial Value Problems
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Objectives
• The need for a system of ODE’s will be
clarified
• Transforming a higher order linear ODE
into a set of 1st order ODE’s
• Applying the techniques of solution to a
set of 1st order ODE’s
3. System of Initial Value Problems
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Second Order Initial Value
Problems
4. System of Initial Value Problems
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Transformation!
• Most of the numerical methods of solving
initial value problems handle 1st order
initial value problems
• Most of the realistic problems involve 2nd
order initial value problems!
• A transformation must be performed!!!
5. System of Initial Value Problems
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Example
6. System of Initial Value Problems
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Current in an LRC circuit
tE
C
q
Ri
dt
di
L
2
2
dt
qd
dt
di
dt
dq
i Where:
Giving: tE
C
q
dt
dq
R
dt
qd
L 2
2
OR:
tE
C
q
qRqL
7. System of Initial Value Problems
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Introducing new variables:
• Let:
• Which gives:
• In matrix form:
qxqx 21 &
tEx
LC
x
L
R
x
xx
122
21
1
tEx
x
L
R
LC
x
x 0
1
10
2
1
2
1
8. System of Initial Value Problems
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
In Matrix Form
uxAx
tEx
x
L
R
LC
x
x 0
1
10
2
1
2
1
9. System of Initial Value Problems
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Applying the Numerical
Techniques
10. System of Initial Value Problems
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Euler Method (No Excitation)
• The equation is:
• Applying Euler
method:
• Or:
xAx
tttt xAtxx
ttt
x
x
L
R
LC
t
x
x
2
1
2
1
1
10
10
01
11. System of Initial Value Problems
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
R-K 2nd Order Method
• The equation is:
• Applying R-K 2nd
order method:
• Finally:
xAx
txAk 1
21
2
1
2
1
2
kk
t
x
x
x
x
ttt
12 ktxAk t
12. System of Initial Value Problems
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Summary
• Revise the numerical solution of initial
value problems
• Rewriting the second order ODE as a set
of two 1st order ODE’s
• Applying the numerical solution techniques
to a set of 1st order ODE’s
13. System of Initial Value Problems
Mohammad Tawfik
#WikiCourses
http://WikiCourses.WikiSpaces.com
Homework #9
1. Derive the Euler
formula for a system
of initial value
problems of the
form:
2. Use the above
formula to write
down the Euler
solution of excited
circuit in matrix form
uxAx
tEq
LC
q
L
R
q
1