2. ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
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
4. ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
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!!!
6. ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
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. ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
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. ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
In Matrix Form
{ } [ ]{ } { }uxAx +=
( )
+
−−
=
tEx
x
L
R
LC
x
x 0
1
10
2
1
2
1
10. ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
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. ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
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. ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
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. ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
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