LECTURE 15: NONHOMOGENEOUS EQUATIONS October 16, 2015 Theorem 1. Let y

advertisement
LECTURE 15: NONHOMOGENEOUS EQUATIONS
MINGFENG ZHAO
October 16, 2015
Theorem 1. Let yc (x) be the general solution to the homogeneous equation y 00 + p(x)y 0 + q(x)y = 0 ( which is call the
complementary solution), and yp (x) be any particular solution to the nonhomogeneous equation y 00 +p(x)y 0 +q(x)y = f (x),
then the general solution to the nonhomogeneous equation y 00 + p(x)y 0 + q(x)y = f (x) is:
y(x) = yp (x) + yc (x).
Undetermined Coefficients:
Let a, b and c be constants, consider the equation:
ay 00 + by 0 + cy = f (x).
Let pn (x) and p̃n (x) be polynomials with degree n, a particular solution yp (x) to ay 00 + by 0 + cy = f (x) can be taken as:
f (x)
yp (x)
pn (x)emx cos(kx) + p̃n (x)emx sin(kx)
xα [qn (x)emx cos(kx) + q̃n (x)emx sin(kx)]
where
• α is one of 0, 1 and 2 (α is the multiplicity of m+ki as the solutions to the characteristic equation ar2 +br +c = 0
of ay 00 + by 0 + cy = 0):
– If m + ki is not a root of ar2 + br + c = 0, then α = 0.
– If m + ki is a root of ar2 + br + c = 0 and ar2 + br + c = 0 has two different roots, then α = 1.
– If m + ki is a root of ar2 + br + c = 0 and ar2 + br + c = 0 only has one root m + ki, then α = 2.
• qn (x) and q̃n (x) are undetermined polynomials with degree n.
Example 1. Find a particular solution to y 00 = x + 1.
The characteristic equation to y 00 = 0 is:
r2 = 0.
1
2
MINGFENG ZHAO
Solve r2 = 0, then
r1 = r2 = 0.
Let yp (x) = x2 (Ax + B) = Ax3 + Bx2 be a particular solution to y 00 = x + 1, then
yp0 (x)
=
3Ax2 + 2Bx
yp00 (x)
=
6Ax + 2B
= x + 1.
Then
6A = 1,
and
2B = 1.
That is,
A=
1
,
6
and B =
1
B
So a particular solution to y 00 = x + 1 is:
yp (x) =
x3
x2
.
+
6
2
Example 2. Find a particular solution to y 00 − y = x2 ex .
The characteristic equation of y 00 − y = 0 is:
r2 − 1 = 0.
Then
r1 = −1,
and r2 = 1.
Let yp (x) = x(Ax2 + Bx + C)ex = (Ax3 + Bx2 + Cx)ex be a particular solution to y 00 − y = x2 ex , then
yp0 (x)
=
(3Ax2 + 2Bx + C)ex + (Ax3 + Bx2 + Cx)ex
yp00 (x)
=
(6Ax + 2B)ex + (3Ax2 + 2Bx + C)ex + (3Ax2 + 2Bx + C)ex
+(Ax3 + Bx2 + Cx)ex .
Then
yp00 (x) − yp (x)
=
(6Ax + 2B)ex + (3Ax2 + 2Bx + C)ex + (3Ax2 + 2Bx + C)ex
+(Ax3 + Bx2 + Cx)ex − (Ax3 + Bx2 + Cx)ex
=
(6Ax + 2B)ex + (3Ax2 + 2Bx + C)ex + (3Ax2 + 2Bx + C)ex
LECTURE 15: NONHOMOGENEOUS EQUATIONS
=
[6Ax + 2B + 3Ax2 + 2Bx + C + 3Ax2 + 2Bx + C]ex
=
x2 ex
3
Then
3A + 3A = 1,
6A + 2B + 2B = 0,
and
2B + C + C = 0.
Then
A=
1
,
6
1
B=− ,
4
and C =
1
.
4
Then a particular solution to y 00 − y = x2 ex is:
yp (x) =
x3
x2
x
−
+
6
4
4
ex .
Example 3. Find a particular solution to y 00 − 3y 0 − 4y = −8ex cos(2x).
The characteristic equation of y 00 − 3y 0 − 4y = 0 is:
r2 − 3r − 4 = 0.
Solve r2 − 3r − 4 = 0, we get
r1 = 4,
and r2 = −1.
So 1 + 2i is not a solution to r2 − 3r − 4 = 0. Then let yp (x) = Aex cos(2x) + Bex sin(2x) be a particular solution to
y 00 − 3y 0 − 4y = −8ex cos(2x), then
yp0 (x)
yp00 (x)
= Aex cos(2x) − 2Aex sin(2x) + Bex sin(2x) + 2Bex cos(2x)
=
(A + 2B)ex cos(2x) + [−2A + B]ex sin(2x)
=
(A + 2B)ex cos(2x) − 2(A + 2B)ex sin(2x) + [−2A + B]ex sin(2x) + 2[−2A + B]ex cos(2x)
=
[A + 2B − 4A + 2B]ex cos(2x) + [−2A − 4B − 2A + b]ex sin(2x)
=
[−3A + 4B]ex cos(2x) + [−4A − 3B]ex sin(2x)
Then
yp00 − 3yp0 − 4yp
=
[−3A + 4B]ex cos(2x) + [−4A − 3B]ex sin(2x)
−3 [(A + 2B)ex cos(2x) + [−2A + B]ex sin(2x)]
−4 [Aex cos(2x) + Bex sin(2x)]
=
[−3A + 4B − 3A − 6B − 4A]ex cos(2x) + [−4B − 3B + 6A − 3B − 4B]ex sin(2x)
4
MINGFENG ZHAO
=
[−10A − 2B]ex cos(2x) + [2A − 10B]ex sin(2x).
So we get
−10A − 2B = −8,
and
2A − 10B = 0.
Then
A=
10
,
13
and B =
2
.
13
Then a particular solution to y 00 − 3y 0 − 4y = −8ex cos(2x) can be:
yp (x) =
10 x
2
e cos(2x) + ex sin(2x) .
13
13
Theorem 2. Let y1,p (x) be a particular solution to y 00 + p(x)y + q(x)y = f1 (x), and y2,p (x) be a particular solution to
y 00 + p(x)y + q(x)y = f2 (x), then yp (x) = y1,p (x) + y2,p (x) is a particular solution to y 00 + p(x)y + q(x)y = f (x), where
f (x) = f1 (x) + f2 (x).
Example 4. Find a particular solution to y 00 + y = x + ex .
The characteristic equation to y 00 + y = 0 is:
r2 + 1 = 0.
Solve r2 + 1 = 0, we have
r1 = i,
and r2 = −i
A particular solution to y 00 + y = x can be taken as y(x) = Ax + B, and a particular solution to y 00 + y = ex can be
y(x) = Cex , so let yp (x) = Ax + B + Cex be a particular solution to y 00 + y = ex , then
yp (x)0
= A + Cex
yp00 (x)
= Cex
yp00 + yp
= Cex + Ax + B + Cex
= Ax + 2Cex + B
= x + ex .
So we get
[2C − 1]ex + [A − 1]x + B = 0.
So
2C − 1 = 0,
2A − 1 = 0,
and B = 0.
LECTURE 15: NONHOMOGENEOUS EQUATIONS
5
That is,
A = 1,
B = 0,
and C =
1
.
2
Therefore, a particular solution to y 00 + y = x + ex can be:
yp (x) = x +
ex
.
2
Remark 1. Basically, you are looking for a particular solution for each term and then add those particular solutions
together.
Variation of Parameters
Definition 1. Let y1 (x) and y2 (x) be two solutions, the Wronskian of y1 and y2 is defined as:

W (y1 , y2 ) = det 
y1 (x) y2 (x)
y10 (x)
y20 (x)

 = y1 (x)y20 (x) − y10 (x)y2 (x).
Let y1 (x) and y2 (x) be a fundamental set of solutions to the homogeneous equation y 00 + p(x)y 0 + q(x)y = 0, consider
the nonhomogeneous equation:
y 00 + p(x)y 0 + q(x)y = f (x).
Then the general solution to y 00 + p(x)y 0 + q(x)y = 0 is:
yc (x) = C1 y1 (x) + C2 y2 (x)
Now let’s find a particular solution yp (x) to the nonhomogeneous equation y 00 + p(x)y 0 + q(x)y = f (x). let
yp (x) = C1 (x)y1 (x) + C2 (x)y2 (x).
Then
yp0 (x)
=
C10 (x)y1 (x) + C20 (x)y2 (x)
+C1 (x)y10 (x) + C2 (x)y20 (x).
Now assume that the sum involving C10 and C20 equals 0, that is, C1 and C2 satisfy
C10 (x)y1 (x) + C20 (x)y2 (x) = 0 .
6
MINGFENG ZHAO
Then
yp0 (x)
= C1 (x)y10 (x) + C2 (x)y20 (x)
yp00 (x)
= C10 (x)y10 (x) + C1 (x)y100 (x) + C20 (x)y20 (x) + C2 (x)y200 (x)
yp00 (x) + p(x)yp0 (x) + q(x)yp (x)
= C10 (x)y10 (x) + C1 (x)y100 (x) + C20 (x)y20 (x) + C2 (x)y200 (x)
+p(x) [C1 (x)y10 (x) + C2 (x)y20 (x)] + q(x) [C1 (x)y1 (x) + C2 (x)y2 (x)]
= C1 (x) [y100 (x) + p(x)y10 (x) + q(x)y1 (x)]
+C2 (x) [y200 (x) + p(x)y20 (x) + q(x)y2 (x)]
+C10 (x)y10 (x) + C20 (x)y20 (x)
= C10 (x)y10 (x) + C20 (x)y20 (x)
Since y1 (x) and y2 (x) are complementary solutions
= f (x).
So we get
C10 (x)y10 (x) + C20 (x)y20 (x) = f (x).
In summary, C10 (x) and C20 (x) satisfy the following linear system:


 C10 (x)y1 (x) + C20 (x)y2 (x) = 0

 C 0 (x)y 0 (x) + C 0 (x)y 0 (x) = f (x).
1
1
2
2
That is, we have


Solve the above system, we have


C10 (x)
 =

C20 (x)
=
y1 (x) y2 (x)
y10 (x)
y20 (x)

C10 (x)

C20 (x)

1

det 
y1 (x) y2 (x)
y10 (x)
y20 (x)
 ·



0
=
.
f (x)
y20 (x)
−y2 (x)
−y10 (x)
y1 (x)
 
·



−y2 (x)
f (x)

·
W (y1 , y2 )
y1 (x)
Then we have
C10 (x) =
−y2 (x)f (x)
,
W (y1 , y2 )
and C20 (x) =
y1 (x)f (x)
.
W (y1 , y2 )
0


f (x)
LECTURE 15: NONHOMOGENEOUS EQUATIONS
Then
Z
C1 (x) =
−y2 (x)f (x)
dx,
W (y1 , y2 )
Z
and C2 (x) =
y1 (x)f (x)
dx.
W (y1 , y2 )
So a particular solution can be:
Z
yp (x) = −y1 (x)
y2 (x)f (x)
dx + y2 (x)
W (y1 , y2 )
Z
y1 (x)f (x)
dx .
W (y1 , y2 )
Example 5. Find the general solution of y 00 + y = csc(x) for 0 < x < π.
The characteristic equation of y 00 + y = 0 is:
r2 + 1 = 0.
Solve r2 + 1 = 0, we have
r1 = i,
and r2 = −i.
So the general solution to y 00 + y = 0 is:
y(x) = C1 cos(x) + C2 sin(x).
Let y(x) = C1 (x) cos(x) + C2 (x) sin(x) be particular solution to y 00 + y = csc(x), then
yp0 (x)
= C10 (x) cos(x) − C1 (x) sin(x) + C20 (x) sin(x) + C2 (x) cos(x).
Assume that
C10 (x) cos(x) + C20 (x) sin(x) = 0.
Then
yp0 (x)
= −C1 (x) sin(x) + C2 (x) cos(x)
yp00 (x)
= −C10 (x) sin(x) + C1 (x) cos(x) + C20 (x) cos(x) − C2 (x) sin(x)
yp00 (x) + yp (x)
= −C10 (x) sin(x) + C1 (x) cos(x) + C20 (x) cos(x) − u2 (x) sin(x) + C1 (x) cos(x) + C2 (x) sin(x)
= −C10 (x) sin(x) + C20 (x) cos(x)
=
csc(x).
So C10 and C20 satisfy


 C10 (x) cos(x) + C20 (x) sin(x) = 0

 −C 0 (x) sin(x) + C 0 (x) cos(x) = csc(x).
1
2
7
8
MINGFENG ZHAO
Solve C10 and C20 , we have
C10 (x) = − sin(x) · csc(x) = −1,
and C20 (x) = cos(x) · csc(x) = cot(x).
Then
Z
C1 (x) = −x,
and C2 (x) =
Z
cot(x) dx =
cos(x)
dx = ln sin(x).
sin(x)
Then a particular solution to y 00 + y = csc(x) can be:
yp (x) = −x cos(x) + sin(x) ln sin(x).
So the general solution to y 00 + y = csc(x) is:
yp (x) = C1 cos(x) + C2 sin(x) − x cos(x) + sin(x) ln sin(x) .
Problems you can do:
Lebl’s Book [2]: All exercises on Page 75 and Page 76.
Braun’s Book [1]: All exercises on Page 156 Page 157 and Page 164. Read all materials in Section 2.4 and
Section 2.5.
References
[1] Martin Braun. Differential Equations and Their Applications: An Introduction to Applied Mathematics. Springer, 1992.
[2] Jiri Lebl. Notes on Diffy Qs: Differential Equations for Engineers. Createspace, 2014.
Department of Mathematics, The University of British Columbia, Room 121, 1984 Mathematics Road, Vancouver, B.C.
Canada V6T 1Z2
E-mail address: mingfeng@math.ubc.ca
Download