Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
CS 130: Mathematical Methods in Computer Science Ordinary Differential Equations Nestine Hope S. Hernandez Algorithms and Complexity Laboratory Department of Computer Science University of the Philippines, Diliman nshernandez@dcs.upd.edu.ph Day 19
Solving Systems of ODEs
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Ordinary Differential Equations
Laplace Transforms Definitions Properties of the Laplace Transform Inverse Laplace Transforms Solving ODEs Solving Systems of ODEs
Solving Systems of ODEs
are often rather awkward to use. In this chapter, we describeSolving howSystems the Laplace Laplace Transforms Inverse Laplace Transforms Solving ODEs of ODEs transform method works, emphasizing problems typical of those that arise in engineering applications. Laplace Transform Method for Solving ODEs
Differential Equation t-domain
Laplace transform
Algebraic Equation s-domain Solve algebraic equation
Solution in t-domain
FIGURE 5.0.1
Inverse Laplace transform
Solution in s-domain
Laplace transform method for solving differential equations.
Figure taken from “Differential Equations, An Introduction to Modern Methods and Applications,
5.1 Definition of the Laplace Transform 2nd edition� by James Brannan
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Definition Let f be a function on [0, ∞). The Laplace transform of f is the function F defined by the integral, Z ∞ F (s) = e−st f (t) dt. 0
The domain of F (s) is the set of all values of s for which the integral converges. The Laplace transform of f is denoted by both F (s) and L{f (t)}.
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Laplace Transforms of Elementary Functions (a+bi)t
1. L{e
}
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Laplace Transforms of Elementary Functions (a+bi)t
1. L{e
}=
1 s−a−bi
for s > a
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Laplace Transforms of Elementary Functions (a+bi)t
1. L{e
at
}=
• L{e } • L{1}
1 s−a−bi
for s > a
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Laplace Transforms of Elementary Functions (a+bi)t
1. L{e
at
}=
• L{e } • L{1}
2. L{sin kt}
1 s−a−bi
for s > a
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Laplace Transforms of Elementary Functions (a+bi)t
1. L{e
}=
1 s−a−bi
for s > a
at
• L{e } • L{1}
2. L{sin kt} =
k s2 +k2
for s > 0
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Laplace Transforms of Elementary Functions (a+bi)t
1. L{e
}=
1 s−a−bi
for s > a
at
• L{e } • L{1}
2. L{sin kt} = 3. L{cos kt}
k s2 +k2
for s > 0
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Laplace Transforms of Elementary Functions (a+bi)t
1. L{e
}=
1 s−a−bi
for s > a
at
• L{e } • L{1}
2. L{sin kt} = 3. L{cos kt} =
k s2 +k2 s s2 +k2
for s > 0 for s > 0
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Linearity of the Laplace Transform
Theorem Suppose that f1 and f2 are two functions whose Laplace transforms exist for s > a1 and s > a2 , respectively. In addition, let c1 and c2 be real or complex numbers. Then, for s greater than the maximum of a1 and a2 , L{c1 f1 (t) + c2 f2 (t)} = c1 L{f1 (t)} + c2 L{f2 (t)}.
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Piecewise Continuous Functions
Definition A functionf is said to be piecewise continuous on an interval α ≤ t ≤ β if the interval can be partitioned by a finite number of points α = t0 < t1 < · · · < tn = β so that: 1. f is continuous on each open subinterval ti−1 < t < ti , and 2. f approaches a finite limit as the endpoints of each subinterval are approached from within the subinterval.
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Piecewise Continuous Functions
Definition A functionf is said to be piecewise continuous on an interval α ≤ t ≤ β if the interval can be partitioned by a finite number of points α = t0 < t1 < · · · < tn = β so that: 1. f is continuous on each open subinterval ti−1 < t < ti , and 2. f approaches a finite limit as the endpoints of each subinterval are approached from within the subinterval.
Example Find the Laplace transform of 2t e , 0 ≤ t < 1, f (t) = 4, 1 ≤ t.
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Functions of Exponential Order
Definition A function f (t) is of exponential order (as t → +∞) if there exist real constants M ≥ 0, K > 0, and a such that |f (t)| ≤ Keat when t ≥ M .
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Functions of Exponential Order
Definition A function f (t) is of exponential order (as t → +∞) if there exist real constants M ≥ 0, K > 0, and a such that |f (t)| ≤ Keat when t ≥ M . Remark: To show that f (t) is of exponential order, it suffices to show that f (t) is bounded for all t sufficiently large. eat
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Functions of Exponential Order
Definition A function f (t) is of exponential order (as t → +∞) if there exist real constants M ≥ 0, K > 0, and a such that |f (t)| ≤ Keat when t ≥ M . Remark: To show that f (t) is of exponential order, it suffices to show that f (t) is bounded for all t sufficiently large. eat
Example 1. f (t) = t2
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Functions of Exponential Order
Definition A function f (t) is of exponential order (as t → +∞) if there exist real constants M ≥ 0, K > 0, and a such that |f (t)| ≤ Keat when t ≥ M . Remark: To show that f (t) is of exponential order, it suffices to show that f (t) is bounded for all t sufficiently large. eat
Example 1. f (t) = t2 is of exponential order.
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Functions of Exponential Order
Definition A function f (t) is of exponential order (as t → +∞) if there exist real constants M ≥ 0, K > 0, and a such that |f (t)| ≤ Keat when t ≥ M . Remark: To show that f (t) is of exponential order, it suffices to show that f (t) is bounded for all t sufficiently large. eat
Example 1. f (t) = t2 is of exponential order. 2. f (t) = et
2
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Functions of Exponential Order
Definition A function f (t) is of exponential order (as t → +∞) if there exist real constants M ≥ 0, K > 0, and a such that |f (t)| ≤ Keat when t ≥ M . Remark: To show that f (t) is of exponential order, it suffices to show that f (t) is bounded for all t sufficiently large. eat
Example 1. f (t) = t2 is of exponential order. 2
2. f (t) = et is not of exponential order.
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Existence of the Laplace Transform
Theorem Suppose i. f is piecewise continuous on the interval 0 â&#x2030;¤ t â&#x2030;¤ A for any positive A, and ii. f is of exponential order. Then the Laplace transform of f exists for s > a.
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Laplace Transform of ect f (t)
Theorem If F (s) = L{f (t)} exists for s > a, and if c is a constant, then L{ect f (t)} = F (s â&#x2C6;&#x2019; c),
s > a + c.
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Laplace Transform of ect f (t)
Theorem If F (s) = L{f (t)} exists for s > a, and if c is a constant, then L{ect f (t)} = F (s − c),
s > a + c.
Example Find the Laplace transform of g(t) = e−2t sin 4t.
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Laplace Transform of Derivatives
Theorem Suppose that f is continuous and f 0 is piecewise continuous on any interval 0 ≤ t ≤ A. Suppose further that f and f 0 are of exponential order. Then L{f 0 (t)} exists for s > a, and moreover L{f 0 (t)} = sL{f (t)} − f (0).
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Laplace Transform of Derivatives
Theorem Suppose that f is continuous and f 0 is piecewise continuous on any interval 0 ≤ t ≤ A. Suppose further that f and f 0 are of exponential order. Then L{f 0 (t)} exists for s > a, and moreover L{f 0 (t)} = sL{f (t)} − f (0).
Example Let f (t) = sin kt. Then f 0 (t) = k cos kt. L{k cos kt} = sL{sin kt} − sin 0
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Laplace Transform of Derivatives
Corollary Suppose that i. the functions f, f 0 , · · · , f (n−1) are continuous and that f (n) is piecewise continuous on any interval 0 ≤ t ≤ A, and ii. f, f 0 , · · · , f (n−1) , f (n) are of exponential order. Then L{f (n) (t)} exists for s > a and is given by L{f (n) (t)} = sn L{f (t)} − sn−1 f (0) − · · · − sf (n−2) (0) − f (n−1) (0).
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Laplace Transform of Derivatives
Corollary Suppose that i. the functions f, f 0 , · · · , f (n−1) are continuous and that f (n) is piecewise continuous on any interval 0 ≤ t ≤ A, and ii. f, f 0 , · · · , f (n−1) , f (n) are of exponential order. Then L{f (n) (t)} exists for s > a and is given by L{f (n) (t)} = sn L{f (t)} − sn−1 f (0) − · · · − sf (n−2) (0) − f (n−1) (0).
Example Assume that the solution of the ff initial value problem satisfies the hypotheses of the corollary. Find its Laplace transform. y 00 + 2y 0 + 5y = e−t ,
y(0) = 1,
y 0 (0) = −3.
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Laplace Transform of tn f (t)
Theorem Suppose that f is i. piecewise continuous on any interval 0 ≤ t ≤ A, and ii. of exponential order. Then for any positive integer n, L{tn f (t)} = (−1)n F (n) (s),
s > a.
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Laplace Transform of tn f (t)
Theorem Suppose that f is i. piecewise continuous on any interval 0 ≤ t ≤ A, and ii. of exponential order. Then for any positive integer n, L{tn f (t)} = (−1)n F (n) (s),
Example Let f (t) = 1. Then F (s) = L{1} = 1s .
s > a.
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Laplace Transform of tn f (t)
Theorem Suppose that f is i. piecewise continuous on any interval 0 ≤ t ≤ A, and ii. of exponential order. Then for any positive integer n, L{tn f (t)} = (−1)n F (n) (s),
Example Let f (t) = 1. Then F (s) = L{1} = 1s . F (n) (s) =
dn dsn
1 s
=
(−1)n n! sn+1
s > a.
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Laplace Transform of tn f (t)
Theorem Suppose that f is i. piecewise continuous on any interval 0 ≤ t ≤ A, and ii. of exponential order. Then for any positive integer n, L{tn f (t)} = (−1)n F (n) (s),
Example Let f (t) = 1. Then F (s) = L{1} = 1s . F (n) (s) = L{tn }
dn dsn
1 s
=
(−1)n n! sn+1
s > a.
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Laplace Transform of tn f (t)
Theorem Suppose that f is i. piecewise continuous on any interval 0 ≤ t ≤ A, and ii. of exponential order. Then for any positive integer n, L{tn f (t)} = (−1)n F (n) (s),
Example Let f (t) = 1. Then F (s) = L{1} = 1s . F (n) (s) = L{tn } =
dn dsn
n! sn+1
1 s
=
(−1)n n! sn+1
s > a.
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Laplace Transforms of Elementary Functions (a+bi)t
1. L{e
}=
1 s−a−bi
for s > a
at
• L{e } • L{1}
2. L{sin kt} = 3. L{cos kt} = n
4. L{t } =
k s2 +k2 s s2 +k2
n! sn+1
for s > 0 for s > 0
for s > 0
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Definition If f (t) is piecewise continuous and of exponential order on [0, â&#x2C6;&#x17E;) and L{f (t)} = F (s), then we call f the inverse Laplace transform of F , and denote it by f = Lâ&#x2C6;&#x2019;1 {F }.
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Definition If f (t) is piecewise continuous and of exponential order on [0, â&#x2C6;&#x17E;) and L{f (t)} = F (s), then we call f the inverse Laplace transform of F , and denote it by f = Lâ&#x2C6;&#x2019;1 {F }.
Example L
â&#x2C6;&#x2019;1
4 2 s + 16
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Definition If f (t) is piecewise continuous and of exponential order on [0, â&#x2C6;&#x17E;) and L{f (t)} = F (s), then we call f the inverse Laplace transform of F , and denote it by f = Lâ&#x2C6;&#x2019;1 {F }.
Example L
â&#x2C6;&#x2019;1
4 2 s + 16
= sin 4t
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
f (t) = L−1 {F (s)}
F (s) = L{f (t)}
1
1 , s
s>0
eat
1 , s−a
s>a
n! , sn+1
s>0
sin kt
k , s2 +k2
s>0
cos kt
s , s2 +k2
s>0
eat sin kt
k , (s−a)2 +k2
s>a
eat cos kt
s−a , (s−a)2 +k2
s>a
tn eat ,
n! , (s−a)n+1
s>a
tn ,
n ∈ Z+
n ∈ Z+
ect f (t)
F (s − c)
tn f (t)
(−1)n F (n) (s)
f (n) (t)
sn F (s) − sn−1 f (0) − · · · − f (n−1) (0)
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Linearity of L−1
Theorem Assume that f1 = L−1 {F1 } and f2 = L−1 {F2 } are piecewise continuous and of exponential order on [0, ∞). Then for any constants c1 and c2 , L−1 {c1 F1 + c2 F2 } = c1 L−1 {F1 } + c2 L−1 {F2 } = c1 f1 + c2 f2
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Linearity of L−1
Theorem Assume that f1 = L−1 {F1 } and f2 = L−1 {F2 } are piecewise continuous and of exponential order on [0, ∞). Then for any constants c1 and c2 , L−1 {c1 F1 + c2 F2 } = c1 L−1 {F1 } + c2 L−1 {F2 } = c1 f1 + c2 f2
Example Determine L−1
n
2 (s+2)4
+
3 s2 +16
+
5(s+1) s2 +2s+5
o .
are often rather awkward to use. In this chapter, we describeSolving howSystems the Laplace Laplace Transforms Inverse Laplace Transforms Solving ODEs of ODEs transform method works, emphasizing problems typical of those that arise in engineering applications. Laplace Transform Method for Solving ODEs
Differential Equation t-domain
Laplace transform
Algebraic Equation s-domain Solve algebraic equation
Solution in t-domain
FIGURE 5.0.1
Inverse Laplace transform
Solution in s-domain
Laplace transform method for solving differential equations.
Figure taken from â&#x20AC;&#x153;Differential Equations, An Introduction to Modern Methods and Applications,
5.1 Definition of the Laplace Transform 2nd editionâ&#x20AC;? by James Brannan
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Recall this: Find the Laplace transform of y where y 00 + 2y 0 + 5y = e−t ,
y(0) = 1,
y 0 (0) = −3.
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Recall this: Find the Laplace transform of y where y 00 + 2y 0 + 5y = e−t ,
y(0) = 1,
y 0 (0) = −3.
We obtained the following: L{y} =
s2 (s + 1)(s2 + 2s + 5)
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Recall this: Find the Laplace transform of y where y 00 + 2y 0 + 5y = eâ&#x2C6;&#x2019;t ,
y(0) = 1,
y 0 (0) = â&#x2C6;&#x2019;3.
We obtained the following: L{y} =
s2 (s + 1)(s2 + 2s + 5)
That is, y=L
â&#x2C6;&#x2019;1
s2 (s + 1)(s2 + 2s + 5)
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Recall this: Find the Laplace transform of y where y 00 + 2y 0 + 5y = eâ&#x2C6;&#x2019;t ,
y(0) = 1,
y 0 (0) = â&#x2C6;&#x2019;3.
We obtained the following: L{y} =
s2 (s + 1)(s2 + 2s + 5)
That is, y=L
â&#x2C6;&#x2019;1
s2 (s + 1)(s2 + 2s + 5)
Then, y=
1 â&#x2C6;&#x2019;1 L 4
1 s+1
3 + Lâ&#x2C6;&#x2019;1 4
s+1 (s + 1)2 + 22
â&#x2C6;&#x2019; Lâ&#x2C6;&#x2019;1
2 (s + 1)2 + 22
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Recall this: Find the Laplace transform of y where y 00 + 2y 0 + 5y = eâ&#x2C6;&#x2019;t ,
y(0) = 1,
y 0 (0) = â&#x2C6;&#x2019;3.
We obtained the following: L{y} =
s2 (s + 1)(s2 + 2s + 5)
That is, y=L
â&#x2C6;&#x2019;1
s2 (s + 1)(s2 + 2s + 5)
Then, y=
1 â&#x2C6;&#x2019;1 L 4
1 s+1
3 + Lâ&#x2C6;&#x2019;1 4
y=
s+1 (s + 1)2 + 22
â&#x2C6;&#x2019; Lâ&#x2C6;&#x2019;1
1 â&#x2C6;&#x2019;t 3 â&#x2C6;&#x2019;t e + e cos 2t â&#x2C6;&#x2019; eâ&#x2C6;&#x2019;t sin 2t 4 4
2 (s + 1)2 + 22
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Consider the initial value problem: y10 = a11 y1 + a12 y2 + f1 (t),
y1 (0) = y10
y20
y2 (0) = y20
= a21 y1 + a22 y2 + f2 (t),
Solving Systems of ODEs
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Consider the initial value problem: y10 = a11 y1 + a12 y2 + f1 (t),
y1 (0) = y10
y20
y2 (0) = y20
= a21 y1 + a22 y2 + f2 (t),
Taking the Laplace transform of the above equations: sY1 â&#x2C6;&#x2019; y1 (0) = a11 Y1 + a12 Y2 + F1 (s) sY2 â&#x2C6;&#x2019; y2 (0) = a21 Y1 + a22 Y2 + F2 (s) where Y1 = L{y1 } and Y2 = L{y2 }.
Solving Systems of ODEs
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Consider the initial value problem: y10 = a11 y1 + a12 y2 + f1 (t),
y1 (0) = y10
y20
y2 (0) = y20
= a21 y1 + a22 y2 + f2 (t),
Taking the Laplace transform of the above equations: sY1 − y1 (0) = a11 Y1 + a12 Y2 + F1 (s) sY2 − y2 (0) = a21 Y1 + a22 Y2 + F2 (s) where Y1 = L{y1 } and Y2 = L{y2 }. That is, (s − a11 )Y1 − a12 Y2 = y10 + F1 (s) −a21 Y1 + (s − a22 )Y2 = y20 + F2 (s)
Solving Systems of ODEs
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Consider the initial value problem: y10 = a11 y1 + a12 y2 + f1 (t),
y1 (0) = y10
y20
y2 (0) = y20
= a21 y1 + a22 y2 + f2 (t),
Taking the Laplace transform of the above equations: sY1 − y1 (0) = a11 Y1 + a12 Y2 + F1 (s) sY2 − y2 (0) = a21 Y1 + a22 Y2 + F2 (s) where Y1 = L{y1 } and Y2 = L{y2 }. That is, (s − a11 )Y1 − a12 Y2 = y10 + F1 (s) −a21 Y1 + (s − a22 )Y2 = y20 + F2 (s) In matrix notation, (sI − A)Y = y0 + F(s) where Y1 a11 Y= ,A = Y2 a21
a12 a22
, y0 =
y10 y20
, F(s) =
F1 (s) F2 (s)
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Consider the initial value problem: y10 = a11 y1 + a12 y2 + f1 (t),
y1 (0) = y10
y20 = a21 y1 + a22 y2 + f2 (t),
y2 (0) = y20
In matrix notation, (sI − A)Y = y0 + F(s) where Y1 a11 Y= ,A = Y2 a21
a12 a22
, y0 =
y10 y20
, F(s) =
Hence, Y = (sI − A)−1 y0 + (sI − A)−1 F(s) where (sI − A)−1 =
1 |sI − A|
s − a22 a21
a12 s − a11
and |sI − A| = s2 − (a11 + a22 )s + (a11 a22 − a12 a21 )
F1 (s) F2 (s)
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Solving Systems of ODEs
Exercises 1. Solve the linear system x0 = −2x + y y0 = x + −2y + sin t using variation of parameters. 2. Solve the linear system in #1 given the initial values x(0) = 0 and y(0) = 0 using the Laplace transform. 3. Use the Laplace transform to solve the system x00 − y 00 + x − 7y = 0 x(0) = 0 x0 + y 0 = cos t y(0) = 0
x0 (0) = 1 y 0 (0) = 2
Laplace Transforms
Inverse Laplace Transforms
Solving ODEs
Questions? See you next meeting!
Solving Systems of ODEs