Chapter 17 Second-Order Differential Equations

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 77

Chapter 17.

Second-Order
Differential Equations

1
17.0 Exact First-Order
Equations

2
Objectives
 Solve an exact differential equation.

 Use an integrating factor to make a differential equation


exact.

3
Exact Differential Equations

4
Exact Differential Equations
This section introduces you to a method for solving the
first-order differential equation

M(x, y)dx + N(x, y)dy = 0

for the special case in which this equation represents the


exact differential of a function z = f(x, y).

5
Exact Differential Equations
You know that if f has continuous second partials, then

This suggests the following test for exactness.

6
Example 1(a) – Testing for Exactness
Determine whether each differential equation is exact.
a. (xy2 + x) dx + yx2 dy = 0

The differential equation is exact because

and

Notice that the equation (y2 + 1)dx + xy dy = 0 is not exact,


even though it is obtained by dividing each side of the first
equation by x.
7
Example 1(b) – Testing for Exactness cont’d

Determine whether each differential equation is exact.


b. cos y dx + (y2 – x sin y) dy = 0
The differential equation is exact because

and
N  2
  y  x sin y 
x x
Notice that the equation cos y dx + (y2 + x sin y)dy = 0 is
not exact, even though it differs from the first equation only
by a single sign.
8
Exact Differential Equations
Note that the test for exactness of M(x, y)dx + N(x, y)dy = 0
is the same as the test for determining whether
F(x, y) = M(x, y)i + N(x, y)j is the gradient of a potential
function.

This means that a general solution f(x, y) = C to an exact


differential equation can be found by the method used to find
a potential function for a conservative vector field.

9
Integrating Factors

10
Integrating Factors
If the differential equation M(x, y)dx + N(x, y)dy = 0 is not
exact, it may be possible to make it exact by multiplying by
an appropriate factor u(x, y), which is called an integrating
factor for the differential equation.

11
Example 4(a) – Multiplying by an Integrating Factor

If the differential equation

2y dx + x dy = 0 Not an exact equation

is multiplied by the integrating factor u(x, y) = x,


the resulting equation

2xy dx + x2 dy = 0 Exact equation

is exact—the left side is the total differential of x2y.

12
Example 4(b) – Multiplying by an Integrating Factor
cont’d

If the equation

y dx – x dy = 0 Not an exact equation

is multiplied by the integrating factor u(x, y) = 1/y2,


the resulting equation

Exact equation

is exact—the left side is the total differential of x/y.

13
Integrating Factors
Finding an integrating factor can be difficult. However, there
are two classes of differential equations whose integrating
factors can be found routinely—namely, those that possess
integrating factors that are functions of either x alone or y
alone. The following theorem, outlines a procedure for finding
these two special categories of integrating factors.

14
Example 5 – Finding an Integrating Factor

Solve the differential equation (y2 – x)dx + 2y dy = 0.

Solution:
The given equation is not exact because My(x, y) = 2y and
Nx(x, y) = 0.

However, because

it follows that eh(x) dx = e dx = ex is an integrating factor.


15
Example 5 – Solution cont’d

Multiplying the given differential equation by ex produces


the exact differential equation

(y2ex – xex)dx + 2yex dy = 0

whose solution is obtained as follows.

16
Example 5 – Solution cont’d

Therefore, g(x) = –xex and g(x) = –xex + ex + C1, which


implies that

f(x, y) = y2ex – xex + ex + C1.

The general solution is y2ex – xex + ex = C, or


y2 – x + 1 = Ce–x.

17
17.1 Second-Order Linear
Equations

18
Objectives
 Solve a second-order linear differential equation.

 Solve a higher-order linear differential equation.

 Use a second-order linear differential equation to solve an


applied problem.

19
Second-Order Linear Differential
Equations

20
Second-Order Linear Differential Equations

In this section, you will learn methods for solving


higher-order linear differential equations.

Homogeneous equations are discussed in this section.

21
Second-Order Linear Differential Equations

The functions y1, y2,…, yn are linearly independent if the


only solution of the equation

is the trivial one, C1 = C2 = · · · = Cn = 0. Otherwise, this set


of functions is linearly dependent.

22
Example 1(a) – Linearly Independent and Dependent Functions

The functions

y1(x) = sin x and y2(x) = x

are linearly independent because the only values of


C1 and C2 for which

C1 sin x + C2x = 0

for all x are C1 = 0 and C2 = 0.

23
Example 1(b) – Linearly Independent and Dependent Functions
cont’d

It can be shown that two functions form a linearly dependent


set if and only if one is a constant multiple of the other.
For example,

y1(x) = x and y2(x) = 3x

are linearly dependent because

C1x + C2(3x) = 0

has the nonzero solutions C1 = –3 and C2 = 1.

24
Second-Order Linear Differential Equations

The next theorem points out the importance of linear


independence in constructing the general solution of a
second-order linear homogeneous differential equation with
constant coefficients.

25
Second-Order Linear Differential Equations

Theorem 17.3 states that if you can find two linearly


independent solutions, you can obtain the general solution
by forming a linear combination of the two solutions.

To find two linearly independent solutions, note that the


nature of the equation y  + ay  + by = 0 suggests that it
may have solutions of the form y = emx.

If so, then y  = memx and y  = m2emx.

26
Second-Order Linear Differential Equations

So, by substitution, y = emx is a solution if and only if

y  + ay + by = 0
m2emx + amemx + bemx = 0
emx(m2 + am + b) = 0.

Because emx is never 0, y = emx is a solution if and only if

This is the characteristic equation of the differential


equation

y + ay + by = 0
27
Second-Order Linear Differential Equations

Note that the characteristic equation can be determined


from its differential equation simply by replacing y  with m2,
y  with m, and y with 1.

28
Example 2 – Characteristic Equation with Distinct Real Zeros

Solve the differential equation


y  – 4y = 0.

Solution:
In this case, the characteristic equation is

m2 – 4 = 0 Characteristic equation

so, m = 2.

Therefore, y1 = em1x = e2x and y2 = em2x = e–2x are particular


solutions of the given differential equation.
29
Example 2 – Solution cont’d

Furthermore, because these two solutions are linearly


independent, you can apply Theorem 17.3 to conclude that
the general solution is

y = C1e2x + C2e–2x. General Solution

30
Second-Order Linear Differential Equations

The characteristic equation in Example 2 has two distinct


real zeros.

From algebra, you know that this is only one of three


possibilities for quadratic equations.

31
Second-Order Linear Differential Equations

In general, the quadratic equation m2 + am + b = 0 has zeros

and

which fall into one of three cases.


1. Two distinct real zeros, m1  m2
2. Two equal real zeros, m1 = m2
3. Two complex conjugate zeros, m1 =  +  i and m2 =  –  i

In terms of the differential equation y + ay + by = 0, the


above three cases correspond to three different types of
general solutions. 32
Second-Order Linear Differential Equations

33
Example 3
 Consider the initial value problem
y  y  12 y  0, y (0)  0, y(0)  1
 Assuming exponential soln leads to characteristic equation:

 Factoring e rt two
y (t )  yields r 2solutions, r  4r2=r 3 3  0
 r  12  r01 =-4 and
 The general solution has the form

 Using the
y (tinitial
)  c1econditions:
4 t
 c2 e 3 t

c1  c2  0 1 1
 Thus   c1  , c2 
 4c1  3c2  1  7 7

 1  4 t 1 3t
y (t )  e  e 34
7 7
Example 3
 Consider the initial value problem
2 y  3 y  0, y 0   1, y0   3
 Then
y (t )  e rt  2r 2  3r  0  r 2r  3  0
 Factoring yields two solutions, r1 = 0 and r2 = -3/2
 The general solution has the form
y (t )  c1e 0 t  c2 e 3t / 2  c1  c2 e 3t / 2
 Using the initial conditions:
c1  c2  1 

3c2   c1  3, c2  2
  3
2 
 Thus y (t )  3  2e 3t / 2
35
Example 4: Initial Value Problem (1 of 2)
 Consider the initial value problem
y  5 y  6 y  0, y 0  2, y0  3
 Then
y (t )  e rt  r 2  5r  6  0  r  2r  3  0
 Factoring yields two solutions, r1 = -2 and r2 = -3
 The general solution has the form
y (t )  c1e 2 t  c2 e 3t
 Using initial conditions:
c1  c2  2
  c1  9, c2  7
 2c1  3c2  3 

 Thus y (t )  9e 2 t  7e 3t
36
Example 4: Find Maximum Value (2 of 2)

 Find the maximum value attained by the solution.


y (t )  9e 2 t  7e 3t
set
y(t )  18e 2t
 21e 3t
0
6e  2 t  7e 3t
et  7 /6
t  ln(7 / 6)
t  0.1542
y  2.204

37
Example 5
y  6 y  9 y  0
Characteristic eq. :

 2
 6  9  (  3)  0
The repeated root:
2

 3
The general solution:
y ( x )  (c1  c2 x )e 3x

38 38
Example 6 – Characteristic Equation with Complex Zeros

Find the general solution of the differential equation


y  + 6y + 12y = 0.

Solution:
The characteristic equation
m2 + 6m + 12 = 0
has two complex zeroes, as follows.

39
Example 6 – Solution cont’d

So,  = –3 and  = and the general solution is

40
Example 6 – Solution cont’d

The graphs of the basic


solutions
and ,
along with other members
of the family of solutions,
are shown in Figure 17.5.

Figure 17.5 41
Higher-Order Linear Differential
Equations

42
Higher-Order Linear Differential Equations

For higher-order homogeneous linear differential equations,


you can find the general solution in much the same way as
you do for second-order equations.

That is, you begin by determining the n zeros of the


characteristic equation. Then, based on these n zeros, you
form a linearly independent collection of n solutions.

The major difference is that with equations of third or higher


order, zeros of the characteristic equation may occur more
than twice.

When this happens, the linearly independent solutions are


formed by multiplying by increasing powers of x.
43
Example 1 – Solving a Third-Order Equation

Find the general solution of y – y = 0.

Solution:
The characteristic equation is
m3 – m = 0
m(m – 1)(m + 1) = 0
m = 0, 1, –1.

Because the characteristic equation has three distinct zeros,


the general solution is
y = C1 + C2e–x + C3ex. General solution

44
17.3 Second-Order
Nonhomogeneous Linear Equations

45
Objectives
 Recognize the general solution of a second-order
nonhomogeneous linear differential equation.

 Use the method of undetermined coefficients to solve a


second-order nonhomogeneous linear differential
equation.

 Use the method of variation of parameters to solve a


second-order nonhomogeneous linear differential
equation.

46
Nonhomogeneous Equations

47
Nonhomogeneous Equations
Damped oscillations of a spring are represented by the
homogeneous second-order linear equation

This type of oscillation is called free because it is determined


solely by the spring and gravity and is free of the action of
other external forces.

48
Nonhomogeneous Equations
If such a system is also subject to an external periodic force
such as a sin bt, caused by vibrations at the opposite end of
the spring, the motion is called forced, and it is characterized
by the nonhomogeneous equation

49
Nonhomogeneous Equations
In this section, you will study two methods for finding the
general solution of a nonhomogeneous linear differential
equation.

In both methods, the first step is to find the general solution


of the corresponding homogeneous equation.

y = yh

Having done this, you try to find a particular solution of the


nonhomogeneous equation.

y = yp
50
Nonhomogeneous Equations
By combining these two results, you can conclude that the
general solution of the nonhomogeneous equation is
y = yh + yp.

51
Method of Undetermined
Coefficients

52
Method of Undetermined Coefficients
You already know how to find the solution yh of a linear
homogeneous differential equation.
The remainder of this section looks at ways to find the
particular solution yp.
If F(x) in
y′′ + ay′ + by = F(x)
consists of sums or products of xn, emx, cos βx, or sin βx,
you can find a particular solution yp by the method of
undetermined coefficients.
The object of this method is to guess that the solution yp is a
generalized form of F(x).
53
Method of Undetermined Coefficients
Here are some examples.

1. If F(x) = 3x2, choose yp = Ax2 + Bx + C.


2. If F(x) = 4xex, choose yp = Axex + Bex.
3. If F(x) = x + sin 2x,
choose yp = (Ax + B) + C sin 2x + D cos 2x.

Then, by substitution, determine the coefficients for the


generalized solution.

54
Example 1 – Method of Undetermined Coefficients

Find the general solution of the equation


y′′ − 2y′ − 3y = 2 sin x.

Solution:
To find yh, solve the characteristic equation.

m2 − 2m − 3 = 0
(m + 1) (m − 3) = 0
m = −1 or m = 3

So, yh = C1e−x + C2e3x.


55
Example 1 – Solution cont’d

Next, let yp be a generalized form of 2 sin x.

yp = A cos x + B sin x

yp′ = −A sin x + B cos x

yp′′ = −A cos x − B sin x

Substitution into the original differential equation yields

y′′ − 2y′ − 3y = 2 sin x


−A cos x + B sin x + 2A sin x − 2B cos x − 3A cos x − 3B sin x = 2 sin x
(−4A − 2B)cos x + (2A − 4B)sin x = 2 sin x.
56
Example 1 – Solution cont’d

By equating coefficients of like terms, you obtain


−4A − 2B = 0 and 2A − 4B = 2

with solution and .

Therefore,

and the general solution is

57
Method of Undetermined Coefficients
In Example 1, the form of the homogeneous solution

yh = C1e−x + C2e3x

has no overlap with the function F(x) in the equation


y′′ + ay′ + by = F(x).
However, suppose the given differential equation in
Example 1 were of the form

y′′ − 2y′ − 3y = e−x.


Now it would make no sense to guess that the particular
solution was y = Ae−x, because you know that this solution
would yield 0. 58
Method of Undetermined Coefficients
In such cases, you should alter your guess by multiplying
by the lowest power of x that removes the duplication.

For this particular problem, you would guess


yp = Axe−x.

59
Variation of Parameters

60
Variation of Parameters
The method of undetermined coefficients works well if F(x)
is made up of polynomials or functions whose successive
derivatives have a cyclical pattern.

For functions such as 1/x and tan x, which do not have such
characteristics, it is better to use a more general method
called variation of parameters.

In this method, you assume that yp has the same form as


yh, except that the constants in yh are replaced by variables.

61
Variation of Parameters

62
Example 5 – Variation of Parameters
Solve the differential equation

y′′ – 2y′ + y = x > 0.

Solution:
The characteristic equation m2 – 2m + 1 = (m – 1)2 = 0 has
one repeated solution, m = 1.
So, the homogeneous solution is

yh = C1y1 + C2y2 = C1ex + C2xex.

Replacing C1 and C2 by u1 and u2 produces

yp = u1y1 + u2y2 = u1ex + u2xex. 63


Example 5 – Solution cont’d

The resulting system of equations is


u1′ex + u2′xex = 0
u1′ex + u2′(xex + ex) =

Subtracting the second equation from the first produces


u2′ = 1/(2x).
Then, by substitution in the first equation, you have u1′ =

Finally, integration yields

64
Example 5 – Solution cont’d

From this result it follows that a particular solution is

and the general solution is

65
More examples

66
Example 1: Exponential g(t)

 Consider the nonhomogeneous equation


y  3 y  4 y  3e 2t
 We seek Y satisfying this equation. Since exponentials
replicate through differentiation, a good start for Y is:
Y (t )  Ae 2t  Y (t )  2 Ae 2t , Y (t )  4 Ae 2t
 Substituting these derivatives into differential equation,
4 Ae 2t  6 Ae 2t  4 Ae 2t  3e 2t
  6 Ae 2t  3e 2t  A  1 / 2
 Thus a particular solution to the nonhomogeneous
ODE is 1 2t
Y (t )   e
2
67
Example 2: Sine g(t), First Attempt (1 of 2)

 Consider the nonhomogeneous equation


y  3 y  4 y  2 sin t
 We seek Y satisfying this equation. Since sines
replicate through differentiation, a good start for Y is:
Y (t )  A sin t  Y (t )  A cos t , Y (t )   A sin t
 Substituting these derivatives into differential equation,
 A sin t  3 A cos t  4 A sin t  2 sin t
 2  5 Asin t  3 A cos t  0
 c1 sin t  c2 cos t  0
 Since sin(x) and cos(x) are linearly independent (they
are not multiples of each other), we must have c1= c2 =
0, and hence 2 + 5A = 3A = 0, which is impossible.
68
y  3 y  4 y  2 sin t
Example 2: Sine g(t), Particular Solution (2
of 2)
 Our next attempt at finding a Y is
Y (t )  A sin t  B cos t
 Y (t )  A cos t  B sin t , Y (t )   A sin t  B cos t

 Substituting these derivatives into ODE, we obtain


 A sin t  B cos t   3A cos t  B sin t   4A sin t  B cos t   2 sin t
  5 A  3B sin t   3 A  5 B cos t  2 sin t
  5 A  3B  2,  3 A  5 B  0
 A  5 / 17, B  3 / 17

 Thus a particular solution to the nonhomogeneous


ODE is 5 3
Y (t )  sin t  cos t
17 17 69
Example 3: Polynomial g(t)

 Consider the nonhomogeneous equation


y  3 y  4 y  4t 2  1
 We seek Y satisfying this equation. We begin with
Y (t )  At 2  Bt  C  Y (t )  2 At  B, Y (t )  2 A
 Substituting these derivatives into differential equation,
 
2 A  32 At  B   4 At 2  Bt  C  4t 2  1
  4 At 2  6 A  4 B t  2 A  3B  4C   4t 2  1
  4 A  4, 6 A  4 B  0, 2 A  3B  4C  1
 A  1, B  3 / 2 , C  11 / 8
 Thus a particular solution to the nonhomogeneous
ODE is 3 11
Y (t )   t 2  t 
2 8
70
Example 4: Product g(t)
 Consider the nonhomogeneous equation
y   3 y  4 y  8e t cos 2t
 We seek Y satisfying this equation, as follows:
Y (t )  Ae t cos 2t  Be t sin 2t
Y (t )  Ae t cos 2t  2 Ae t sin 2t  Be t sin 2t  2 Be t cos 2t
 A  2 B e t cos 2t   2 A  B et sin 2t
Y (t )  A  2 B e t cos 2t  2 A  2 B et sin 2t   2 A  B e t sin 2t
 2 2 A  B e t cos 2t
  3 A  4 B e t cos 2t   4 A  3 B et sin 2t
 Substituting derivatives into ODE and solving for A and
B: A  10 , B  2  Y (t )  10 et cos 2t  2 et sin 2t
13 13 13 13
71
Discussion: Sum g(t)
 Consider again our general nonhomogeneous equation
y  p (t ) y  q (t ) y  g (t )
 Suppose that g(t) is sum of functions:
g (t )  g1 (t )  g 2 (t )

 If Y1, Y2 are solutions of


y  p (t ) y  q (t ) y  g1 (t )
y  p (t ) y  q (t ) y  g 2 (t )
respectively, then Y1 + Y2 is a solution of the
nonhomogeneous equation above.

72
Example 5: Sum g(t)

 Consider the equation


y  3 y  4 y  3e 2t  2 sin t  8et cos 2t
 Our equations to solve individually are

y  3 y  4 y  3e 2t
y  3 y  4 y  2 sin t
y  3 y  4 y  8e t cos 2t

 Our particular solution is then


1 3 5 10 2
Y (t )   e 2t  cos t  sin t  et cos 2t  e t sin 2t
2 17 17 13 13
73
Example 6: First Attempt (1 of 3)

 Consider the equation


y  4 y  3 cos 2t
 We seek Y satisfying this equation. We begin with
Y (t )  A sin 2t  B cos 2t
 Y (t )  2 A cos 2t  2 B sin 2t , Y (t )  4 A sin 2t  4 B cos 2t

 Substituting these derivatives into ODE:


 4 A sin 2t  4 B cos 2t   4A sin 2t  B cos 2t   3 cos 2t
 4 A  4 Asin 2t   4 B  4 B cos 2t  3 cos 2t
0  3 cos 2t
 Thus no particular solution exists of the form
Y (t )  A sin 2t  B cos 2t
74
Example 6: Homogeneous Solution (2 of
3)

 Thus no particular solution exists of the form


Y (t )  A sin 2t  B cos 2t
 To help understand why, recall that we found the
corresponding homogeneous solution before notes:
y  4 y  0  y (t )  c1 cos 2t  c2 sin 2t
 Thus our assumed particular solution solves
homogeneous equation
y  4 y  0
instead of the nonhomogeneous equation.
y  4 y  3 cos 2t
75
y  4 y  3 cos 2t
Example 6: Particular Solution (3 of 3)

 Our next attempt at finding a Y is:


Y (t )  At sin 2t  Bt cos 2t
Y (t )  A sin 2t  2 At cos 2t  B cos 2t  2 Bt sin 2t
Y (t )  2 A cos 2t  2 A cos 2t  4 At sin 2t  2 B sin 2t  2 B sin 2t  4 Bt cos 2t
 4 A cos 2t  4 B sin 2t  4 At sin 2t  4 Bt cos 2t

 Substituting derivatives into ODE,


4 A cos 2t  4 B sin 2t  3 cos 2t
 A  3 / 4, B  0
3
 Y (t )  t sin 2t
4 76
。 Exercise: y  4 y  x  2e 2 x
(1) y  4 y  x, (2) y  4 y  2e 2 x
 
x
y p1  y p 2  e 2 x / 4
4
2 x
x 1
 y p  y p1  y p 2   e  ( x  e 2 x )
4
4 4
The general solution:
1
y ( x)  c1 cos 2 x  c2 sin 2 x  ( x  e 2 x )
4
cos 2 x, sin 2 x : where homogeneous solutions

77 77

You might also like