Lecture 5
Lecture 5
Lecture 5
Ordinary Differential
Equations-
Second Order Equations
Second order linear differential equations
A second order linear differential equation can be written in the form
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.
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
where a0, a1, a2, . . ., an, are constants, is also a solution of the same differential equation.
If a linear combination
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)
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 )
y″ + y′ + y = 0 (1)
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)
erx ( r2 + r + ) = 0 (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.
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)
c1 + c2 = 0
c1e2 + c2e3/2 = 1
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
y = ex(c1cosx + c2sinx)
Example
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
To be able to use the initial conditions, we differentiate equation (10) to obtain the first
derivative.
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
Using variation of parameters, the second eigenfunction is obtained as y2 = xerx. These are
two eigenfunctions.
Example
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
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. y4 y 4 y 0 y(–1) = 2, y′(–1) = 1
A second order linear differential equation with constant coefficient structurally looks
like
y″ + y′ + y = f(x) (13)
Example 1.
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!
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
1 2x
Therefore, y p e . Finally, the general solution is
7
1 2x
y = c1e–2x + c2e–3x + e
20
Example 2
We have already obtained the homogeneous solution in the last problem. For the
particular solution, we will assume
yp = Asin2x + Bcos2x (18)
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
6Ax3 + (15A + 6B)x2 + (6A + 10B + 6C)x + (2B + 5C + 6D) = 3x3 + 4x2 – 2x + 4
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
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
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 .
The terms involving xe–2x cancels out completely. Therefore, collecting terms of e–2x, we
obtain
Ae–2x = 4e–2x
or A=4
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
A second order linear differential equation with variable coefficient will appear like
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
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
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