Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

DIFFERENTIAL EQUATIONS.

Independence of Functions : The Wronskian.

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!

This determinant is called the Wronskian.


f g
! W[f(x), g(x)] "
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.

This can be extended to third order differential equations.


Three functions are linearly dependent if there are 3 constants a, b and c such that
a f (x) + b g(x) + c h(x) = 0
a f !(x) + b g!(x) + c h!(x) = 0
a f !!(x) + b g!!(x) + c h!!(x) = 0 .
Therefore the Wronskian for three functions is
f g h
W[f , g, h] ! f" g" h" .
f "" g"" h""

If W[f, g, h] ! 0 then the solutions f, g, h are linearly independent.


If W[f, g, h] = 0 then the solutions f, g, h are linearly dependent.

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 .

Suppose one solution y1 (x) is known,

! y1"" + P(x) y1" + Q(x) y1 = 0

! y = Cy1 is a solution

where C is any constant.


Now let y = !(x) y1

- replaced constant C by φ(x)


- this is called varying coefficients.

! if y = "(x) y1

then y! = "!y1 + "y1!

and y!! = "!!y1 + "!y1! + "!y1! + "y1!!

! y"" = #""y1 + 2#"y1" + #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 + #" ( 2y " + Py ) + # ( y "" + Py " + Qy ) = 0 .


1 1 1 1 1

But as y1 is a solution then y1!! + Py1! + Qy1 = 0 .

(
! #""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

This gives us a first order differential equation for "! .

1 d#" 2 dy1
! = - - P.
#" dx y1 dx

Integrating both sides with respect to x gives


$ 1 d"! $ 2 dy1
& "! dx dx = - & y dx dx -
% % 1
# P dx .
%1 % 1
! ' d#" = - 2' dy1 - $ P dx
& #" & y1

! ln #" = - 2 ln y1 - $ P dx + K

constant

! ln #" = ln y1- 2 - $ P dx + K.

Taking exponentials of both sides gives


ln y1- 2 - # P dx + K
e ln " ! = e .
ln y1- 2 - P dx
! e ln # " = e e $ eK
- P dx
! #" = y1- 2e $ e 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

Is this y2 really linearly independent of the first solution y1 ?

If y1 and y2 are linearly independent then W[y1 , y2 ] ! 0 .

Therefore we need to look at W[y1 , y2 ] .

Therefore we need to look at y1 y2! - y1! y2 .

" 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

Now W[y1 , y2 ] = y1 y2! - y1! y2

& # e- " P dx e " )


- P dx
# e- " P dx
!
= y1 ( y1 % dx + !
+ - y1 y1 % dx
2 % y2
(' % $ y1
y1
+
* $ 1

# e- " P dx - " P dx # e- " P dx


= y1 y1! % dx + e - y1 y1! % dx
% y2 % y2
$ 1 $ 1
- P dx
= e ! .
- P dx
! W = e " # 0 as e z > 0 .
! y1 and y 2 are linearly independent.

133
Example.
Solve y !! - 4y ! + 4y = 0 .

Try y = e kx .

! y" = ke kx and y"" = k 2e kx .


Substitute the expressions for y, y! and y!! into differential equation to find k.

! 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

! y" = #"e 2x + 2#e 2x

! y"" = #""e 2x + 2#"e 2x + 2#"e 2x + 4#e 2x

! y"" = #""e 2x + 4#"e 2x + 4#e 2x .


Substituting y, y! and y!! back into the differential equation gives

("!!e 2x
+ 4"!e 2x + 4"e 2x ) (
- 4 "!e 2x + 2"e 2x ) + 4"e 2x = 0

! #""e 2x + 4#"e 2x + 4#e 2x - 4#"e 2x - 8#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

! y = (Ax + B)e 2x = Axe 2x + Be 2x

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 λ.

! x 2 "(" - 1) x " - 2 - 3x" x " - 1 + 4x " = 0

! "(" - 1) x " - 3" x " + 4x " = 0

! #$ "(" - 1) - 3" + 4 %& x " = 0

! #$ " 2 - " - 3" + 4 %& x " = 0

! #$ " 2 - 4" + 4 %& x " = 0

! " 2 - 4" + 4 = 0 as we do not want x " = 0


! (" - 2)2 = 0
! " = 2

! y1 = x 2 .

To find the second solution y2 , use variation of parameters.

! let y = "(x) x 2

! y" = #" x 2 + 2# x

! y"" = #"" x 2 + 2#" x + 2#" x + 2#

! y"" = #"" x 2 + 4#" x + 2#


Substituting y, y! and y!! back into the differential equation gives

( ) (
x 2 "!! x 2 + 4"! x + 2" - 3x "! x 2 + 2" x ) + 4" x 2 = 0

! #"" x 4 + 4#" x 3 + 2# x 2 - 3#" x 3 - 6# x 2 + 4# x 2 = 0

136
( ) (
! x 4#"" + 4x 3 - 3x 3 #" + 2x 2 - 6x 2 + 4x 2 # = 0 )
! x 4#"" + x 3 #" + 0 $ # = 0

this must be zero


! x 4#"" = - x 3 #"

#"" 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 .

First rewrite the differential equation into the correct form.


3 4
! y"" - y" + 2 y = 0
x x
3
! P = -
x
# 3
- % - dx % dx #3
- P dx
! e " = e $ x = e$ x
3
= e3ln x = e ln x
= x3
" x3
! y2 (x) = A x 2 $ 2 2 dx
# (x )
3
!x
= A x 2 # 4 dx
"x

!1
= A x 2 # dx
"x

! y 2 (x) = Ax 2 lnx

But y = y1 + y2

! y(x) = Ax 2 lnx + Bx 2 .

Exercise : In the above examples


(i) check that these are solutions to the respective differential equations
(ii) check that the Wronskians are non-zero.

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

! y" = #" e3x + 3#e3x .


Substituting the above expressions for y and y! back into the original
differential equation gives

("! e 3x
+ 3"e3x ) - 3"e3x = 4e5x

! #" e3x + 3#e3x - 3#e3x = 4e5x

(
! #" e3x + 3e3x - 3e3x # = 4e5x )
! #" e3x + 0 $ # = 4e5x

this must be zero


! #" e3x = 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 .

particular solution homogeneous solution

142
Example.
Solve xy ! - 4y = 3x7
First find the solution to the homogeneous equation
xY! - 4Y = 0 .
Try Y = x ! .
! Y" = # x # - 1

! x " x" - 1 - 4 x" = 0

! " x" - 4 x" = 0

! (" - 4) x " = 0

! " = 4 as we do not want x " = 0


! Y = x4 .
Next find the particular solution.
Let y(x) = !(x) Y

! 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

this must be zero


! x 5 #" = 3x 7

143
3x 7
! #" =
x5
d"
! = 3x 2
dx
2
! " = # 3x dx

! "(x) = x 3 + C where C is a constant

! y(x) = "(x) x 4

! y(x) = (x 3
)
+ C x4

! y(x) = x 7 + C x 4

particular solution homogeneous solution

144

You might also like