Tải bản đầy đủ (.pdf) (40 trang)

Advanced Mathematical Methods for Scientists and Engineers Episode 3 Part 9 doc

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (284.99 KB, 40 trang )


We solve this system with Kramer’s rule.
c
1
(ξ) = −
y
2
(ξ)
p(ξ)(−W (ξ))
, c
2
(ξ) = −
y
1
(ξ)
p(ξ)(−W (ξ))
Here W (x) is the Wronskian of y
1
(x) and y
2
(x). The Green function is
G(x|ξ) =

y
1
(x)y
2
(ξ)
p(ξ)W (ξ)
for a ≤ x ≤ ξ,
y


2
(x)y
1
(ξ)
p(ξ)W (ξ)
for ξ ≤ x ≤ b.
The solution of the Sturm-Liouville problem is
y =

b
a
G(x|ξ)f(ξ) dξ.
Result 21.7.2 The problem
L[y] = (p(x)y

)

+ q(x)y = f(x), subject to
B
1
[y] = α
1
y(a) + α
2
y

(a) = 0, B
2
[y] = β
1

y(b) + β
2
y

(b) = 0.
has the Green function
G(x|ξ) =

y
1
(x)y
2
(ξ)
p(ξ)W (ξ)
for a ≤ x ≤ ξ,
y
2
(x)y
1
(ξ)
p(ξ)W (ξ)
for ξ ≤ x ≤ b,
where y
1
and y
2
are non-trivial homogeneous solutions that satisf y B
1
[y
1

] = B
2
[y
2
] = 0, and
W (x) is the Wronskian of y
1
and y
2
.
1094
Example 21.7.5 Consider the equation
y

− y = f(x), y(0) = y(1) = 0.
A set of solutions to the homogeneous equation is {
e
x
,
e
−x
}. Equivalently, one coul d use the set {cosh x, sinh x}. Note
that sinh x satisfies the left boundary condition and sinh(x −1) satisfies the right boundary condition. The Wronskian
of these two homogeneous solutions is
W (x) =




sinh x sinh(x − 1)

cosh x cosh(x − 1)




= sinh x cosh(x − 1) − cosh x sinh(x − 1)
=
1
2
[sinh(2x − 1) + sinh(1)] −
1
2
[sinh(2x − 1) − sinh(1)]
= sinh(1).
The Green function for the problem is then
G(x|ξ) =

sinh x sinh(ξ−1)
sinh(1)
for 0 ≤ x ≤ ξ
sinh(x−1) sinh ξ
sinh(1)
for ξ ≤ x ≤ 1.
The solution to the problem is
y =
sinh(x − 1)
sinh(1)

x
0

sinh(ξ)f(ξ) dξ +
sinh(x)
sinh(1)

1
x
sinh(ξ −1)f(ξ) dξ.
21.7.2 Initial Value Problems
Consider
L[y] = y

+ p(x)y

+ q(x)y = f(x), for a < x < b,
1095
subject the the initial conditions
y(a) = γ
1
, y

(a) = γ
2
.
The solution is y = u + v where
u

+ p(x)u

+ q(x)u = f(x), u(a) = 0, u


(a) = 0,
and
v

+ p(x)v

+ q(x)v = 0, v(a) = γ
1
, v

(a) = γ
2
.
Since the Wronskian
W (x) = c exp



p(x) dx

is non-vanishing, the solutions of the differential equation for v are linearly independent. Thus there is a unique solution
for v that satisfies the initial conditions.
The Green function for u satisfies
G

(x|ξ) + p(x)G

(x|ξ) + q(x)G(x|ξ) = δ(x − ξ), G(a|ξ) = 0, G

(a|ξ) = 0.

The continuity and jump conditions are
G(ξ

|ξ) = G(ξ
+
|ξ), G



|ξ) + 1 = G


+
|ξ).
Let u
1
and u
2
be two linearly independent solutions of the differential equation. For x < ξ, G(x|ξ) is a linear combination
of these solutions. Since the Wronskian is non-vanishing, only the trivial solution satisfies the homogeneous initial
conditions. The Green function must be
G(x|ξ) =

0 for x < ξ
u
ξ
(x) for x > ξ,
where u
ξ
(x) is the linear combination of u

1
and u
2
that satisfies
u
ξ
(ξ) = 0, u

ξ
(ξ) = 1.
1096
Note that the non-vanishing Wronskian ensures a un iqu e solution for u
ξ
. We can write the Green function in the form
G(x|ξ) = H(x −ξ)u
ξ
(x).
This is known as the causal solution. The solution for u is
u =

b
a
G(x|ξ)f(ξ) dξ
=

b
a
H(x −ξ)u
ξ
(x)f(ξ) dξ

=

x
a
u
ξ
(x)f(ξ) dξ
Now we have the solution for y,
y = v +

x
a
u
ξ
(x)f(ξ) dξ.
Result 21.7.3 The solution of the problem
y

+ p(x)y

+ q(x)y = f(x), y(a) = γ
1
, y

(a) = γ
2
,
is
y = y
h

+

x
a
y
ξ
(x)f(ξ) dξ
where y
h
is the combination of the homogeneous solutions of the equation that satisfy the
initial conditions and y
ξ
(x) is the linear combination of homogeneous solutions that satisfy
y
ξ
(ξ) = 0, y

ξ
(ξ) = 1.
1097
21.7.3 Problems with Unmixed Boundary Conditions
Consider
L[y] = y

+ p(x)y

+ q(x)y = f(x), for a < x < b,
subject the the unmixed boundary conditions
α
1

y(a) + α
2
y

(a) = γ
1
, β
1
y(b) + β
2
y

(b) = γ
2
.
The solution is y = u + v where
u

+ p(x)u

+ q(x)u = f(x), α
1
u(a) + α
2
u

(a) = 0, β
1
u(b) + β
2

u

(b) = 0,
and
v

+ p(x)v

+ q(x)v = 0, α
1
v(a) + α
2
v

(a) = γ
1
, β
1
v(b) + β
2
v

(b) = γ
2
.
The problem for v may have no solution, a uni que solution or an infinite number of solutions. We consider only the
case that there is a unique solution for v. In this case the homogeneous equation subject to homogeneous boundary
conditions has only the trivial solution.
The Green function for u satisfies
G


(x|ξ) + p(x)G

(x|ξ) + q(x)G(x|ξ) = δ(x − ξ),
α
1
G(a|ξ) + α
2
G

(a|ξ) = 0, β
1
G(b|ξ) + β
2
G

(b|ξ) = 0.
The continuity and jump conditions are
G(ξ

|ξ) = G(ξ
+
|ξ), G



|ξ) + 1 = G


+

|ξ).
Let u
1
and u
2
be two solutions of the homogeneous equation that satisfy the left and right boundary conditions,
respectively. The non-vanishing of the Wronskian ensures that these solutions exist. Let W (x) denote the Wronskian
1098
of u
1
and u
2
. Since the homogeneous equation with homogeneous boundary conditions has only the trivial solution,
W (x) is nonzero on [a, b]. The Green function has the form
G(x|ξ) =

c
1
u
1
for x < ξ,
c
2
u
2
for x > ξ.
The continuity and jump conditions for Green function gives us the equations
c
1
u

1
(ξ) − c
2
u
2
(ξ) = 0
c
1
u

1
(ξ) − c
2
u

2
(ξ) = −1.
Using Kramer’s rule, the solution is
c
1
=
u
2
(ξ)
W (ξ)
, c
2
=
u
1

(ξ)
W (ξ)
.
Thus the Green function is
G(x|ξ) =

u
1
(x)u
2
(ξ)
W (ξ)
for x < ξ,
u
1
(ξ)u
2
(x)
W (ξ)
for x > ξ.
The solution for u is
u =

b
a
G(x|ξ)f(ξ) dξ.
Thus if there is a unique solution for v, the solution for y is
y = v +

b

a
G(x|ξ)f(ξ) dξ.
1099
Result 21.7.4 Consider the problem
y

+ p(x)y

+ q(x)y = f(x),
α
1
y(a) + α
2
y

(a) = γ
1
, β
1
y(b) + β
2
y

(b) = γ
2
.
If the homogeneous differential equation subject to the inhomogeneous boundary conditions
has the unique solution y
h
, then the problem has the unique solution

y = y
h
+

b
a
G(x|ξ)f(ξ) dξ
where
G(x|ξ) =

u
1
(x)u
2
(ξ)
W (ξ)
for x < ξ,
u
1
(ξ)u
2
(x)
W (ξ)
for x > ξ,
u
1
and u
2
are solutions of the homogeneous differential equation that satisfy the left and right
boundary conditions, respectively, and W (x) is the Wronskian of u

1
and u
2
.
21.7.4 Problems with Mixed Boundary Conditions
Consider
L[y] = y

+ p(x)y

+ q(x)y = f(x), for a < x < b,
subject the the mixed boundary conditions
B
1
[y] = α
11
y(a) + α
12
y

(a) + β
11
y(b) + β
12
y

(b) = γ
1
,
B

2
[y] = α
21
y(a) + α
22
y

(a) + β
21
y(b) + β
22
y

(b) = γ
2
.
1100
The solution is y = u + v where
u

+ p(x)u

+ q(x)u = f(x), B
1
[u] = 0, B
2
[u] = 0,
and
v


+ p(x)v

+ q(x)v = 0, B
1
[v] = γ
1
, B
2
[v] = γ
2
.
The problem for v may have no solution, a unique solution or an infinite number of solutions. Again we consider
only the case that there is a unique solution for v. In this case the homogeneous equation sub ject to homogeneous
boundary conditions has only the trivial solution.
Let y
1
and y
2
be two solutions of the homogeneous equation that satisfy the boundary conditions B
1
[y
1
] = 0 and
B
2
[y
2
] = 0. Since the completely homogeneous problem has no solutions, we know that B
1
[y

2
] and B
2
[y
1
] are nonzero.
The solution for v has the form
v = c
1
y
1
+ c
2
y
2
.
Applying the two boundary conditions yields
v =
γ
2
B
2
[y
1
]
y
1
+
γ
1

B
1
[y
2
]
y
2
.
The Green function for u satisfies
G

(x|ξ) + p(x)G

(x|ξ) + q(x)G(x|ξ) = δ(x − ξ), B
1
[G] = 0, B
2
[G] = 0.
The continuity and jump conditions are
G(ξ

|ξ) = G(ξ
+
|ξ), G



|ξ) + 1 = G



+
|ξ).
We write the Green function as the sum of the causal solution and the two homogeneous solutions
G(x|ξ) = H(x −ξ)y
ξ
(x) + c
1
y
1
(x) + c
2
y
2
(x)
1101
With this form, the continuity and jump conditions are automatically satisfied. Applying the boundary conditions yields
B
1
[G] = B
1
[H(x −ξ)y
ξ
] + c
2
B
1
[y
2
] = 0,
B

2
[G] = B
2
[H(x −ξ)y
ξ
] + c
1
B
2
[y
1
] = 0,
B
1
[G] = β
11
y
ξ
(b) + β
12
y

ξ
(b) + c
2
B
1
[y
2
] = 0,

B
2
[G] = β
21
y
ξ
(b) + β
22
y

ξ
(b) + c
1
B
2
[y
1
] = 0,
G(x|ξ) = H(x −ξ)y
ξ
(x) −
β
21
y
ξ
(b) + β
22
y

ξ

(b)
B
2
[y
1
]
y
1
(x) −
β
11
y
ξ
(b) + β
12
y

ξ
(b)
B
1
[y
2
]
y
2
(x).
Note that the Green function is well defined since B
2
[y

1
] and B
1
[y
2
] are nonzero. The solution for u is
u =

b
a
G(x|ξ)f(ξ) dξ.
Thus if there is a unique solution for v, the solution for y is
y =

b
a
G(x|ξ)f(ξ) dξ +
γ
2
B
2
[y
1
]
y
1
+
γ
1
B

1
[y
2
]
y
2
.
1102
Result 21.7.5 Consider the problem
y

+ p(x)y

+ q(x)y = f(x),
B
1
[y] = α
11
y(a) + α
12
y

(a) + β
11
y(b) + β
12
y

(b) = γ
1

,
B
2
[y] = α
21
y(a) + α
22
y

(a) + β
21
y(b) + β
22
y

(b) = γ
2
.
If the homogeneous differential equation subject to the homogeneous boundary conditions
has no solution, then the problem has the unique solution
y =

b
a
G(x|ξ)f(ξ) dξ +
γ
2
B
2
[y

1
]
y
1
+
γ
1
B
1
[y
2
]
y
2
,
where
G(x|ξ) = H(x −ξ)y
ξ
(x) −
β
21
y
ξ
(b) + β
22
y

ξ
(b)
B

2
[y
1
]
y
1
(x)

β
11
y
ξ
(b) + β
12
y

ξ
(b)
B
1
[y
2
]
y
2
(x),
y
1
and y
2

are solutions of the homogeneous differential equation that satisfy the first and sec-
ond boundary conditions, respectively, and y
ξ
(x) is the solution of the homogeneous equation
that satisfies y
ξ
(ξ) = 0, y

ξ
(ξ) = 1.
1103
21.8 Green Functions for Higher Order Problems
Consider the n
th
order differential equation
L[y] = y
(n)
+ p
n−1
(x)y
(n−1)
+ ··· + p
1
(x)y

+ p
0
y = f(x) on a < x < b,
subject to the n independent boundary conditions
B

j
[y] = γ
j
where the boundary conditions are of the form
B[y] ≡
n−1

k=0
α
k
y
(k)
(a) +
n−1

k=0
β
k
y
(k)
(b).
We assum e that the coefficient functions in the di fferential equation are continuous on [a, b]. The solution is y = u + v
where u and v satisfy
L[u] = f(x), with B
j
[u] = 0,
and
L[v] = 0, with B
j
[v] = γ

j
From Result 21.5.3, we know that if the completely homogeneous problem
L[w] = 0, with B
j
[w] = 0,
has only the trivial solution, then the solution for y exists and is unique. We will construct this solution using Green
functions.
1104
First we consider the problem for v. Let {y
1
, . . . , y
n
} be a set of linearly independent solutions. The solution for v
has the form
v = c
1
y
1
+ ··· + c
n
y
n
where the constants are determined by the matrix equation





B
1

[y
1
] B
1
[y
2
] ··· B
1
[y
n
]
B
2
[y
1
] B
2
[y
2
] ··· B
2
[y
n
]
.
.
.
.
.
.

.
.
.
.
.
.
B
n
[y
1
] B
n
[y
2
] ··· B
n
[y
n
]










c

1
c
2
.
.
.
c
n





=





γ
1
γ
2
.
.
.
γ
n






.
To solve the problem for u we consider the Green function satisfying
L[G(x|ξ)] = δ(x −ξ), with B
j
[G] = 0.
Let y
ξ
(x) be the linear combination of the homogeneous solutions that satisfy the conditions
y
ξ
(ξ) = 0
y

ξ
(ξ) = 0
.
.
. =
.
.
.
y
(n−2)
ξ
(ξ) = 0
y
(n−1)

ξ
(ξ) = 1.
The causal solution is then
y
c
(x) = H(x −ξ)y
ξ
(x).
The Green function has the form
G(x|ξ) = H(x −ξ)y
ξ
(x) + d
1
y
1
(x) + ··· + d
n
y
n
(x)
1105
The constants are determined by the matrix equation





B
1
[y

1
] B
1
[y
2
] ··· B
1
[y
n
]
B
2
[y
1
] B
2
[y
2
] ··· B
2
[y
n
]
.
.
.
.
.
.
.

.
.
.
.
.
B
n
[y
1
] B
n
[y
2
] ··· B
n
[y
n
]










d
1

d
2
.
.
.
d
n





=





−B
1
[H(x −ξ)y
ξ
(x)]
−B
2
[H(x −ξ)y
ξ
(x)]
.
.

.
−B
n
[H(x −ξ)y
ξ
(x)]





.
The solution for u then is
u =

b
a
G(x|ξ)f(ξ) dξ.
Result 21.8.1 Consider the n
th
order differential equation
L[y] = y
(n)
+ p
n−1
(x)y
(n−1)
+ ··· + p
1
(x)y


+ p
0
y = f(x) on a < x < b,
subject to the n independent boundary conditions
B
j
[y] = γ
j
If the homogeneous differential equation subject to the homogeneous boundary conditions
has only the trivial solution, then the problem has the unique solution
y =

b
a
G(x|ξ)f(ξ) dξ + c
1
y
1
+ ···c
n
y
n
where
G(x|ξ) = H(x −ξ)y
ξ
(x) + d
1
y
1

(x) + ···+ d
n
y
n
(x),
{y
1
, . . . , y
n
} is a set of solutions of the homogeneous differential equation, and the constants
c
j
and d
j
can be determined by solving sets of linear equations.
1106
Example 21.8.1 Consider the problem
y

− y

+ y

− y = f(x),
y(0) = 1, y

(0) = 2, y(1) = 3.
The completely homogeneous associated problem is
w


− w

+ w

− w = 0, w(0) = w

(0) = w(1) = 0.
The solution of the differential equation is
w = c
1
cos x + c
2
sin x + c
2
e
x
.
The boundary conditions give us the equation


1 0 1
0 1 1
cos 1 sin 1 e




c
1
c

2
c
3


=


0
0
0


.
The determinant of the matrix is e − cos 1 − sin 1 = 0. Thus the homogeneous problem has only the trivial solution
and the inhomogeneous problem has a unique solution.
We separate the inhomogeneous problem into the two problems
u

− u

+ u

− u = f(x), u(0) = u

(0) = u(1) = 0,
v

− v


+ v

− v = 0, v(0) = 1, v

(0) = 2, v(1) = 3,
First we solve the problem for v. The solution of the differential equation is
v = c
1
cos x + c
2
sin x + c
2
e
x
.
The boundary conditions yields the equation


1 0 1
0 1 1
cos 1 sin 1 e




c
1
c
2
c

3


=


1
2
3


.
1107
The solution for v is
v =
1
e − cos 1 − sin 1

(e + sin 1 − 3) cos x + (2e − cos 1 − 3) sin x + (3 − cos 1 − 2 sin 1)
e
x

.
Now we find the Green function for the problem in u. The causal solution is
H(x −ξ)u
ξ
(x) = H(x −ξ)
1
2


(sin ξ − cos ξ) cos x − (sin ξ + cos ξ) sin ξ +
e
−ξ
e
x

,
H(x −ξ)u
ξ
(x) =
1
2
H(x −ξ)

e
x−ξ
−cos(x − ξ) − sin(x − ξ)

.
The Green function has the form
G(x|ξ) = H(x −ξ)u
ξ
(x) + c
1
cos x + c
2
sin x + c
3
e
x

.
The constants are determined by the three conditions

c
1
cos x + c
2
sin x + c
3
e
x

x=0
= 0,


∂x
(c
1
cos x + c
2
sin x + c
3
e
x
)

x=0
= 0,


u
ξ
(x) + c
1
cos x + c
2
sin x + c
3
e
x

x=1
= 0.
The Green function is
G(x|ξ) =
1
2
H(x −ξ)

e
x−ξ
−cos(x − ξ) − sin(x − ξ)

+
cos(1 − ξ) + sin(1 − ξ) −
e
1−ξ
2(cos 1 + sin 1 − e)

cos x + sin x −

e
x

The solution for v is
v =

1
0
G(x|ξ)f(ξ) dξ.
Thus the solution for y is
1108
y =

1
0
G(x|ξ)f(ξ) dξ +
1
e − cos 1 − sin 1

(e + sin 1 − 3) cos x
+ (2e − cos 1 − 3) sin x + (3 − cos 1 − 2 sin 1)
e
x

.
21.9 Fredholm Alternative Theorem
Orthogonality. Two real vectors, u and v are orthogonal if u · v = 0. Consider two functions, u(x) and v(x),
defined in [a, b]. The dot product in vector space is analogous to the integral

b

a
u(x)v(x) dx
in function space. Thus two real functions are orthogonal if

b
a
u(x)v(x) dx = 0.
Consider the n
th
order linear inhomogeneous differential equation
L[y] = f(x) on [a, b],
subject to the linear inhomogeneous boundary conditions
B
j
[y] = 0, for j = 1, 2, . . . n.
The Fredholm alternative theorem tells us if the problem has a unique solution, an infinite number of solutions, or
no solution. Before presenting the theorem, we will consider a few motivating examples.
1109
No Nontrivial Homogeneous Solutions. In the section on Green functions we showed that if the completely
homogeneous problem has only the trivial solution then the inhomogeneous problem has a unique solution.
Nontrivial Homogeneous Solutions Exist. If there are nonzero solutions to the homogeneous problem L[y] = 0
that satisfy the homogeneous boundary conditions B
j
[y] = 0 then the inhomogeneous problem L[y] = f(x) subject to
the same boundary conditions either has no solution or an infinite number of solutions.
Suppose there is a particular solution y
p
that satisfies the boundary conditions. If there is a solution y
h
to the

homogeneous equation that satisfies the boundary conditions then there will be an infinite number of solutions s ince
y
p
+ cy
h
is also a particular solution.
The question now remains: Given that there are homogeneous solutions that satisfy the boundary conditions, how
do we know if a particular solution that satisfies the b oundary conditions exists? Before we address this question we
will consider a few examples.
Example 21.9.1 Consider the problem
y

+ y = cos x, y(0) = y(π) = 0.
The two homogeneous solutions of the differential equation are
y
1
= cos x, and y
2
= sin x.
y
2
= sin x satisfies the boundary conditions. Thus we know that there are either no solutions or an infinite number of
1110
solutions. A particular solution is
y
p
= −cos x

cos x sin x
1

dx + sin x

cos
2
x
1
dx
= −cos x

1
2
sin(2x) dx + sin x


1
2
+
1
2
cos(2x)

dx
=
1
4
cos x cos(2x) + sin x

1
2
x +

1
4
sin(2x)

=
1
2
x sin x +
1
4

cos x cos(2x) + sin x sin(2x)

=
1
2
x sin x +
1
4
cos x
The general solution is
y =
1
2
x sin x + c
1
cos x + c
2
sin x.
Applying the two boundary conditions yields

y =
1
2
x sin x + c sin x.
Thus there are an infinite number of solutions.
Example 21.9.2 Consider the differential equation
y

+ y = sin x, y(0) = y(π) = 0.
The general solution is
y = −
1
2
x cos x + c
1
cos x + c
2
sin x.
1111
Applying the boundary conditions,
y(0) = 0 → c
1
= 0
y(π) = 0 → −
1
2
π cos(π) + c
2
sin(π) = 0


π
2
= 0.
Since this equation has no solution, there are no solutions to the inhomogeneous problem.
In both of the above examples there is a homogeneous solution y = sin x that satisfies the boundary conditions.
In Example
21.9.1, the inhomogeneous term is cos x and there are an infinite number of solutions. In Example 21.9.2,
the inhomogeneity is sin x and there are no solutions. In general, if the inhomogeneous term is orthogonal to all the
homogeneous solutions that satisfy the boundary conditions then there are an infinite number of solutions. If not, there
are no inhomogeneous solutions.
1112
Result 21.9.1 Fredholm Alternative Theorem. Consider the n
th
order inhomogeneous
problem
L[y] = f(x) on [a, b] subject to B
j
[y] = 0 for j = 1, 2, . . . , n,
and the associated homogeneous problem
L[y] = 0 on [a, b] subject to B
j
[y] = 0 for j = 1, 2, . . . , n.
If the homogeneous problem h as only the trivial solution then the inhomogeneous problem has
a unique solution. If the homogeneous problem has m independent solutions, {y
1
, y
2
, . . . , y
m
},

then there are two possibilities:
• If f(x) is orthogonal to each of the homogeneous solutions then there are an infinite
number of solutions of the form
y = y
p
+
m

j=1
c
j
y
j
.
• If f(x) is not orthogonal to each of the homogeneous solutions then there are no inho-
mogeneous solutions.
Example 21.9.3 Consider the problem
y

+ y = cos 2x, y(0) = 1, y(π) = 2.
cos x and sin x are two linearly independent solutions to the homogeneous equation. sin x satisfies the homogeneous
boundary conditions. Thus there are either an infinite number of solutions, or no solution.
1113
To transform this problem to one with homogeneous boundary conditions, we note that g(x) =
x
π
+ 1 and make
the change of variables y = u + g to obtain
u


+ u = cos 2x −
x
π
− 1, y(0) = 0, y(π) = 0.
Since cos 2x −
x
π
− 1 is not orthogonal to sin x, there is no solution to the inhomogeneous problem.
To check this, the general solution is
y = −
1
3
cos 2x + c
1
cos x + c
2
sin x.
Applying the boundary conditions,
y(0) = 1 → c
1
=
4
3
y(π) = 2 → −
1
3

4
3
= 2.

Thus we see that the right boundary condition cannot be satisfied.
Example 21.9.4 Consider
y

+ y = cos 2x, y

(0) = y(π) = 1.
There are no solutions to the homogeneous equation that satisfy the homogeneous boundary conditions. To check this,
note that all solutions of the homogeneous equation have the form u
h
= c
1
cos x + c
2
sin x.
u

h
(0) = 0 → c
2
= 0
u
h
(π) = 0 → c
1
= 0.
From the Fredholm Alternative Theorem we see that the inhomogeneous problem has a unique solution.
To find the solution, start with
y = −
1

3
cos 2x + c
1
cos x + c
2
sin x.
1114
y

(0) = 1 → c
2
= 1
y(π) = 1 → −
1
3
− c
1
= 1
Thus the solution is
y = −
1
3
cos 2x −
4
3
cos x + sin x.
Example 21.9.5 Consider
y

+ y = cos 2x, y(0) =

2
3
, y(π) = −
4
3
.
cos x and sin x satisfy the homogeneous differential equation. sin x satisfies the homogeneous boundary conditions.
Since g(x) = cos x − 1/3 satisfies the boundary conditions, the substitution y = u + g yields
u

+ u = cos 2x +
1
3
, y(0) = 0, y(π) = 0.
Now we check if sin x is orthogonal to cos 2x +
1
3
.

π
0
sin x

cos 2x +
1
3

dx =

π

0
1
2
sin 3x −
1
2
sin x +
1
3
sin x dx
=


1
6
cos 3x +
1
6
cos x

π
0
= 0
Since sin x is orthogonal to the inhomogeneity, there are an infinite numb er of solutions to the problem for u, (and
hence the problem for y).
As a check, then general solution for y is
y = −
1
3
cos 2x + c

1
cos x + c
2
sin x.
1115
Applying the boundary conditions,
y(0) =
2
3
→ c
1
= 1
y(π) = −
4
3
→ −
4
3
= −
4
3
.
Thus we see that c
2
is arbitrary. There are an infinite number of solutions of the form
y = −
1
3
cos 2x + cos x + c sin x.
1116

21.10 Exercises
Undetermined Coefficients
Exercise 21.1 (mathematica/o de/inhomogeneous/undet ermined.nb)
Find the general solution of the following equations.
1. y

+ 2y

+ 5y = 3 sin(2t)
2. 2y

+ 3y

+ y = t
2
+ 3 sin(t)
Hint, Solution
Exercise 21.2 (mathematica/o de/inhomogeneous/undet ermined.nb)
Find the solution of each one of the following initial value problems.
1. y

− 2y

+ y = t
e
t
+4, y(0) = 1, y

(0) = 1
2. y


+ 2y

+ 5y = 4
e
−t
cos(2t), y(0) = 1, y

(0) = 0
Hint, Solution
Variation of Parameters
Exercise 21.3 (mathematica/o de/inhomogeneous/variation.nb)
Use the method of variation of parameters to find a particular solution of the given differential equation.
1. y

− 5y

+ 6y = 2
e
t
2. y

+ y = tan(t), 0 < t < π/2
3. y

− 5y

+ 6y = g(t), for a given function g.
Hint, Solution
1117

×