Math 220: Lecture 16 § 4.4 Professor Nicholls Department of Mathematics, Statistics,

Transcription

Math 220: Lecture 16 § 4.4 Professor Nicholls Department of Mathematics, Statistics,
Math 220: Lecture 16
§ 4.4
Professor Nicholls
Department of Mathematics, Statistics,
and Computer Science
University of Illinois at Chicago
Math 220: Lecture 16
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
1 / 38
Chapter 4: Linear Second Order Equations
For second order ODE we can only solve linear equations, and we
only have a general method for constant coefficients.
We have seen in Sections 4.1–4.3 how to solve the homogeneous
problem.
We now extend the method to accommodate the inhomogeneous
problem
ay 00 (t) + by 0 (t) + cy (t) = f (t),
a, b, c ∈ R.
We propose two techniques:
The Method of Undetermined Coefficients (MUC) [§ 4.4 today, 4.5]
The Method of Variation of Parameters (VOP) [§ 4.6]
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
2 / 38
4.4: Nonhomogeneous Equations: The Method of
Undetermined Coefficients
Consider the linear, constant coefficient, inhomogeneous second
order ODE
ay 00 (t) + by 0 (t) + cy (t) = f (t),
a, b, c ∈ R.
As with most methods in ODEs, the easiest and least error–prone
is based upon a good guess: The inhomogeneous problem has
solution which “looks like” the inhomogeneity!
Best explained by example, but this only works for f which are
(combinations of):
Polynomials,
Exponentials,
Sines and Cosines.
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
3 / 38
Example # 1
Example #1: Find a solution of inhomogeneous problem
y 00 − 3y 0 + 2y = 2t.
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
4 / 38
Work Space
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
5 / 38
Solution: Example # 1
Solution #1: We guess a solution that “looks like” the right hand side:
y (t) = At,
with coefficient A ∈ R to be determined. We now compute
y 0 = A,
y 00 = 0,
and insert into the ODE:
0 − 3A + 2(At) = 2t.
This requires A = 0 and A = 1. Contradictory, but the method shows
promise!
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
6 / 38
Example # 1, cont.
Solution: Let’s modify our guess just a little and allow for any linear
polynomial
y (t) = At + B,
with two coefficients to be determined. Again, we compute
y 0 = A,
y 00 = 0,
and insert into the ODE:
0 − 3A + 2(At + B) = 2t.
Now we require
2A = 2,
−3A + 2B = 0,
which has unique solution A = 1, B = 3/2. Thus we find the solution
y (t) = t + 3/2.
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
7 / 38
Example # 2
Example #2: Find a solution of inhomogeneous problem
y 00 − 3y 0 + 2y = e−t .
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
8 / 38
Work Space
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
9 / 38
Solution: Example # 2
Solution #2: We guess a solution that “looks like” the right hand side:
y (t) = Ae−t ,
with coefficient A ∈ R to be determined. We now compute
y 0 = −Ae−t ,
y 00 = Ae−t ,
and insert into the ODE:
Ae−t − 3(−Ae−t ) + 2(Ae−t ) = e−t .
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
10 / 38
Example # 2, cont.
Solution: Continuing we find
(6A) e−t = e−t ,
which requires A = 1/6. Thus we have the unique solution
y (t) =
Professor Nicholls (UIC)
1 −t
e .
6
Math 220: Lecture 16
Math 220: Lecture 16
11 / 38
Example # 3
Example #3: Find a solution of inhomogeneous problem
y 00 − 3y 0 + 2y = 2 cos(2t).
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
12 / 38
Work Space
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
13 / 38
Solution: Example # 3
Solution #3: We guess a solution that “looks like” the right hand side:
y (t) = A cos(2t),
with coefficient A ∈ R to be determined. We now compute
y 0 = −2A sin(2t),
y 00 = −4A cos(2t),
and insert into the ODE:
−4A cos(2t) − 3(−2A sin(2t)) + 2(A cos(2t)) = 2 cos(2t).
To match sines and cosines we require −2A = 2 and 6A = 0.
Contradictory, but the method shows promise!
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
14 / 38
Example # 3, cont.
Solution: Let’s modify our guess just a little and allow for a
combination of cosines and sines
y (t) = A cos(2t) + B sin(2t),
with two coefficients to be determined. Again, we compute
y 0 = −2A sin(2t) + 2B cos(2t),
y 00 = −4A cos(2t) − 4B sin(2t),
and insert into the ODE:
(−4A cos(2t) − 4B sin(2t)) − 3 (−2A sin(2t) + 2B cos(2t))
+ 2 (A cos(2t) + B sin(2t)) = 2 cos(2t).
Now, to match sines and cosines, we require
(−4A − 6B + 2A) = 2,
Professor Nicholls (UIC)
(−4B + 6A + 2B) = 0.
Math 220: Lecture 16
Math 220: Lecture 16
15 / 38
Example # 3, cont.
Writing this as a linear system
−2 −6
A
2
=
,
6 −2
B
0
we find the unique solution A = −1/10, B = −3/10. Thus we find the
solution
1
3
y (t) = − cos(2t) −
sin(2t).
10
10
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
16 / 38
Example # 4
Example #4: Find a solution of inhomogeneous problem
y 00 − 3y 0 + 2y = 4et .
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
17 / 38
Work Space
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
18 / 38
Solution: Example # 4
Solution #4: We guess a solution that “looks like” the right hand side:
y (t) = Aet ,
with coefficient A ∈ R to be determined. We now compute
y 0 = Aet ,
y 00 = Aet ,
and insert into the ODE:
Aet − 3(Aet ) + 2(Aet ) = 4et .
BUT: A disappears from the left hand side implying 0 = 4et !
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
19 / 38
Example # 4, cont.
Solution: What went wrong? Consider the homogeneous problem
y 00 − 3y 0 + 2y = 0.
This generates the characteristic equation
0 = r 2 − 3r + 2 = (r − 1)(r − 2)
which gives linearly independent solutions
y1 (t) = C1 et ,
y2 (t) = C2 e2t ,
But our inhomogeneity is just y1 with C1 = 4 so the left hand side must
be zero!
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
20 / 38
Example # 4, cont.
Solution: How can we “fix” this? Inspired by the repeated root case
we try
y (t) = Atet .
We compute
y 0 = Aet + Atet ,
y 00 = Aet + Aet + Atet ,
and insert into the ODE:
(2Aet + Atet ) − 3(Aet + Atet ) + 2(Atet ) = 4et .
Now, to match tet and et terms we require
A − 3A + 2A = 0,
2A − 3A = 4
which, as the first equation is vacuous, has unique solution A = −4.
Thus we find the solution
y (t) = −4tet .
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
21 / 38
Homogeneous and Particular Solutions
The previous ODE has a solution
y (t) = −4tet .
However, it also has solutions
y (t) = C1 et + C2 e2t − 4tet ,
C1 , C2 ∈ R,
as these new terms are “annihilated” by the differential operator
on the left.
These additions can be found by solving the homogeneous
version of the ODE and are therefore termed the Homogeneous
Solution:
yh (t) = C1 et + C2 e2t .
By contrast, any solution of the inhomogeneous ODE is called a
Particular Solution:
yp (t) = −4tet .
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
22 / 38
Method of Undetermined Coefficients
To find a particular solution to the differential equation
ay 00 + by 0 + cy = Ct m ert ,
where m is a nonnegative integer, use the form
yp (t) = t s (Am t m + . . . + A1 t + A0 ) ert ,
with
1
s = 0 if r is not a root of the associated characteristic equation;
2
s = 1 if r is a simple root of the associated characteristic equation;
3
s = 2 if r is a double root of the associated characteristic equation.
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
23 / 38
Method of Undetermined Coefficients, cont.
To find a particular solution to the differential equation
(
Ct m eαt cos(βt)
00
0
ay + by + cy =
Ct m eαt sin(βt)
for β 6= 0, use the form
yp (t) = t s (Am t m + . . . + A1 t + A0 ) eαt cos(βt)
+ t s (Bm t m + . . . + B1 t + B0 ) eαt sin(βt),
with
1
s = 0 if (α + iβ) is not a root of the associated characteristic
equation;
2
s = 1 if (α + iβ) is a simple root of the associated characteristic
equation.
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
24 / 38
Example # 5
Example #5: (NSS 4.4 # 6): Decide whether or not the method of
undetermined coefficients can be applied to find a particular solution of
the given equation:
y 00 (θ) + 3y 0 (θ) − y (θ) = sec(θ).
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
25 / 38
Work Space
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
26 / 38
Solution: Example # 5
Solution #5: Clearly, since sec(θ) = 1/ cos(θ) we cannot use the
Method of Undetermined Coefficients.
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
27 / 38
Example # 6
Example #6: (NSS 4.4 # 8): Decide whether or not the method of
undetermined coefficients can be applied to find a particular solution of
the given equation:
8z 0 (x) − 2z(x) = 3x 100 e4x cos(25x).
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
28 / 38
Work Space
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
29 / 38
Solution: Example # 6
Solution #6: The equation is first order, but we can still use the
Method of Undetermined Coefficients. The guess would be
zp (x) = A100 x 100 + . . . + A1 x + A0 e4x cos(25x)
+ B100 x 100 + . . . + B1 x + B0 e4x sin(25x).
Good luck solving this . . .
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
30 / 38
Example # 7
Example #7: (NSS 4.4 # 13): Find a particular solution to the
differential equation:
y 00 − y 0 + 9y = 3 sin(3t).
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
31 / 38
Work Space
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
32 / 38
Solution: Example # 7
Solution #7: We guess a solution that “looks like” the right hand side:
y (t) = A cos(3t) + B sin(3t),
with coefficients A, B ∈ R to be determined. We now compute
y 0 = −3A sin(3t) + 3B cos(3t),
y 00 = −9A cos(3t) − 9B sin(3t),
and insert into the ODE:
(−9A cos(3t) − 9B sin(3t)) − (−3A sin(3t) + 3B cos(3t))
+ 9 (A cos(3t) + B sin(3t)) = 3 sin(3t).
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
33 / 38
Example # 7, cont.
Now, to match sines and cosines, we require
3A = 3,
−3B = 0,
which has unique solution A = 1 and B = 0. Thus, we find the solution
yp (t) = cos(3t).
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
34 / 38
Example # 8
Example #8: (NSS 4.4 # 15): Find a particular solution to the
differential equation:
y 00 − 5y 0 + 6y = xex .
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
35 / 38
Work Space
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
36 / 38
Solution: Example # 8
Solution #8: We guess a solution that “looks like” the right hand side:
y (t) = (Ax + B) ex ,
with coefficients A, B ∈ R to be determined. We now compute
y 0 = Aex + (Ax + B)ex ,
y 00 = Aex + Aex + (Ax + B)ex ,
and insert into the ODE:
(2Aex + (Ax + B)ex ) − 5 (Aex + (Ax + B)ex )
+ 6 ((Ax + B)ex ) = xex .
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
37 / 38
Example # 8, cont.
Now, to match the two exponentials, we require
2A + B − 5A − 5B + 6B = 0,
A − 5A + 6A = 1.
The second equation has unique solution A = 1/2, and this can be
used in the first equation to deduce B = 3/4. Thus, we find the solution
3
1
x+
ex .
yp (t) =
2
4
Professor Nicholls (UIC)
Math 220: Lecture 16
Math 220: Lecture 16
38 / 38