Professional Documents
Culture Documents
Differential Equations1
Differential Equations1
From first year you know that a second order differential equation has two independent
solutions, a third order differential equation has three independent solutions and so on.
What does “independent solution” mean ?
An independent solution is a solution that cannot be expressed as a linear combination of
the other solutions.
Example.
Suppose we have found three solutions to a third order differential equation.
These three solutions are y1 = 2x, y2 = 4 sin x, y3 = 6x + 2 sin x .
Are these solutions independent ?
1
Clearly y3 = 3y1 + y .
2 2
Therefore y1 , y2 , y3 are dependent solutions.
Example.
Suppose we have found three solutions to a third order differential equation.
These three solutions are y1 = 2x, y2 = 5x 2 , y3 = 3e x .
Are these solutions independent ?
Clearly y1 cannot be expressed as a linear combination of y2 and y3.
Therefore y1 , y2 , y3 are independent solutions.
127
Want some reliable method for testing for independent solutions.
Suppose two functions f(x) and g(x) are linearly dependent.
Therefore there are 2 non-zero constants a and b such that, for all x,
a f (x) + b g(x) = 0
and differentiating this equation gives
a f !(x) + b g!(x) = 0 .
Rewriting these two equations where a and b are the unknowns gives
f (x) a + g(x) b = 0
f !(x) a + g!(x) b = 0 .
This is a set of two linear equations in the two unknowns a and b.
This set of equations can be written in matrix form :
" f g % "a % "0 %
$ '$ ' = $ '.
# f ! g! & # b & #0 &
Remember from first year that the condition for non-zero solutions for a and b is that
f g
= 0.
f ! g!
= f g! - f !g .
This means that if W ! 0 for all x, then the functions f and g are linearly dependent.
If W ! 0 , then f and g are linearly independent.
Therefore if we have found two solutions to a second order differential equation and want
to determine if they linearly independent, simply evaluate their Wronskian;
and if W ! 0 , they are linearly independent
and if W = 0 , they are linearly dependent.
128
Example.
d2y
+ 4y = 0 has two solutions y = cos 2x and y = sin 2x .
dx 2
Are these solutions linearly independent ?
cos 2x sin 2x
W[cos2x, sin2x] =
- 2sin 2x 2cos 2x
= 2cos 2 2x + 2sin 2 2x
(
= 2 cos 2 2x + sin 2 2x )
= 2 ! 0.
Therefore these two solutions are linearly independent solutions.
129
Solving Differential Equations.
In Maths 1B you learnt how to solve second order differential equations with constant
coefficients :
a y!! + b y! + c y = f(x)
d2y dy
or a 2
+ b + cy = f(x)
dx dx
where a, b and c are all constants.
We now want a way of solving a second order differential equation where the coefficients
are not constants but are functions of x.
Therefore we want to solve
y!! + P(x) y! + Q(x) y = 0 (*)
d2y dy
or 2
+ P(x) + Q(x)y = 0 . (*)
dx dx
Variation of parameters is a general method for finding a second solution to (*) once one
solution is known.
130
Variation of Parameters.
Consider the equation
y!! + P(x) y! + Q(x) y = 0 .
! y = Cy1 is a solution
! if y = "(x) y1
Substituting y, y! and y!! back into the original differential equation gives
("!!y1
+ 2"!y1! + "y1!! ) + P ("!y + "y ! ) + Q" y = 0
1 1 1
(
! #""y1 + #" 2y1" + Py1 ) + #$0 = 0
! #""y = - #" ( 2y " + Py )
1 1 1
(no φ terms)
!
#""
= -
( 2y " + Py )
1 1
#" y1
131
#"" 2y "
! = - 1 - P
#" y1
d
but "!! = "! = "! !
( ) ( )
dx
!
(#" )" = -
2y1"
- P.
#" y1
1 d#" 2 dy1
! = - - P.
#" dx y1 dx
! ln #" = - 2 ln y1 - $ P dx + K
constant
! ln #" = ln y1- 2 - $ P dx + K.
Let e K = A , then
d! A - " P dx
= e
dx y12
( A - P dx
! "(x) = * 2 $ e # & dx .
) y1 % '
132
But y2 (x) = !(x) y1 (x) so
" e - ! P dx
y 2 (x) = Ay1 (x) $ dx .
$ y2
# 1
" e- ! P dx
Now y2 (x) = y1 (x) $ dx .
$ y2
# 1
$ e- # P dx d '$ e- # P dx *
! y2" = y1" & dx + y1
)& dx ,
& y2 dx ) & y2 ,
% 1 (% 1 +
# e- " P dx - P dx
e "
!
= y1 % dx + y1 .
% y2 y12
$ 1
$ e- # P dx - P dx
e #
! y2" = y1" & dx + .
& y2 y
% 1 1
133
Example.
Solve y !! - 4y ! + 4y = 0 .
Try y = e kx .
! k 2e kx - 4ke kx + 4e kx = 0
! (k 2 - 4k + 4)e kx = 0
! k 2 - 4k + 4 = 0 as e kx " 0
! (k - 2)2 = 0
! k = 2
! y1 = e 2x
! let y = "(x)e 2x
("!!e 2x
+ 4"!e 2x + 4"e 2x ) (
- 4 "!e 2x + 2"e 2x ) + 4"e 2x = 0
(
! #""e 2x + #" 4e 2x - 4e 2x ) (
+ # 4e 2x - 8e 2x + 4e 2x ) = 0
! #""e 2x + #" $ 0 + # $ 0 = 0
this must always be zero
! #""e 2x = 0
! #"" = 0 as e 2x $ 0
! #" = A , where A is a constant
! " = Ax + B , where B is a constant
134
But y = ! y1
But y = y2 + y1 and y1 = e 2x
! y 2 = xe 2x .
135
Example.
Solve x 2 y !! - 3xy ! + 4y = 0 .
When you have a differential equation which has terms in x 2 y!!, xy! and y then
the solutions are usually in the form y = x ! .
! let y = x "
! y" = # x # - 1
! y"" = #(# - 1) x # - 2
Substitute the expressions for y, y! and y!! into differential equation to find λ.
! y1 = x 2 .
! let y = "(x) x 2
! y" = #" x 2 + 2# x
( ) (
x 2 "!! x 2 + 4"! x + 2" - 3x "! x 2 + 2" x ) + 4" x 2 = 0
136
( ) (
! x 4#"" + 4x 3 - 3x 3 #" + 2x 2 - 6x 2 + 4x 2 # = 0 )
! x 4#"" + x 3 #" + 0 $ # = 0
#"" x3
! = - 4
#" x
1 d#" 1
! = -
#" dx x
Integrate both sides with respect to x
$ 1 d#" $1
! & dx = - & dx
% #" dx %x
$1 $1
! & d#" = - & dx
% #" %x
! ln #" = - ln x + C .
! ln #" = ln x - 1 + C
Taking exponentials of both sides gives
-1
e ln " ! = e ln x + C
-1
! e ln # " = e ln x eC
! #" = B x - 1 where B = eC
#1
! " = B% dx
$x
! " = Bln x + D where D is a constant.
But y = ! y1
! y = ( Bln x )
+ D x2
! y = Bx 2 lnx + Dx 2
But y = y2 + y1 y1
! y 2 = Bx 2 lnx .
137
From Variation of Parameters
if y!! + P(x) y! + Q(x) y = 0
" e- ! P dx
then y2 (x) = Ay1 (x)$ dx .
$ y2
# 1
Example 1.
y!! - 4 y! + 4y = 0 and y1 = e 2x .
! P = -4
- P dx - - 4 dx 4 dx
! e " = e " = e" = e 4x
" e 4x
! y2 (x) = A e 2x $ dx
$ 2x 2
# e ( )
4x
!e
2x
= A e # 4x dx
"e
= A e 2x ! 1 dx
! y 2 (x) = A x e 2x
But y = y1 + y2
! y(x) = Be 2x + A x e 2x .
138
Example 2.
x 2 y!! - 3x y! + 4 y = 0 and y1 = x 2 .
!1
= A x 2 # dx
"x
! y 2 (x) = Ax 2 lnx
But y = y1 + y2
! y(x) = Ax 2 lnx + Bx 2 .
139
Variation of Parameters can also be used to find a particular solution to an inhomogeneous
linear first order differential equation when the solution to the homogeneous differential
equation is known.
! consider the differential equation
y! + f(x) y = g(x) .
Let Y(x) be the solution to the homogeneous equation, that is
Y! + f Y = 0 .
Let y = !(x)Y
! y" = #" Y + # Y" .
Substituting the above expressions for y and y! back into the original differential
equation gives
("! Y + )
" Y! + f " Y = g
! #" Y + # Y" + f # Y = g
! #" Y + (Y" + f Y)# = g .
But Y! + f Y = 0
! #" Y = g
d" g
! =
dx Y
#g
! " = % dx
$Y
But y P = ! Y
" g(x)
! y p (x) = Y(x)$ dx which is the particular solution.
# Y(x)
140
Example.
dy
Solve - 3y = 4e5x .
dx
First find the solution to the homogeneous equation
dY
- 3Y = 0
dx
dY
! = 3Y separable equation
dx
" dY
! $ = 3% 1 dx
# Y
! ln Y = 3x + K .
Taking exponentials of both sides gives
! e ln Y = e3x + K
! Y = e3x e K
! Y = Ae3x where A = e K .
Next find the particular solution.
Let y(x) = !(x)Y .
! y = "e3x
("! e 3x
+ 3"e3x ) - 3"e3x = 4e5x
(
! #" e3x + 3e3x - 3e3x # = 4e5x )
! #" e3x + 0 $ # = 4e5x
141
4e5x
! #" =
e3x
! #" = 4e5x - 3x
d"
! = 4e 2x
dx
2x
! " = # 4e dx
! "(x) = 2e 2x + C
(
! y(x) = 2e 2x + C e3x )
! y(x) = 2e 2x e3x + Ce3x
! y(x) = 2e 5x + C e 3x .
142
Example.
Solve xy ! - 4y = 3x7
First find the solution to the homogeneous equation
xY! - 4Y = 0 .
Try Y = x ! .
! Y" = # x # - 1
! (" - 4) x " = 0
! y = " x4
! y" = #" x 4 + 4x 3 # .
Substituting the above expressions for y and y! back into the original
differential equation gives
( )
x "! x 4 + 4x 3 " - 4" x 4 = 3x 7
! x #" x 4 + x 4x 3 # - 4# x 4 = 3x 7
! #" x 5 + 4x 4 # - 4x 4 # = 3x 7
(
! #" x 5 + # 4x 4 - 4x 4 ) = 3x 7
! #" x 5 + 0 $ # = 3x 7
143
3x 7
! #" =
x5
d"
! = 3x 2
dx
2
! " = # 3x dx
! y(x) = "(x) x 4
! y(x) = (x 3
)
+ C x4
! y(x) = x 7 + C x 4
144