Nothing Special   »   [go: up one dir, main page]

Lecture 5

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

Section 3

Ordinary Differential
Equations-
Second Order Equations
Second order linear differential equations
A second order linear differential equation can be written in the form

a0(x) y″ + a1(x) y′ + a2(x) y = f(x)

The method of solution is highly dependent upon the shape of the functions a0(x), a1(x),
a2(x), as well as f(x). Despite this there is one topic that is common to all shapes of the
function.

Linear dependence, Wronskian

We have seen earlier that for the differential equation y″ + y = 0, y1 = c1sin x, y2 = c2cos x,
y3 = c3sin x + c4cos x are all solutions of the differential equation. A very relevant
question is that: Are these different solutions, or are these combinations of each other?

Let us assume that y0, y1, y2, . . ., yn are solutions of a linear differential equation. Then
any linear combination of these functions

a0y0 + a1y1 + a2y2 + a3y3 + . . . + anyn

where a0, a1, a2, . . ., an, are constants, is also a solution of the same differential equation.

If a linear combination

a0y0 + a1y1 + a2y2 + a3y3 + . . . + anyn = 0 (21)

where not all constants are zero, then the functions y0, y1, y2, . . ., yn are dependent. If the
only way to satisfy equation (21) is a0 = a1 = a2 = . . . = an = 0, then the functions y0, y1,
y2, . . ., yn are independent.

To find the values of the constant a0, a1, a2, . . ., an, we differentiate equation (21) n – 1
times to obtain

a 0 y 0  a1 y1  a 2 y 2  . . .  a n y n  0 (21a)
a 0 y 0  a1 y1  a 2 y 2  . . .  a n y n  0 (21b)
a 0 y 0  a1 y1  a 2 y 2  . . .  a n y n  0 (21c)
. . . .
a 0 y 0( n  1)  a1 y1( n  1)  a 2 y 2( n  1)  . . .  a n y n( n  1)  0 (21m)

Equation (21)–(21m) forms a homogeneous system of linear equation. As e discussed in


our lecture on matrices, this system will have a non-trivial solution for a0, a1, a2, . . ., an
only if the system is forced to become dependent. This means that we have to ensure that
the rank of the system is not n. Therefore,
y0 y1 y2 ... yn
y 0 y1 y 2 ... y n
y 0 y1 y 2 ... y n  0 (22)
... ... ... ... ...
y 0( n  1) y1( n  1) y 2( n  1) . . . y n( n  1)
The determinant in equation (22) is called the Wronskian, W(y0, y1, y2, . . ., yn).

To determine if a given set of functions y0, y1, y2, . . ., yn is dependent or independent, we


differentiate the functions n – 1 times. The Wronskian determinant is calculated. If the
Wronskian is zero, this means that the system of linear equation (21)–(21m) will have a
non-trivial solution. This means that the set of functions y0, y1, y2, . . ., yn is dependent.
On the other hand, if the Wronskian is non-zero, this means that the only solution the
system of linear equation (21)–(21m) will have is a trivial solution. This means that the
set of functions y0, y1, y2, . . ., yn is independent.

Exercise
Find the Wronskian for the given set of function
1. e 2t , e 3t / 2
2. cos t , sin t
3. e 2t , te 2t
4. e t sin t , e t cos t
5. cos 2 t , (1  cos 2t )

Second order differential equations


Homogeneous, linear, constant coefficient

A second order linear homogeneous differential equation with constant coefficient


structurally looks like

 y″ +  y′ +  y = 0 (1)

where ,  and  are constants. An example of this kind of differential equation is

2y″ + 4y′ + 8y = 0 (2)

Let us try to contemplate upon the type and shape of the functions that could form the
solution of equation (2). The differential equation will be defined in a particular domain,
e.g., a < x < b. The solution to equation (2) must be applicable to all the points within the
domain. If f(x) is a solution of equation (2), this equation tells us that the function f(x), its
first derivative and seconds derivative must combine to give us 0! If we select any
arbitrary function, e.g. f(x) = x2 + e–x log x. If we differentiate f(x) twice and substitute in
equation (2), we can always solve the resulting expression and find a value of x such that
the expression computes to 0. But that does not serve our purpose, as we are not looking
for function that will compute to 0 at particular point(s), but function that will compute to
0 at all point!

This brief discussion lead us to conclude that the solution should be such a function f(x)
whose first and second derivatives should be like the function f(x) itself. Such a function
in general is the exponential erx.

Therefore to obtain solution of equation (1), we assume that the solution is like

y = erx (3)

We differentiate this to obtain y′ = r erx, and y″ = r2 erx. We substitute the results in


equation (1). This will result in

erx ( r2 +  r + ) = 0 (4)

If equation (4) is to be 0, that is possible either if erx = 0, or ( r2 +  r + ) = 0. The first


one is not possible, as that will lead to a trivial solution. Therefore to satisfy equation (4)

 r2 +  r +  = 0 (5)

Equation (5) is called the characteristic equation. Equation (5) is a quadratic equation
which can be solved to obtain two roots r1 and r2. This means that the solution of
equation (1) of type assumed in equation (3) is possible for certain values of r only. As
these values are special, these are also referred to as eigenvalues. The resulting functions
are referred to as eigenfunctions.

There are three possibilities of roots for equation (5): real distinctly different, complex
conjugate, and equal.

Case 1. Real roots.

In this case, we have two real roots r1 and r2. These roots correspond to eigenfunctions
y1  e r1 x , and y1  e r2 x . Therefore the general solution is

y  c1e r1 x  c 2 e r2 x (6)

Example

Find the solution of the boundary value problem 2y″ + y′ – 6 = 0, y(0) = 0, y(1) = 1.
We assume the solution to be of the type y = erx. Differentiating this twice and
substituting into the differential equation would lead to the characteristics equation.

2r2 + r – 6 = 0 (7)

3
This equation has two roots, r1 = 2, and r2 = . Corresponding to these two eigenvalues,
2
3
x
we obtain eigenfunctions y1  e 2 x , and y 2  e 2 . Therefore the general solution is,

3
x
y  c1e 2 x  c 2 e 2 (8)

Substituting the boundary conditions, we obtain two relationships

c1 + c2 = 0
c1e2 + c2e3/2 = 1

solving these two we obtain the values of the constants to be


1 1
c1  2 , and c 2   2 .
e e 3/ 2
e  e3/ 2

Substituting into the general solution in equation (8), we obtain the specific solution,
3
x
e2x  e 2
y 3

e e2 2

Exercise
1. y   2 y   3 y  0
2. y  3 y  2 y  0
3. 6 y   y   y  0
4. y   5 y   0
5. 4 y   9 y   0
6. y  2 y  2 y  0
7. y   y   2 y  0 y(0) = 1, y′(0) = 1
8. y   4 y   3 y  0 y(0) = 2, y′(0) = –1
9. y  3 y   0 y(0) = –2, y′(0) = 3
10. 2 y  y  4 y  0 y(0) = 0, y′(0) = 1
11. 4 y   y  0 y(1) = 1, y′(1) = 0
12. y   8 y   9 y  0 y(–2) = 1, y′(–2) = –1
Case 2. Complex conjugate roots

In this we have complex conjugate root of the characteristic equation. Let us assume that
the roots are r1 =  + i, and r2 =  – i. Therefore the eigenfunctions are,
y1 = e + i, and y2 = e – i.

Before proceeding forward we should foresee that to simplify the general solution with
the eigenfunctions appearing above, we would encounter terms like ei. We convert this
term to a more manageable expression by using Euler’s formula

ei = cos + i sin

Using Euler formula, we can write the general solution to be

y = ex(c1cosx + c2sinx)

In this case, the eigenfunctions are considered to be y1 = excosx, and y2 = exsinx.

Example

Find the specific solution of the initial value problem

y″ – 4y′ + 13 = 0, y(0) = 0, y′(0) = 1

We assume the solution to be of the type y = erx. Differentiating this twice and
substituting into the differential equation would lead to the characteristics equation.

r2 – 4r + 13 = 0 (9)

This equation has two roots, r1 = 2 + 3i, and r2 = 2 – 3i. Therefore the general solution is

y = ex(c1cosx + c2sinx) (10)

To be able to use the initial conditions, we differentiate equation (10) to obtain the first
derivative.

y′ = 2ex(c1cosx + c2sinx) + 3ex(–c1sinx + c2cosx) (11)

Substituting the first initial condition, we obtain from equation (10) c1 = 0. Substituting
the second initial condition in equation (11), we obtain c2 = 1/3. Therefore, we obtain the
specific solution.
1
y  e 2 x sin 3 x
3

Exercise
1. y   2 y   2 y  0
2. y  2 y  6 y  0
3. y  2 y  2 y  0
4. y   6 y   13 y  0
5. y  2 y  1.25 y  0
6. 9 y  9 y  4 y  0
7. y   4 y   6.25 y  0
8. y   4 y  0 y(0) = 0, y′(0) = 1
9. y   2 y   5 y  0 y(/2) = 0, y′(/2) = 2
10. y   y  0 y(/3) = 0, y′(/3) = –4
11. y  2 y  2 y  0 y(/4) = 2, y′(/4) = –2
12. 3 y   y   2 y  0 y() = 2, y′() = 1

Case 3, Repeated roots.

In this case, r1 = r2 = r. Therefore, we end up with only one eigenfunction, y1 = erx. To


obtain the second eigenfunction, method of variation of parameters is used.

Using variation of parameters, the second eigenfunction is obtained as y2 = xerx. These are
two eigenfunctions.

Example

Find the specific solution of the boundary value problem

y″ + 4y′ + 4y = 0, y(0) = 1, y(1) = 0

Assuming that the solution is of the type y = erx, differentiating this function twice, and
substituting into the differential equation would lead to the characteristic equation

r2 + 4r + 4 = 0

Therefore the repeated root is r = –2. The general solution is

y = c1e–2x + c2xe–2x = e–2x (c1 + c2x) (12)

Substituting first condition, we obtain c1 = 1. Substituting the second condition leads to e–


2
(1 + c2) = 0. This will lead to c2 = –1. Therefore, the specific solution is
y = e–2x (1 – x)

Exercise
1. y   2 y   y  0
2. 9 y   6 y   y  0
3. 4 y   4 y   3 y  0
4. y  2 y   10 y  0
5. y  6 y  9 y  0
6. 4 y   17 y   4 y  0
7. 16 y   24 y   9 y  0
8. 2 y  2 y  y  0
9. 9 y   12 y   4 y  0 y(0) = 2, y′(0) = –1
10. y   6 y   9 y  0 y(0) = 0, y′(0) = 2
11. y4 y  4 y  0 y(–1) = 2, y′(–1) = 1

Second order differential equations


Nonhomogeneous, linear, constant coefficient

A second order linear differential equation with constant coefficient structurally looks
like

 y″ +  y′ +  y = f(x) (13)

where ,  and  are constants as in equation (1), and f(x) is a function of x. It is


understood that the function f(x) can have innumerable different shapes. Obviously, it is
wrong to think that a solution can be obtained for all functions f(x). We will attempt to
obtain solution for equation (13) only when the function f(x) is (i) a polynomial, (ii) an
exponential, and (iii) combinations of sines and cosines. We see the method of solution
through examples.

Example 1.

Find the general solution of the equation

y″ + 5y′ + 6y = e2x (14)

To find a solution to equation (14), we first find the solution of the corresponding
homogeneous equation

y″ + 5y′ + 6y = 0 (15)
The argument for this is as follows. Suppose by solving equation (14), we obtain the
solution to be h(x), and by solving equation (15) we obtain the solution to be g(x). Now if
we substitute h(x) on left side of equation (14), we will obtain e2x on the right hand side.
On the other hand, if we substitute g(x) on the left hand side, we will obtain 0!. This
means g(x) contributes only 0 to the right hand side, and a combination of h(x) + g(x) will
also result in e2x. Therefore, g(x) could be part of the solution!

The solution to equation (15) is

yh = c1e–2x + c2e–3x (16)

This solution is referred to as the homogeneous solution. To obtain the solution of the
nonlinear equation (with the right hand side), there are actually two methods which are
used widely for this purpose. The first one is the Method of Undetermined Constants, and
the second is the Method of Variation of Parameters. We will concentrate on the method
of undetermined constants.

In a nutshell, the method involves assuming a solution that will correspond to the
particular type of f(x) in equation (13). The assumed solution will contain certain
undetermined constants. The assumed solution is substituted into equation (13). This will
hopefully determine the undetermined constants.

For f(x) = e2x in equation (14), we assume the solution to be yp = Ae2x. This solution is
referred to as the particular solution. We substitute yp into equation (14). For this
purpose, we obtain y p  2 Ae 2 x , and y p  4 Ae 2 x . Substituting these into equation (14),
we obtain

4Ae2x + 10Ae2x + 6Ae2x = e2x


or 20Ae2x = e2x
1
or A=
20

1 2x
Therefore, y p  e . Finally, the general solution is
7

1 2x
y = c1e–2x + c2e–3x + e
20

Example 2

Find the general solution for


y″ + 5y′ + 6y = 3 sin2x (17)

We have already obtained the homogeneous solution in the last problem. For the
particular solution, we will assume
yp = Asin2x + Bcos2x (18)

To substitute into equation (17), we differentiate equation (18)

y p  2 A cos 2 x  2 B sin 2 x , and


y p   4 A sin 2 x  4 B cos 2 x

Substituting into equation (17), we obtain

(–4Asin2x – 4Bcos2x) + 5(2Acos2x – 2Bsin2x) + 6(Asin2x + Bcos2x) = 3sin2x

Collecting sine and cosine terms separately, we obtain

(2A – 10B) sin2x + (10A + 2B) cos 2x = 3 sin 2x

Equating coefficients on both sides,

2A – 10B = 3
and 10A + 2B = 0

15 3
Solving these equation, we obtain A   , and B  . Therefore, the particular
52 52
solution is
15 3
yp   sin 2 x  cos 2 x
52 52
Finally, the general solution is

15 3
y = c1e–2x + c2e–3x  sin 2 x  cos 2 x
52 52

Example 3

We will look into polynomial for of f(x) in this example. We will consider the same left
hand side from the previous examples. Let us consider f(x) = 3x3 + 4x2 – 2x + 4.

For a polynomial form of f(x), we will start the particular solution with a polynomial of
same order as f(x). Therefore, we will assume

yp = Ax3 + Bx2 + Cx + D (19)

To substitute into the differential equation, we differentiate equation (19) twice.


Therefore,
y p  3 Ax 2  2 Bx  C
and y p  6 Ax  2 B

We substitute these expressions into equation (13).

(6Ax + 2B) + 5(3Ax2 + 2Bx + C) + 6(Ax3 + Bx2 + Cx + D) = 3x3 + 4x2 – 2x + 4

Collecting terms of powers of x, we obtain,

6Ax3 + (15A + 6B)x2 + (6A + 10B + 6C)x + (2B + 5C + 6D) = 3x3 + 4x2 – 2x + 4

Equating coefficients on both sides, we obtain

1
For x3, 6A = 3. Therefore, A = .
2

7
For x2, 15A + 6B = 4. Therefore, B =  .
12

5
For x, 6A + 10B + 6C = –2. Therefore C = .
36

171
Finally, for constant, 2B + 5C + 6D = 4. Therefore D = .
216
Therefore, the particular solution is

1 3 7 2 5 171
yp = x  x + x+
2 12 36 216
Finally, the general solution is
1 7 5 171
y = c1e–2x + c2e–3x + x3  x2 + x+
2 12 36 216

Example 4

In this problem, let us consider f(x) = 4e–2x.

Let us proceed the way we did in example 1, and consider the particular solution to be
yp = Ae–2x. We obtain the first derivative, y p   2 Ae 2 x , and the second derivative
y p  4 Ae 2 x . Substituting into equation (14), we obtain

4Ae–2x + 5(–2Ae–2x) + 6Ae–2x = 4e–2x

or 0 = 4e–2x!
Strictly speaking, we should not be surprised that the left hand side has turned to be 0.
This is because, we have taken the particular solution to be Ae–2x. But e–2x is already one
of the eigenfunctions of the homogeneous part. Therefore, we have a case of repeated
roots here. So, instead of assuming e–2x, we have to assume xe–2x as the particular
solution.

Therefore, we assume

yp = Axe–2x

Then,
y p  Ae 2 x  2 Axe 2 x , and
y p   2 Ae 2 x  2 Ae 2 x  4 Axe 2 x   4 Ae 2 x  4 Axe 2 x .

Substituting these expressions into equation (14), we obtain

(  4 Ae 2 x  4 Axe 2 x ) + 5( Ae 2 x  2 Axe 2 x ) + 6(Axe–2x) = 4e–2x

The terms involving xe–2x cancels out completely. Therefore, collecting terms of e–2x, we
obtain

Ae–2x = 4e–2x

or A=4

Therefore, the particular solution is yp = 4xe–2x, and the general solution is

y = (c1 + 4x)e–2x + c2e–3x

Exercise
1. y   2 y   3 y  3e 2t
2. y   y   2 y  2t  4t 2
3. y   y   6 y  12e 3t  12e 2t
4. y   2 y   3 y  3te  t
5. y   2 y   3  4 sin(2t )
6. y   2 y   y  2e  t
7. y   y  3 sin(2t )  t cos(2t )
8. u   02u  cos  t 02   2
9. u   02u  cos 0 t
10. y   y   2 y  2t y(0) = 0, y′(0) = –1
11. y  4 y  t 2  3e t y(0) = 0, y′(0) = 2
12. y   2 y   y  te t  4 y(0) = 1, y′(0) = 1
13. y   4 y  3 sin(2t ) y(0) = 2, y′(0) = –1

Second order linear equation with variable coefficients,


Cauchy–Euler equation

A second order linear differential equation with variable coefficient will appear like

a(x) y″ + b(x) y′ + c(x) y = 0 (19)

The a(x), b(x), and c(x) are explicit functions of x. It will be wrong to assume that it
would be possible to find a general procedure for solving equation (19), or that a general
procedure can be found for any function – if the solution can be found at all! At this point
we will restrict our discussion to very special kinds of a(x), b(x), and c(x). These are
a(x) = ax2, b(x) = bx, c(x) = c, where a, b, and c are constants. Therefore, equation (19)
becomes

ax2 y″ + bx y′ + c y = 0 (20)

Equation (20) is called Cauchy–Euler equation. A general solution to equation (20) can
be obtained at all location in the real domain, provided a ≠ 0.

The solution procedure involves transforming equation (20) using the transformation
x = ez, or z = lnx.

We need to convert the first and second derivatives in equation (20) to derivatives with
respect to z. To do this

dy dy dz 1 dy
  (21)
dx dz dx x dz

d 2 y d  dy  d  dy  dz 1 d  1 dy 
       
dx 2 dx  dx  dz  dx  dx x dz  x dz 
1 d   z dy  1   z dy z d y 
2
 e   e e 
x dz  dz  x  dz dz 2 
1  1 dy 1 d 2 y  1  dy d 2 y 
     
x  x dz x dz 2  x 2  dz dz 2 
1  d 2 y dy 
 2    (22)
x  dz 2 dz 
At this point we substitute the expression for first derivative from equation (21) and
second derivative from equation (22) into equation (20). We obtain
1  d 2 y dy  1 dy
ax 2 2 
2 
  bx  cy  0
x  dz dz  x dz
Simplifying, this term, we obtain
d2y dy
a 2  b  a   cy  0 (23)
dz dz
Therefore the transformation converts equation (20) into an equation with constant
coefficient. We have already learnt how to find solution of equations like equation (23).

Example

Find solution of the differential equation x2y″ – 4xy′ + 6y = 0.

Transforming using x = ez, the given differential equation will transform into
d2y dy
2
  4  1  6 y  0
dz dz
2
d y dy
2
5  6y  0
dz dz

Assuming the solution to be of the type y = erz, we will obtain the characteristic equation

r2 – 5r + 6 = 0

This equation has two real roots, –3 and –2. Therefore the solution is

y = c1e–3z + c2e–2z

Now transforming back to x from z, we obtain

y = c1x–3 + c2x–2

Exercise
1. x 2 y   4 xy   2 y  0
2. ( x  1) 2 y   3( x  1) y   0.75 y  0
3. x 2 y   3 xy  4 y  0
4. x 2 y   xy   y  0
5. x 2 y   6 xy   y  0
6. 2 x 2 y   4 xy   6 y  0
7. x 2 y  5 xy  9 y  0
8. ( x  2) 2 y  5( x  2) y  8 y  0
9. 2 x 2 y   6 xy   3 y  0 y(1) = 1, y′(1) = –4
10. 4 x y   8 xy   17 y  0
2
y(1) = 2, y′(1) = –3
11. x 2 y   3 xy  4 y  0 y(–1) = 2, y′(–1) = 3

You might also like