Professional Documents
Culture Documents
xy y y ( x) c / x
y cos x 0 y( x) sin x c
2 xy 3 2
Example: y x 2 y 3 2 x 2e 4 y c
3x 2 y 2 8e 4 y
1
Example: y y 2 e x y x
e c
Q
RC circuits: Charging: E IR Q CE (1 e t / RC )
C
Q
Discharging: IR Q Q0 e t / RC
C
1 y
Example: y y sin( x) y [sin( x) cos(x)] Ce x . y 3x 2 , y (1) 5 .
2 x
Potential function: For M ( x, y) N ( x, y) y' 0 , we can find a ( x, y) such that M
x
and N ; is the potential function; M ( x, y) N ( x, y) y' 0 is
y
exact.
Exact differential equation: a potential function exists; general solution: ( x, y) c .
2 xy 3 2
Example: y .
3x 2 y 2 8e 4 y
M N
Theorem: Test for exactness:
y x
Example: y 2 6 xy (3xy 6 x 2 ) y 0 .
( M ) ( N )
How to find integrating factor:
y x
Example: x xy y 0 .
1
Separable equations and integrating factors:
B
y
Homogeneous differential equation: y ' f ( ) ; let y ux separable.
x
y2
Example: xy y.
x
y
Example: y 3x 2 y 3 .
x
2. SECOND-ORDER DIFFERENTIAL EQUTIONS
Example: y y 0 y1 cos x, y 2 sin x .
Example: y 4 y 4 y 0, y1 e 2 x y 2 xe 2 x .
The Constant Coefficient Homogeneous Linear Equation: y" Ay ' By 0 , A and B are numbers.
A A2 4B
2. Case 1. A2 4B 0 : The general solution is y( x) c1e ax c2 e bx ; a ,
2
A A2 4B
b .
2
Example: y y 6 y 0 y c1e 2 x c2 e 3 x .
A
3. Case 2. A2 4B 0 : The general solution is y ( x) c1e ax c2 xe ax ; a .
2
Example: y 6 y 9 y 0 y c1e 3 x c2 xe 3 x .
A
4. Case 3. A2 4B 0 : The general solution is y( x) c1e ( p iq ) x c2 e ( p iq ) x ; p ,
2
4B A2
q .
2
Example: x 2 y 2 xy 6 y 0 y c1 x 3 c2 x 2 .
Example: x 2 y 5 xy 9 y 0 y c1 x 3 c2 x 3 ln x .
Example: x 2 y 0.6 xy 16.04 y 0 y x 0.2 (c1 cos(4 ln x) c2 sin( 4 ln x)) .
2. The method of undetermined coefficients: only applied while p(x) and q(x) are constant,
i.e., y" Ay ' By f ( x) .
1
Example: y 4 y 8 x 2 2 x y c1e 2 x c 2 e 2 x 2 x 2 x 1 .
2
Example: y 2 y 3 y 8e x y c1e 3 x c2 e x 2 xe x .
5 2 3x
y 6 y 9 y 5e 3 x y c1e 3 x c 2 xe 3 x x e
2
1
Example: y 4 y x 2e 2 x y c1 cos 2 x c 2 sin 2 x ( x e 2 x ) .
4
Solutions
1
dx
a) Integrating Factor Method: v( x) e x eln x x
1 du
y xe x dx . Let u x 2 du 2 xdx dx
2
x 2x
1 e 1e
2
u x
y du y C
x 2 x 2
1
b) yg c1e x c2 xe x x 2e x
2
A tank contains 10,000 liters of a solution consisting of 100 kg of salt dissolved in water. Pure
rocky mountain spring water is pumped into the tank at the rate of 10 liters/second. (The
mixture is kept uniform by stirring.) The mixture is pumped out of the tank at the same rate it
enters.
c) Set up the initial value problem for the amount of salt, S(t), in the tank at time t.
d) Solve this problem for S(t).
e) How long will it be before only 50 kg of salt remain in the tank?
Solutions
a) Salt inflow is 0
S (t ) kg liters
Salt outflow is * 10 s
10, 000 liters
S (t ) kg
S (t )
1000 s
S (0) 100kg
dS (t ) 1 1
b)
S (t )
1000
dt ln S (t )
1000
t C
S (t ) Ce t /1000
Using the initial condition, C 100 S (t ) 100et /1000
t
c) 50 100et /1000 ln(0.5) t 1000 ln(0.5) 693s
1000
Example 1
Solve
dy
3 2 y e x , y(0) 5
dx
Solution
The homogeneous solution for the above equation is given by
3D 2 y 0
The characteristic equation for the above equation is given by
3r 2 0
The solution to the equation is
r 0.666667
y H Ce 0.666667x
The particular part of the solution is of the form Ae x
3
d Ae x
2 Ae x e x
dx
3 Ae x 2 Ae x e x
Ae x e x
A 1
Hence the particular part of the solution is
y P e x
The complete solution is given by
y yH yP
Ce 0.666667x e x
The constant C can be obtained by using the initial condition y(0) 5
y0 Ce0.6666670 e 0 5
C 1 5
C6
The complete solution is
y 6e 0.666667x e x
Example 2
Solve
dy
2 3 y e 1.5 x , y(0) 5
dx
Solution
The homogeneous solution for the above equation is given by
2 D 3 y 0
The characteristic equation for the above equation is given by
2r 3 0
The solution to the equation is
r 1.5
y H Ce 1.5 x
Based on the forcing function of the ordinary differential equations, the particular part of the
solution is of the form Ae 1.5 x , but since that is part of the form of the homogeneous part of the
solution, we need to choose the next independent solution, that is,
y P Axe 1.5 x
To find A , we substitute this solution in the ordinary differential equation as
d Axe 1.5 x
2 3 Axe 1.5 x e 1.5 x
dx
2 Ae 1.5 x 3 Axe 1.5 x 3 Axe 1.5 x e 1.5 x
2 Ae 1.5 x e 1.5 x
A 0.5
Hence the particular part of the solution is
y P 0.5 xe 1.5 x
The complete solution is given by
y yH yP
Ce1.5 x 0.5xe 1.5 x
The constant C is obtained by using the initial condition y(0) 5 .
y0 Ce 1.5( 0) 0.5(0)e 1.5( 0) 5
C0 5
C 5
The complete solution is
y 5e 1.5 x 0.5 xe 1.5 x
Sample Case 2
When
X sin(ax) or cos(ax) ,
the particular part of the solution is of the form
A sin( ax) B cos(ax) .
We can get A and B by substituting y A sin( ax) B cos(ax) in the left hand side of the
differential equation and equating coefficients.
Example 3
Solve
d2y dy dy
2 2 3 3.125 y sin x , y (0) 5, ( x 0) 3
dx dx dx
Solution
The homogeneous equation is given by
(2D 2 3D 3.125) y 0
The characteristic equation is
2r 2 3r 3.125 0
The roots of the characteristic equation are
3 3 2 4 2 3.125
r
2 2
3 9 25
4
3 16
4
3 4i
4
0.75 i
Therefore the homogeneous part of the solution is given by
y H e 0.75x ( K1 cos x K 2 sin x)
The particular part of the solution is of the form
y P A sin x B cos x
d2
2 2
A sin x B cos x 3 d A sin x B cos x 3.125( A sin x B cos x ) sin x
dx dx
2 A cos x B sin x 3( A cos x B sin x) 3.125( A sin x B cos x) sin x
d
dx
2( A sin x B cos x) 3( A cos x B sin x) 3.125( A sin x B cos x) sin x
(1.125 A 3B) sin x (1.125 B 3 A) cos x sin x
Equating coefficients of sin x and cos x on both sides, we get
1.125 A 3B 1
1.125 B 3 A 0
Solving the above two simultaneous linear equations we get
A 0.109589
B 0.292237
Hence
y P 0.109589 sin x 0.292237 cos x
The complete solution is given by
y e 0.75x ( K1 cos x K 2 sin x) (0.109589 sin x 0.292237 cos x)
To find K 1 and K 2 we use the initial conditions
dy
y (0) 5, ( x 0) 3
dx
From y(0) 5 we get
5 e 0.75(0) ( K1 cos(0) K 2 sin( 0)) (0.109589 sin( 0) 0.292237 cos(0))
5 K 1 0.292237
K 1 5.292237
dy
0.75e 0.75x ( K1 cos x K 2 sin x) e 0.75x ( K1 sin x K 2 cos x)
dx
0.109589 cos x 0.292237 sin x
From
dy
( x 0) 3,
dx
we get
3 0.75e 0.75( 0) ( K1 cos(0) K 2 sin( 0)) e 0.75( 0) ( K1 sin( 0) K 2 cos(0))
0.109589 cos(0) 0.292237 sin( 0)
3 0.75 K 1 K 2 0.109589
3 0.75(5.292237 ) K 2 0.109589
K 2 6.859588
The complete solution is
y e 0.75x (5.292237 cos x 6.859588 sin x) 0.109589 sin x 0.292237 cos x
Example 4
Solve
d2y dy dy
2 2
6 3.125 y cos(x) , y (0) 5, ( x 0) 3
dx dx dx
Solution
The homogeneous part of the equations is given by
(2 D 2 6 D 3.125) y 0
The characteristic equation is given by
2r 2 6r 3.125 0
6 6 2 4(2)(3.125)
r
2(2)
6 36 25
4
6 11
4
1.5 0.829156
0.670844 ,2.329156
Therefore, the homogeneous solution y H is given by
y H K1e 0.670845x K 2 e 2.329156x
The particular part of the solution is of the form
y P A sin x B cos x
Substituting the particular part of the solution in the differential equation,
d2 d
2 2 ( A sin x B cos x) 6 ( A sin x B cos x)
dx dx
3.125( A sin x B cos x) cos x
d
2 ( A cos x B sin x) 6( A cos x B sin x)
dx
3.125( A sin x B cos x) cos x
2( A sin x B cos x) 6( A cos x B sin x)
3.125( A sin x B cos x) cos x
(1.125 A 6B) sin x (1.125 B 6 A) cos x cos x
Equating coefficients of cos x and sin x we get
1.125 B 6 A 1
1.125 A 6 B 0
The solution to the above two simultaneous linear equations are
A 0.161006
B 0.0301887
Hence the particular part of the solution is
y P 0.161006 sin x 0.0301887 cos x
Therefore the complete solution is
y yH yP
y ( K1e 0.670845x K 2 e 2.329156x ) 0.161006 sin x 0.0301887 cos x
Constants K 1 and K 2 can be determined using initial conditions. From y(0) 5 ,
y (0) K 1 K 2 0.0301887 5
K 1 K 2 5 0.0301887 4.969811
Now
dy
0.670845 K1e ( 0.670845) x 2.329156 K 2 e ( 2.329156) x
dx
0.161006 cos x 0.0301887 sin x
dy
From ( x 0) 3
dx
0.670845 K 1 2.329156 K 2 0.161006 3
0.670845 K 1 2.329156 K 2 3 0.161006
0.670845 K 1 2.329156 K 2 2.838994
We have two linear equations with two unknowns
K 1 K 2 4.969811
0.670845 K 1 2.329156 K 2 2.838994
Solving the above two simultaneous linear equations, we get
K 1 8.692253
K 2 3.722442
The complete solution is
y (8.692253 e 0.670845x 3.722442 e 2.329156x )
0.161006 sin x 0.0301887 cos x.
Example 5
Solve
d2y dy dy
2 2 5 3.125 y e x sin x , y (0) 5, ( x 0) 3
dx dx dx
Solution
The homogeneous equation is given by
(2 D 2 5D 3.125) y 0
The characteristic equation is given by
2r 2 5r 3.125 0
5 5 2 4(2)(3.125)
r
2(2)
5 25 25
4
50
4
1.25,1.25
Since roots are repeated, the homogeneous solution y H is given by
y H ( K1 K 2 x)e ( 1.25) x
The particular part of the solution is of the form
y P e x ( A sin x B cos x)
Substituting the particular part of the solution in the ordinary differential equation
d 2 x d
2 2
{e ( A sin x B cos x)} 5 {e x ( A sin x B cos x)}
dx dx
3.125{e ( A sin x B cos x)} e x sin x
x
d
2 {e x ( A sin x B cos x) e x ( A cos x B sin x)}
dx
5{e x ( A sin x B cos x) e x ( A cos x B sin x)} 3.125e x ( A sin x B cos x) e x sin x
2{e x ( A sin x B cos x) e x ( A cos x B sin x) e x ( A cos x B sin x) e x ( A sin x B cos x)}
5{e x ( A sin x B cos x) e x ( A cos x B sin x)} 3.125e x ( A sin x B cos x) e x sin x
1.875e x ( A sin x B cos x) e x ( A cos x B sin x) e x sin x
1.875( A sin x B cos x) ( A cos x B sin x) sin x
(1.875 A B) sin x ( A 1.875 B) cos x sin x
Equating coefficients of cos x and sin x on both sides we get
A 1.875 B 0
1.875 A B 1
Solving the above two simultaneous linear equations we get
A 0.415224 and
B 0.221453
Hence,
y P e x (0.415224 sin x 0.221453 cos x)
Therefore complete solution is given by
y yH yP
y ( K1 xK 2 )e 1.25x e x (0.415224 sin x 0.221453 cos x)
Constants K 1 and K 2 can be determined using initial conditions,
From y(0) 5, we get
K 1 0.221453 5
K 1 5.221453
Now
dy
1.25 K1e 1.25x 1.25 K 2 xe 1.25x K 2 e 1.25x
dx
e x (0.415224 cos x 0.221453 sin x) e x (0.415224 sin x 0.221453 cos x)
dy
From (0) 3, we get
dx
1.25 K 1e 1.25( 0) 1.25 K 2 (0)e 1.25( 0) K 2 e 1.25( 0)
e 0 (0.415224 cos(0) 0.221453 sin( 0)) e 0 (0.415224 sin( 0) 0.221453 cos(0) 3
1.25 K 1 K 2 0.221453 0.415224 3
1.25 K 1 K 2 3.193771
1.25(5.221453 ) K 2 3.193771
K 2 9.720582
Substituting
K 1 5.221453 and
K 2 9.720582
in the solution, we get
y (5.221453 9.720582 x)e 1.25x e x (0.415224 sin x 0.221453 cos x)
dy
[Example] dx =x 1 y2
dy
[Solution] = x dx
1 y2
dy
=
xdx + c
1 y2
x2
or sin–1y = 2 + c implicit solution
2
or y = sin ( x2 + c ) explicit solution
[Example]
y ky
[Solution]
dy
kdx ln | y | kx c
y
y0 ln y ln y y / y
y0
ln y ln( y) y / y y / y
| y | ec e kx y ce kx
where
ec y0
c e c y0
0 y0
Trivial solution!
[Example] y' = – 2 x y
dy
[Solution] dx =2xy
dy
y = 2x dx
ln |y| = – x2 + c
2
or |y| = exp{ -x + c }
2
or y = c' e–x
[Example]
y y / x y(1) 1
[Solution]
dy dx
ln | y | ln | x | c
y x
c
y
x
where
ec x, y 0 or x, y 0
c c
e x 0, y 0 or x 0, y 0
y(1) c 1
xy 1
[Exercises] Please solve the following equations
dy
(i) ex-y dx + 1 = 0
(ii) y’ = 2 x y ; y(0) = 1
xy + 3x - y - 3
(iii) y' = xy - 2x + 4y - 8
dy dx
[Solution] 2 = 2
y +1 x +1
tan–1y = – tan–1x + c
or tan–1x + tan–1y = c
x+y
or = tan c = c' general solution
1 xy
1x
or y = 1+x # particular solution
Let u=x+y y u 2 a 2
du dy
dx = 1 + dx
du 2 2
dx = 1+u + a
du
= dx
u + a2 + 1
2
du
and 2 2 = x+c
u +a +1
1 u
tan–1 = x+c
1+a2 1+a2
where c c 1 a 2
y kx
[Example] y' = x + ky where k = constant
y' = u + x u'
uk k (1 + u2)
u + x u' = 1 + ku ; or x u' = - 1 + ku
1 u dx
2 + 2 du + x = 0
k( 1 + u ) 1 + u
1 –1
k tan u + ln 1+u2 + ln |x| = c
1 –1 y
or k tan x + ln x2+y2 = c#
xy + 2y2
(i) y' = 2
x
y-x
(ii) y' = y + x
2 x-1 y - 3
(iii) y' =
2 y-1 x - 3
7x 3y 7
y' =
3x + 7y + 3
and t = x1 z = y
dy dz 7(x 1) 3y 7t3z
= = =
dx dt 3(x 1) + 7y 3 t + 7 z
dz 7t 3z
thus dt = –3t + 7z Case (2)
Ans: ( y + x 1 )5 ( y x + 1 )2 = C #
[Example] (y x + 5 ) y' = y x + 1
[Solution
u
Let u = y x + 1 y
u4
du dy
dx = dx – 1 = y' 1
y' = 1 + u'
(u + 4) (1 + u') = u
or ( u + 4 ) u' = –4
(u + 4) du =
4 dx + c
1 2
2 u + 4u + 4x = c
1 - 2y - 4x
[Exercise] Solve y' = 1 + y + 2x
h(t)
Outlet
V = A v t
v = 0.6 2gh
2
where g = acceleration of gravity = 980 cm/sec
h = height of water above the outlet
Note that V must equal to change of the volumes of water in the tank,
i.e.,
V = B h (Mass Balance)
i.e., A v t = – B h
h Av A 0.6 2gh
or = B =
t B
dh A 0.6 2gh
dt = B = 0.00266 h
we then have
[Solution] (y + 4) dx + x dy = 0
or M = y+4 ; N = x
M N
=1= Exact Differential
y x
Solve for u=
M dx + k(y)
u=
(y + 4) dx + k(y) = x y + 4x + k(y)
u
But = N(x,y)
y
or x + k'(y) = x
x y + 4x + c* = c
or x y + 4x = c'
du
y xy 4 0
dx
y4 M
y
x N
N = cos x sec2 y
M N
= sin x sec2 y = Exact Differential
y x
The solution is
u=
M dx + k(y)
=
(1 sin x tan y) dx + k(y)
= x + cos x tan y + k(y)
u
= N(x,y)
y
k'(y) = 0 or k(y) = c*
[Example] (4 x + 3 y2) dx + 2 x y dy = 0
P = 4 x + 3 y2 Q=2xy
P Q
=6y2y= not exact
y x
P Q
y x 6y2y 2
Check Q = 2xy = x = f(x)
2
x dx
F(x) = ef(x)dx = e = x2
(4 x3 + 3 x2 y2) dx + 2 x3 y dy = 0 Exact
x4+ x3 y2 = c
ex + e-x
Note that cosh x 2
ex - e-x
sinh x 2
and d cosh x/dx = sinh x
d sinh x/dx = cosh x
P = 2 cosh x cos y
Q = – sinh x sin y
P Q
= 2 cosh x sin y cosh x sin y =
y x
P Q
y x 2 cosh x sin y + cosh x sin y
Check =
Q sinh x sin y
cosh x
= sinh x = f(x)
cosh x
sinh x dx
F(x) = ef(x)dx = e = sinh x
sinh 2 x cos y k ( y )
u
and =FQ sinh2x sin y + k'(y) = - sinh2 x sin y
y
k 0 k(y) = constant
sinh2x cos y = c
[Exercise] x y dx + ( x2 + y2 + 1 ) dy = 0
2 2
[Exercise] ( y + x y + 1 ) dx + ( x + x y + 1 ) dy = 0
p(x) dx = e
e - 1 dx = e– x
e– x (y' y) = x2 e– x
or ( y e– x)' = x2 e– x
y e–x =
x2 e–x dx + c = c ( x2 + 2 x + 2 ) e–x
Since y(0) = 1 c = 3
y = e-
p(x) dx r(x) e p(x) dx
dx + c
= ex
x2 e–x dx + c
= c ex (x2 + 2x + 2)
dy 3
[Example] dx = x 2 x y y(1) = 1
p(x) dx 2x dx
e = e = ex 2
ex 2 y = 3 2
x ex dx + c
y = ex2
x ex dx + c
3 2
or
x 2 x 2 -1
e - x2
e c (integration by parts)
2
x2 1 -x2
y= 2 + c e
1 1
Since y(1) = 1 ce 1 , we have c = e
2
x2 1 1-x2
thus, y = +e
2
4. LAPLACE TRANSFORM
4.1 Definition and Basic Properties: initial value problem algebra problem solution of the
algebra problem solution of the initial value problem
1. Definition (Laplace Transform): The Laplace transform L[ f ]( s ) e st f (t )dt F ( s ) ,
0
1 1
Examples: f (t ) e at L[ f ]( s ) , s a . g (t ) sin t L[ f ]( s ) 2 .
sa s 1
g L1[G] .
6. Theorem: If L1 [ F ] f and L1[G] g and and are real numbers, then
L1[F G]( s) f g .
Theorem (Laplace transform of a derivative): Let f be continuous on [0, ) and suppose f '
is piecewise continuous on [0, k ] for every positive k. Suppose also that
Theorem (Laplace transform of a higher derivative): Suppose f , f ' , , f n1 are continuous
5 4t 1
Examples: y'4 y 1; y(0) 1 y e .
4 4
1 3 7
y"4 y'3 y e t ; y(0) 0, y' (0) 2 y e t e t e 3t .
8 4 8
Convolution
1 1 1 1
Example: L1 2
te 4t e 4t .
s ( s 4) 4 16 16
t 2
Determine f such that f (t ) 2t 2 f (t )e d 2t 2 t 3 .
0 3
1 1 1 1
y e 4t 2te 4t c t e 4t te 4t .
32 16 32 16
1 2
Example: y"2ty '4 y 1; y(0) y' (0) 0 y t .
2
Example 6
Solve
dy
3 2 y e x , y(0) 5
dx
Solution
Taking the Laplace transform of both sides, we get
dy
L 3 2 y L e x
dx
1
3[ sY ( s ) y (0)] 2Y ( s )
s 1
Using the initial condition, y(0) 5 we get
1
3[ sY ( s) 5] 2Y ( s)
s 1
1
(3s 2)Y ( s ) 15
s 1
15s 16
(3s 2)Y ( s)
s 1
15s 16
Y (s)
( s 1)(3s 2)
Writing the expression for Y (s) in terms of partial fractions
15s 16 A B
( s 1)(3s 2) s 1 3s 2
15 s 16 3 As 2 A Bs B
( s 1)(3s 2) ( s 1)(3s 2)
15s 16 3As 2 A Bs B
Equating coefficients of s 1 and s 0 gives
3 A B 15
2 A B 16
The solution to the above two simultaneous linear equations is
A 1
B 18
1 18
Y (s)
s 1 3s 2
1 6
s 1 s 0.666667
Taking the inverse Laplace transform on both sides
1 1 6
L1{Y ( s)} L1 L
s 1 s 0.666667
Since
1
L1 e
at
s a
The solution is given by
y( x) e x 6e 0.666667x
Example 7
Solve
dy
2 3 y e 1.5 x , y(0) 5
dx
Solution
Taking the Laplace transform of both sides, we get
dy
L 2 3 y L e 1.5 x
dx
1
2[ sY ( s) y (0)] 3Y ( s)
s 1.5
Using the initial condition y(0) 5 , we get
1
2[ sY ( s) 5] 3Y ( s)
s 1.5
1
(2s 3)Y ( s) 10
s 1.5
10 s 16
(2s 3)Y ( s)
s 1.5
10 s 16
Y (s)
( s 1.5)(2s 3)
10 s 16
2( s 1.5)( s 1.5)
10 s 16
2( s 1.5) 2
5s 8
( s 1.5) 2
Writing the expression for Y (s) in terms of partial fractions
5s 8 A B
( s 1.5) 2
s 1.5 ( s 1.5) 2
5s 8 As 1.5 A B
( s 1.5) 2
( s 1.5) 2
5s 8 As 1.5 A B
Equating coefficients of s 1 and s 0 gives
A5
1.5 A B 8
The solution to the above two simultaneous linear equations is
A5
B 0.5
5 0.5
Y ( s)
s 1.5 ( s 1.5) 2
Example 8
Solve
d2y dy dy
2 2
3 3.125 y sin x , y (0) 5, ( x 0) 3
dx dx dx
Solution
Taking the Laplace transform of both sides
d2y
L 2 2 3 3.125 y Lsin x
dy
dx dx
and knowing
d2y
L 2 s 2Y s sy 0 x 0
dy
dx dx
dy
L sY s y 0
dx
1
L(sin x) 2
s 1
we get
2s 2Y ( s) sy (0) ( x 0) 3sY ( s) y (0) 3.125Y ( s) 2
dy 1
dx s 1
2 s 2Y ( s ) 5s 3 3sY ( s ) 5 3.125Y ( s) 2
1
s 1
s2s 3 3.125Y (s) 10 s 21 2 1
s 1
s2s 3 3.125Y (s) 2 10 s 21
1
s 1
2s 2 3s 3.125 Y ( s)
22 10 s 3 10 s 21s 2
( s 2 1)
10 s 3 21s 2 10 s 22
Y ( s)
s 2 12s 2 3s 3.125
Writing the expression for Y (s) in terms of partial fractions
As B Cs D 10 s 3 21s 2 10 s 22
2s 2 3s 3.125 s 2 1 s 2 12s 2 3s 3.125
As 3 As Bs 2 B 2Cs 3 3Cs 2 3.125Cs 2 Ds 2 3Ds 3.125 D
2s 2 3s 3.125 s 2 1
10 s 21s 10 s 22
3 2
s 2 1 2s 2 3s 3.125
A 2C s 3
B 3C 2 D s A 3.125C 3D s B 3.125 D
2
s 2 1 2s 2 3s 3.125
10 s 21s 10 s 22
3 2
s 2 1 2s 2 3s 3.125
3 2 1 0
Equating terms of s , s , s and s gives
A 2C 10
B 3C 2D 21
A 3.125C 3D 10
B 3.125 D 22
The solution to the above four simultaneous linear equations is
A 10.584474
B 21.657534
C 0.292237
D 0.109589
Hence
10.584474 s 21.657534 0.292237 s 0.109589
Y ( s)
2s 2 3s 3.125 s2 1
2s 2 3s 3.125 2{( s 2 1.5s 0.5625) 1} 2{( s 0.75) 2 1}
10.584474 ( s 0.75) 13.719179 0.292237 s 0.109589
Y ( s)
2{( s 0.75) 2 1} s2 1
5.292237 ( s 0.75) 6.859589 0.292237 s 0.109589
{( s 0.75) 1}
2
{( s 0.75) 1}
2
( s 2 1) ( s 2 1)
Taking the inverse Laplace transform of both sides
5.292237 ( s 0.75) 6.859589
L1{Y ( s )} L1 L1
{( s 0.75) 1} {( s 0.75) 1
2 2
0.292237 s 1 0.109589
L1 L 2
s 1 s 1
2
s 0.75 1
L1{Y ( s )} 5.292237 L1 6.859589 L1
{( s 0.75) 1} {( s 0.75) 1
2 2
s 1 1
0.292237 L1 2 0.109589 L 2
s 1 s 1
Since
sa
L1 e ax cosbx
2
s a b
2
b
L1 e ax sin bx
2
s a b
2
1
L1 2 2
sin ax
s a
s
L1 2 2
cos ax
s a
The complete solution is
y ( x) 5.292237 e 0.75x cos x 6.8595859 e 0.75x sin x
0.292237 cos x 0.109589 sin x
e 0.75x 5.292237 cos x 6.859589 sin x 0.292237 cos x 0.109589 sin x
Example 9
Solve
d2y dy dy
2 2
6 3.125 y cos x , y (0) 5, ( x 0) 3
dx dx dx
Solution
Taking the Laplace transform of both sides
d2y
L 2 2 6 3.125 y Lcos x
dy
dx dx
and knowing
d2y
L 2 s 2Y s sy 0 x 0
dy
dx dx
dy
L sY s y 0
dx
s
L(cos x) 2
s 1
we get
2s 2Y ( s) sy (0) ( x 0) 6sY ( s) y (0) 3.125Y ( s) 2
dy s
dx s 1
2 s 2Y ( s) 5s 3 6sY ( s) 5 3.125Y ( s) 2
s
s 1
s(2s 6) 3.125Y (s) 2 10 s 36
s
s 1
2s 2 6s 3.125 Y ( s ) 36 10 s 3 11s 36 s 2
s2 1
10 s 3 36 s 2 11s 36
Y (s) 2
s 12s 2 6s 3.125
Writing the expression for Y (s) in terms of partial fractions
As B Cs D 10 s 3 36 s 2 11s 36
2s 2 6s 3.125 s 2 1 s 2 12s 2 6s 3.125
As 3 As Bs 2 B 2Cs 3 6Cs 2 3.125Cs 2 Ds 2 6 Ds 3.125 D
2s 2 6s 3.125 s 2 1
10 s 3 36 s 2 11s 36
s 2 1 2s 2 6s 3.125
A 2C s 3 B 6C 2 D s 2 A 3.125C 6 D s B 3.125 D
s 2
1 2s 2 6s 3.125
10 s 3 36 s 2 11s 36
s 2 1 2s 2 6s 3.125
3 2 1 0
Equating terms of s , s , s and s gives
A 2C 10
B 6C 2D 36
A 3.125C 6D 11
B 3.125 D 36
The solution to the above four simultaneous linear equations is
A 9.939622
B 35.496855
C 0.0301886
D 0.161006
Then
9.939622 s 35.496855 0.0301886 s 0.161006
Y ( s)
2s 2 6s 3.125 s2 1
2s 6s 3.125 2{( s 3s 2.25) 0.6875} 2{( s 1.5) 2 0.829156 2 }
2 2
9.939622 ( s 1.5) 20.587422 0.0301886 s 0.161006
Y ( s)
2{( s 1.5) 2 0.829156 2 } s2 1
4.969811( s 1.5) 10.293711
{( s 1.5) 0.829156 } {( s 1.5) 2 0.829156 2 }
2 2
0.0301886 s 0.161006
s2 1 s2 1
Taking the inverse Laplace transform on both sides
4.969811( s 1.5) 10.293711
L1{Y ( s )} L1 L1
2
{( s 1.5) 0.829156 } {( s 1.5) 0.829156
2 2 2
0.0301886 s 1 0.161006
L1 L 2
s 1 s 1
2
( s 1.5) 1
4.969811 L1 10.293711 L1
2
2
( s 1.5) 0.829156 ( s 1.5) 0.829156
2 2
s 1
0.0301886 L1 2 0.161006 L1 2
( s 1) ( s 1)
Since
sa
L1 e ax coshbx
2
s a b
2
1 1 ax
L1 e sinh bx
2
s a b b
2
1 1
L1 2 2
sin ax
s a a
s
L1 2 2
cos ax
s a
The complete solution is
10.293711 1.5 x
y( x) 4.969811e 1.5 x cosh(0.829156 x) e sinh( 0.829156 x)
0.829156
0.0301886 cos x 0.161006 sin x
e 0.829156x e 0.829156x e 0.829156x e 0.829156x
e 1.5 x 4.969811 12.414685
2 2
0.030188 cos x 0.161006 sin x
e 1.5 x 8.692248 e 0.829156x 3.722437 e 0.829156x 0.0301886 cos x
0.161006 sin x
Example 10
Solve
d2y dy dy
2 2
5 3.125 y e x sin x , y (0) 5, ( x 0) 3
dx dx dx
Solution
Taking the Laplace transform of both sides
d2y
dy
L 2 2 5 3.125 y L e x sin x
dx dx
knowing
d2y
L 2 s 2Y s sy 0 x 0
dy
dx dx
dy
L sY s y 0
dx
1
L(e x sin x)
( s 1) 2 1
we get
2 s 2Y ( s) sy (0) ( x 0) 5sY ( s) y (0) 3.125Y ( s)
dy 1
dx ( s 1) 2 1
2 s 2Y ( s) 5s 3 5sY ( s) 5 3.125Y ( s)
1
( s 1) 2 1
2s 2
63 10 s 3 82 s 51s 2
5s 3.125 Y ( s )
s 2 2s 2
10 s 3 51s 2 82 s 63
Y ( s) 2
s 2s 2 2s 2 5s 3.125
Writing the expression for Y (s) in terms of partial fractions
As B Cs D 10 s 3 51s 2 82 s 63
2s 2 5s 3.125 s 2 2s 2 s 2 2s 22s 2 5s 3.125
2Cs 3 5Cs 2 3.125Cs 2 Ds 2 5Ds 3.125 D As 3 2 As 2 2 As Bs 2 2 Bs 2 B
2s 2 5s 3.125 s 2 2s 2
10 s 51s 82 s 63
3 2
s 2s 2 2s 2 5s 3.125
2
2C As 3 5C 2 D 2 A B s 2 3.125C 5D 2 A 2 B s 3.125 D 2 B
s 2
2s 2 2s 2 5s 3.125
10 s 3 51s 2 82 s 63
s 2 2s 2 2s 2 5s 3.125
3 2 1 0
Equating terms of s , s , s and s gives four simultaneous linear equations
2C A 10
5C 2D 2 A B 51
3.125C 5D 2 A 2B 82
3.125 D 2B 63
The solution to the above four simultaneous linear equations is
A 10.442906
B 32.494809
C 0.221453
D 0.636678
Then
10.442906 s 32.494809 0.221453 s 0.636678
Y ( s)
2s 2 5s 3.125 s 2 2s 2
2s 5s 3.125 2{( s 2.5s 1.5625)} 2( s 1.25) 2
2 2
b
L1 2
e ax sin bx
s a b
2
1
L1 e
ax
s a
1 e ax x n 1
L1
n
( s a) (n 1)!
The complete solution is
y ( x) 5.221453 e 1.25x 9.720588 e 1.25x x 0.221453 e x cos x
0.415225 e x sin x
e 1.25x 5.221453 9.720588 x e x (0.221453 cos x 0.415225 sin x)
Exact
solution
y0 y1 y2
x
x0 x1 x2 x3 ……
yi 1 yi dx f ( x, y) dx
x dx i x i
xi 1
yi 1 yi f ( x, y )dx
xi
yi 1 yi hf ( xi , yi ) with h xi 1 xi
y
yi yi+1
x
xi xi+1
h
yi 1 yi hf ( xi , yi ) , yi 1 yi [ f ( xi , yi ) f ( xi 1 , yi 1 )]
2
Differential equation
π π
xy y 2 x 2 cos 2 x 0 , y ( )
4 4
y ( x) x sin 2 x
0.5
0
Exact
0.5 1.5 2.5 Euler
-0.5
Modified Euler
Mid-point Euler
-1
-1.5
-2
-2.5 x