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

Advanced Mathematical Methods for Scientists and Engineers Episode 3 Part 8 ppsx

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 (317.9 KB, 40 trang )


Now consider the case that y

(x) is negative on the interval so y(a) > y(b).

b
a
δ(y(x)) dx =

y(b)
y(a)
δ(y)

dy
dx

−1
dy
=

y(b)
y(a)
δ(y)
y

(x)
dy
=

y(a)
y(b)


δ(y)
−y

(x)
dy
=


y(a)
y(b)
δ(y)
−y

(x
n
)
dy for y(x
n
) = 0 if y(b) < 0 < y(a)
0 otherwise
We conclude that

b
a
δ(y(x)) dx =


β
α
δ(y)

|y

(x
n
)|
dy if y(x
n
) = 0 for a < x
n
< b
0 otherwise
for α = min(y(a), y(b)) and β = max(y(a), y(b)).
1054
Now we turn to the integral of δ(y(x)) on (−∞. . . ∞). Let α
m
= min(y(ξ
m
), y(ξ
m
)) and β
m
= max(y(ξ
m
), y(ξ
m
)).


−∞
δ(y(x)) dx =


m

ξ
m+1
ξ
m
δ(y(x)) dx
=

m
x
n
∈(ξ
m
ξ
m+1
)

ξ
m+1
ξ
m
δ(y(x)) dx
=

m
x
n
∈(ξ

m
ξ
m+1
)

β
m+1
α
m
δ(y)
|y

(x
n
)|
dy
=

n


−∞
δ(y)
|y

(x
n
)|
dy
=



−∞

n
δ(y)
|y

(x
n
)|
dy
δ(y(x)) =

n
δ(x −x
n
)
|y

(x
n
)|
Solution 20.5
To justify the identity,


−∞
f(x)δ
(n)

(x) dx = (−1)
n
f
(n)
(0),
1055
we will use integration by parts.


−∞
f(x)δ
(n)
(x) dx =

f(x)δ
(n−1)
(x)


−∞



−∞
f

(x)δ
(n−1)
(x) dx
= −



−∞
f

(x)δ
(n−1)
(x) dx
= (−1)
n


−∞
f
(n)
(x)δ(x) dx
= (−1)
n
f
(n)
(0)
CONTINUE HERE
δ
(n)
(−x) = (−1)
n
δ
(n)
(x) and xδ
(n)

(x) = −nδ
(n−1)
(x).
Solution 20.6
The Dirac delta function is defined by the following two properties.
δ(x − a) = 0 for x = a

R
n
δ(x − a) dx = 1
We verify that δ(ξ −α)/|J| satisfies these properties in the ξ coordinate system.
δ(ξ −α)
|J|
=
δ(ξ
1
− α
1
) ···δ(ξ
n
− α
n
)
|J|
= 0 for ξ = α
1056

δ(ξ −α)
|J|
|J|dξ =


δ(ξ −α) dξ
=

δ(ξ
1
− α
1
) ···δ(ξ
n
− α
n
) dξ
=

δ(ξ
1
− α
1
) dξ
1
···

δ(ξ
n
− α
n
) dξ
n
= 1

We conclude that δ(ξ −α)/|J| is the Dirac delta function in the ξ coordinate system.
δ(x − a) =
δ(ξ −α)
|J|
Solution 20.7
We consider the Dirac delta function in spherical coordinates, (r, θ, φ). The Jacobian is J = r
2
sin(φ).

π
0


0


0
δ
3
(x − x
0
) r
2
sin(φ) dr dθ dφ = 1
For r
0
= 0, and φ
0
= 0, π, the Dirac Delta function is
δ

3
(x − x
0
) =
1
r
2
sin(φ)
δ (r −r
0
) δ (θ −θ
0
) δ (φ − φ
0
)
since it satisfies the two defining properties.
1
r
2
sin(φ)
δ (r −r
0
) δ (θ −θ
0
) δ (φ − φ
0
) = 0 for (r, θ, φ) = (r
0
, θ
0

, φ
0
)

π
0


0


0
1
r
2
sin(φ)
δ (r −r
0
) δ (θ −θ
0
) δ (φ − φ
0
) r
2
sin(φ) dr dθ dφ
=


0
δ (r −r

0
) dr


0
δ (θ −θ
0
) dθ

π
0
δ (φ − φ
0
) dφ = 1
1057
For φ
0
= 0 or φ
0
= π, the Dirac delta function is
δ
3
(x − x
0
) =
1
2πr
2
sin(φ)
δ (r −r

0
) δ (φ − φ
0
) .
We check that the value of the integral is unity.

π
0


0


0
1
2πr
2
sin(φ)
δ (r −r
0
) δ (φ − φ
0
) r
2
sin(φ) dr dθ dφ
=
1




0
δ (r −r
0
) dr


0


π
0
δ (φ − φ
0
) dφ = 1
For r
0
= 0 the Dirac delta function is
δ
3
(x) =
1
4πr
2
δ (r)
We verify that the value of the integral is unity.

π
0



0


0
1
4πr
2
δ (r −r
0
) r
2
sin(φ) dr dθ dφ =
1



0
δ (r) dr


0


π
0
sin(φ) dφ = 1
1058
Chapter 21
Inhomogeneous Differential Equations
Feelin’ stupid? I know I am!

-Homer Simpson
21.1 Particular Solutions
Consider the n
th
order linear homogeneous equation
L[y] ≡ y
(n)
+ p
n−1
(x)y
(n−1)
+ ··· + p
1
(x)y

+ p
0
(x)y = 0.
Let {y
1
, y
2
, . . . , y
n
} be a set of linearly independent homogeneous solutions, L[y
k
] = 0. We know that the general
solution of the homogeneous equation is a linear combination of the homogeneous solutions.
y
h

=
n

k=1
c
k
y
k
(x)
Now consider the n
th
order linear inhomogeneous equation
L[y] ≡ y
(n)
+ p
n−1
(x)y
(n−1)
+ ··· + p
1
(x)y

+ p
0
(x)y = f(x).
1059
Any function y
p
which satisfies this equation is called a particular solution of the differential equation. We want to
know the general solution of the inhomogeneous equation. Later in this chapter we will cover methods of constructing

this solution; now we consider the form of the solution.
Let y
p
be a particular solution. Note that y
p
+ h is a particular solution if h satisfies the homogeneous equation.
L[y
p
+ h] = L[y
p
] + L[h] = f + 0 = f
Therefore y
p
+ y
h
satisfies the homogeneous equation. We show that this is the general solution of the inhomogeneous
equation. Let y
p
and η
p
both be solutions of the inhomogeneous equation L[y] = f. The difference of y
p
and η
p
is a
homogeneous solution.
L[y
p
− η
p

] = L[y
p
] − L[η
p
] = f − f = 0
y
p
and η
p
differ by a linear combination of the homogeneous solutions {y
k
}. Therefore the general solution of L[y] = f
is the sum of any particular solution y
p
and the general homogeneous solution y
h
.
y
p
+ y
h
= y
p
(x) +
n

k=1
c
k
y

k
(x)
Result 21.1.1 The general solution of the n
th
order linear inhomogeneous equation L[y] =
f(x) is
y = y
p
+ c
1
y
1
+ c
2
y
2
+ ···+ c
n
y
n
,
where y
p
is a particular solution, {y
1
, . . . , y
n
} is a set of linearly independent homogeneous
solutions, and the c
k

’s are arbitrary constants.
Example 21.1.1 The diffe rential e quation
y

+ y = sin(2x)
has the two homogeneous solutions
y
1
= cos x, y
2
= sin x,
1060
and a particular solution
y
p
= −
1
3
sin(2x).
We can add any combination of the homogeneous solutions to y
p
and it will still be a particular solution. For example,
η
p
= −
1
3
sin(2x) −
1
3

sin x
= −
2
3
sin

3x
2

cos

x
2

is a particular solution.
21.2 Method of Undetermined Coefficients
The first method we present for computing particular solutions is the method of undetermined coefficients. For some
simple differential equations, (primarily constant coefficient equations), and some simple inhomogeneities we are able
to guess the form of a particular solution. This form will contain some unknown parameters. We substitute this form
into the differential equation to determine the parameters and thus determine a particular solution.
Later in this chapter we will present general methods which work for any linear differential equation and any
inhogeneity. Thus one might wonder why I would present a method that works only for some simple problems. (And
why it is called a “method” if it amounts to no more than guessing.) The answer is that guessing an answer is less
grungy than computing it with the formulas we will develop later. Also, the process of this guessing is not random,
there is rhyme and reason to it.
Consider an n
th
order constant coefficient, inhomogeneous equation.
L[y] ≡ y
(n)

+ a
n−1
y
(n−1)
+ ··· + a
1
y

+ a
0
y = f(x)
If f(x) is one of a few simple forms, then we can guess the form of a particular solution. Below we enumerate some
cases.
1061
f = p(x). If f is an m
th
order polynomial, f(x) = p
m
x
m
+ ··· + p
1
x + p
0
, then guess
y
p
= c
m
x

m
+ ···c
1
x + c
0
.
f = p(x) e
ax
. If f is a polynomial times an exponential then guess
y
p
= (c
m
x
m
+ ···c
1
x + c
0
)
e
ax
.
f = p(x) e
ax
cos (bx). If f is a cosine or sine times a polynomial and perhaps an exponential, f(x) = p(x)
e
ax
cos(bx)
or f(x) = p(x)

e
ax
sin(bx) then guess
y
p
= (c
m
x
m
+ ···c
1
x + c
0
)
e
ax
cos(bx) + (d
m
x
m
+ ···d
1
x + d
0
)
e
ax
sin(bx).
Likewise for hyperbolic sines and hyperbolic cosines.
Example 21.2.1 Consider

y

− 2y

+ y = t
2
.
The homogeneous solutions are y
1
=
e
t
and y
2
= t
e
t
. We guess a particular solution of the form
y
p
= at
2
+ bt + c.
We substitute the expression into the differential equation and equate coefficients of powers of t to determine the
parameters.
y

p
− 2y


p
+ y
p
= t
2
(2a) −2(2at + b) + (at
2
+ bt + c) = t
2
(a − 1)t
2
+ (b − 4a)t + (2a − 2b + c) = 0
a − 1 = 0, b − 4a = 0, 2a − 2b + c = 0
a = 1, b = 4, c = 6
A particular solution is
y
p
= t
2
+ 4t + 6.
1062
If the inhomogeneity is a sum of terms, L[y] = f ≡ f
1
+···+f
k
, you can solve the problems L[y] = f
1
, . . . , L[y] = f
k
independently and then take the sum of the solutions as a particular solution of L[y] = f.

Example 21.2.2 Consider
L[y] ≡ y

− 2y

+ y = t
2
+
e
2t
. (21.1)
The homogeneous solutions are y
1
=
e
t
and y
2
= t
e
t
. We already know a particular solution to L[y] = t
2
. We seek a
particular solution to L[y] =
e
2t
. We guess a particular solution of the form
y
p

= a
e
2t
.
We substitute the expression into the differential equation to determine the parameter.
y

p
− 2y

p
+ y
p
=
e
2t
4ae
2t
− 4a
e
2t
+a
e
2t
=
e
2t
a = 1
A particular solution of L[y] =
e

2t
is y
p
=
e
2t
. Thus a particular solution of Equation 21.1 is
y
p
= t
2
+ 4t + 6 +
e
2t
.
The above guesses will not work if the inhomogeneity is a homogeneous solution. In this case, multiply the guess by
the lowest power of x such that the guess does not contain homogeneous solutions.
Example 21.2.3 Consider
L[y] ≡ y

− 2y

+ y =
e
t
.
The homogeneous solutions are y
1
=
e

t
and y
2
= t
e
t
. Guessing a particular solution of the form y
p
= a
e
t
would not
work because L[
e
t
] = 0. We guess a particular solution of the form
y
p
= at
2
e
t
1063
We substitute the expression into the differential equation and equate coefficients of like terms to determine the
parameters.
y

p
− 2y


p
+ y
p
=
e
t
(at
2
+ 4at + 2a)
e
t
−2(at
2
+ 2at)
e
t
+at
2
e
t
=
e
t
2a
e
t
=
e
t
a =

1
2
A particular solution is
y
p
=
t
2
2
e
t
.
Example 21.2.4 Consider
y

+
1
x
y

+
1
x
2
y = x, x > 0.
The homogeneous solutions are y
1
= cos(ln x) and y
2
= sin(ln x). We guess a particular solution of the form

y
p
= ax
3
We substitute the expression into the differential equation and equate coefficients of like terms to determine the
parameter.
y

p
+
1
x
y

p
+
1
x
2
y
p
= x
6ax + 3ax + ax = x
a =
1
10
A particular solution is
y
p
=

x
3
10
.
1064
21.3 Variation of Parameters
In this section we present a method for computing a particular solution of an inhomogeneous equation given that we
know the homogeneous solutions. We will first consider second order equations and then generalize the result f or n
th
order equations.
21.3.1 Second Order Differential Equations
Consider the second order inhomogeneous equation,
L[y] ≡ y

+ p(x)y

+ q(x)y = f(x), on a < x < b.
We assume that the coefficient functions in the differential equation are continuous on [a . . . b]. Let y
1
(x) and y
2
(x)
be two linearly independent solutions to the homogeneous equation. Since the Wronskian,
W (x) = exp



p(x) dx

,

is non-vanishing, we know that these solutions exist. We seek a particular solution of the form,
y
p
= u
1
(x)y
1
+ u
2
(x)y
2
.
We compute the derivatives of y
p
.
y

p
= u

1
y
1
+ u
1
y

1
+ u


2
y
2
+ u
2
y

2
y

p
= u

1
y
1
+ 2u

1
y

1
+ u
1
y

1
+ u

2

y
2
+ 2u

2
y

2
+ u
2
y

2
We substitute the expression for y
p
and its d erivatives into the inhomogeneous equation and use the fact that y
1
and
y
2
are homogeneous solutions to simplify the equation.
u

1
y
1
+ 2u

1
y


1
+ u
1
y

1
+ u

2
y
2
+ 2u

2
y

2
+ u
2
y

2
+ p(u

1
y
1
+ u
1

y

1
+ u

2
y
2
+ u
2
y

2
) + q(u
1
y
1
+ u
2
y
2
) = f
u

1
y
1
+ 2u

1

y

1
+ u

2
y
2
+ 2u

2
y

2
+ p(u

1
y
1
+ u

2
y
2
) = f
1065
This is an ugly equation for u
1
and u
2

, however, we have an ace up our sleeve. Since u
1
and u
2
are undetermined
functions of x, we are free to impose a constraint. We choose this constraint to simplify the algebra.
u

1
y
1
+ u

2
y
2
= 0
This constraint simplifies the derivatives of y
p
,
y

p
= u

1
y
1
+ u
1

y

1
+ u

2
y
2
+ u
2
y

2
= u
1
y

1
+ u
2
y

2
y

p
= u

1
y


1
+ u
1
y

1
+ u

2
y

2
+ u
2
y

2
.
We substitute the new expressions for y
p
and its derivatives into the inhomogeneous differential equation to obtain a
much simpler equation than before.
u

1
y

1
+ u

1
y

1
+ u

2
y

2
+ u
2
y

2
+ p(u
1
y

1
+ u
2
y

2
) + q(u
1
y
1
+ u

2
y
2
) = f(x)
u

1
y

1
+ u

2
y

2
+ u
1
L[y
1
] + u
2
L[y
2
] = f(x)
u

1
y


1
+ u

2
y

2
= f(x).
With the constraint, we have a system of linear equations for u

1
and u

2
.
u

1
y
1
+ u

2
y
2
= 0
u

1
y


1
+ u

2
y

2
= f(x).

y
1
y
2
y

1
y

2

u

1
u

2

=


0
f

We solve this system using Kramer’s rule. (See Appendix
O.)
u

1
= −
f(x)y
2
W (x)
u

2
=
f(x)y
1
W (x)
1066
Here W (x) is the Wronskian.
W (x) =




y
1
y
2

y

1
y

2




We integrate to get u
1
and u
2
. This gives us a particular solution.
y
p
= −y
1

f(x)y
2
(x)
W (x)
dx + y
2

f(x)y
1
(x)

W (x)
dx.
Result 21.3.1 Let y
1
and y
2
be linearly independent homogeneous solutions of
L[y] = y

+ p(x)y

+ q(x)y = f(x).
A particular solution is
y
p
= −y
1
(x)

f(x)y
2
(x)
W (x)
dx + y
2
(x)

f(x)y
1
(x)

W (x)
dx,
where W (x) is the Wronskian of y
1
and y
2
.
Example 21.3.1 Consider the eq uation,
y

+ y = cos(2x).
The homogeneous solutions are y
1
= cos x and y
2
= sin x. We compute the Wronskian.
W (x) =




cos x sin x
−sin x cos x




= cos
2
x + sin

2
x = 1
1067
We use variation of parameters to find a particular solution.
y
p
= −cos(x)

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

cos(2x) cos(x) dx
= −
1
2
cos(x)


sin(3x) − sin(x)

dx +
1
2
sin(x)


cos(3x) + cos(x)

dx
= −
1

2
cos(x)


1
3
cos(3x) + cos(x)

+
1
2
sin(x)

1
3
sin(3x) + sin(x)

=
1
2

sin
2
(x) − cos
2
(x)

+
1
6


cos(3x) cos(x) + sin(3x) sin(x)

= −
1
2
cos(2x) +
1
6
cos(2x)
= −
1
3
cos(2x)
The general solution of the inhomogeneous equation is
y = −
1
3
cos(2x) + c
1
cos(x) + c
2
sin(x).
21.3.2 Higher Order Differential Equations
Consider the n
th
order inhomogeneous equation,
L[y] = y(n) + p
n−1
(x)y

(n−1)
+ ··· + p
1
(x)y

+ p
0
(x)y = f(x), on a < x < b.
We assume that the coefficient functions in the differential equation are continuous on [a . . . b]. Let {y
1
, . . . , y
n
} be a
set of linearly independent solutions to the homogeneous equation. Since the Wronskian,
W (x) = exp



p
n−1
(x) dx

,
1068
is non-vanishing, we know that these solutions exist. We seek a particular solution of the form
y
p
= u
1
y

1
+ u
2
y
2
+ ··· + u
n
y
n
.
Since {u
1
, . . . , u
n
} are undetermined functions of x, we are free to impose n−1 constraints. We choose these constraints
to simplify the algebra.
u

1
y
1
+u

2
y
2
+ ···+u

n
y

n
=0
u

1
y

1
+u

2
y

2
+ ···+u

n
y

n
=0
.
.
. +
.
.
. +
.
.
. +

.
.
. =0
u

1
y
(n−2)
1
+u

2
y
(n−2)
2
+ ···+u

n
y
(n−2)
n
=0
We differentiate the expression for y
p
, utilizing our constraints.
y
p
=u
1
y

1
+u
2
y
2
+ ···+u
n
y
n
y

p
=u
1
y

1
+u
2
y

2
+ ···+u
n
y

n
y

p

=u
1
y

1
+u
2
y

2
+ ···+u
n
y

n
.
.
. =
.
.
. +
.
.
. +
.
.
. +
.
.
.

y
(n)
p
=u
1
y
(n)
1
+u
2
y
(n)
2
+ ···+u
n
y
(n)
n
+ u

1
y
(n−1)
1
+ u

2
y
(n−1)
2

+ ··· + u

n
y
(n−1)
n
We substitute y
p
and its derivatives into the inhomogeneous differential equation and use the fact that the y
k
are
homogeneous solutions.
u
1
y
(n)
1
+ ··· + u
n
y
(n)
n
+ u

1
y
(n−1)
1
+ ··· + u


n
y
(n−1)
n
+ p
n−1
(u
1
y
(n−1)
1
+ ··· + u
n
y
(n−1)
n
) + ···+ p
0
(u
1
y
1
+ ···u
n
y
n
) = f
u
1
L[y

1
] + u
2
L[y
2
] + ···+ u
n
L[y
n
] + u

1
y
(n−1)
1
+ u

2
y
(n−1)
2
+ ··· + u

n
y
(n−1)
n
= f
u


1
y
(n−1)
1
+ u

2
y
(n−1)
2
+ ··· + u

n
y
(n−1)
n
= f.
1069
With the constraints, we have a system of linear equations for {u
1
, . . . , u
n
}.





y
1

y
2
··· y
n
y

1
y

2
··· y

n
.
.
.
.
.
.
.
.
.
.
.
.
y
(n−1)
1
y
(n−1)

2
··· y
(n−1)
n










u

1
u

2
.
.
.
u

n






=





0
.
.
.
0
f





.
We solve this system using Kramer’s rule. (See Appendix O.)
u

k
= (−1)
n+k+1
W [y
1
, . . . , y
k−1
, y

k+1
, . . . , y
n
]
W [y
1
, y
2
, . . . , y
n
]
f, for k = 1, . . . , n,
Here W is the Wronskian.
We integrating to obtain the u
k
’s.
u
k
= (−1)
n+k+1

W [y
1
, . . . , y
k−1
, y
k+1
, . . . , y
n
](x)

W [y
1
, y
2
, . . . , y
n
](x)
f(x) dx, for k = 1, . . . , n
Result 21.3.2 Let {y
1
, . . . , y
n
} be linearly independent homogeneous solutions of
L[y] = y(n) + p
n−1
(x)y
(n−1)
+ ···+ p
1
(x)y

+ p
0
(x)y = f(x), on a < x < b.
A particular solution is
y
p
= u
1
y

1
+ u
2
y
2
+ ···+ u
n
y
n
.
where
u
k
= (−1)
n+k+1

W [y
1
, . . . , y
k−1
, y
k+1
, . . . , y
n
](x)
W [y
1
, y
2
, . . . , y

n
](x)
f(x) dx, for k = 1, . . . , n,
and W [y
1
, y
2
, . . . , y
n
](x) is the Wronskian of {y
1
(x), . . . , y
n
(x)}.
1070
21.4 Piecewise Continuous Coefficients and Inhomogeneities
Example 21.4.1 Consider the problem
y

− y =
e
−α|x|
, y(±∞) = 0, α > 0, α = 1.
The homogeneous solutions of the differential equation are
e
x
and
e
−x
. We use variation of parameters to find a

particular solution for x > 0.
y
p
= −
e
x

x
e
−ξ
e
−αξ
−2
dξ +
e
−x

x
e
ξ
e
−αξ
−2

=
1
2
e
x


x
e
−(α+1)ξ
dξ −
1
2
e
−x

x
e
(1−α)ξ

= −
1
2(α + 1)
e
−αx
+
1
2(α − 1)
e
−αx
=
e
−αx
α
2
− 1
, for x > 0

A particular solution for x < 0 is
y
p
=
e
αx
α
2
− 1
, for x < 0.
Thus a particular solution is
y
p
=
e
−α|x|
α
2
− 1
.
The general solution is
y =
1
α
2
− 1
e
−α|x|
+c
1

e
x
+c
2
e
−x
.
Applying the boundary conditions, we see that c
1
= c
2
= 0. Apparently the solution is
y =
e
−α|x|
α
2
− 1
.
1071
-4
-2 2
4
0.05
0.1
0.15
0.2
0.25
0.3
-4

-2 2
4
-0.3
-0.25
-0.2
-0.15
-0.1
-0.05
Figure 21.1: The Incorrect and Correct Solution to the Differential Equation.
This function is plotted in Figure 21.1. This function satisfies the differential equation for positive and negative x. It
also satisfies the boundary conditions. However, this is NOT a solution to the differential equation. Since the differential
equation has no singular points and the inhomogeneous term is continuous, the solution must be twice continuously
differentiable. Since the derivative of
e
−α|x|
/(α
2
−1) has a jump discontinuity at x = 0, the second derivative does not
exist. Thus this function could not possibly be a solution to the differential equation. In the next example we examine
the right way to solve this problem.
Example 21.4.2 Again conside r
y

− y =
e
−α|x|
, y(±∞) = 0, α > 0, α = 1.
1072
Separating this into two problems for positive and negative x,
y



− y

=
e
αx
, y

(−∞) = 0, on − ∞ < x ≤ 0,
y

+
− y
+
=
e
−αx
, y
+
(∞) = 0, on 0 ≤ x < ∞.
In order for the solution over the whole domain to be twice differentiable, the solution and it’s first derivative must be
continuous. Thus we impose the additional boundary conditions
y

(0) = y
+
(0), y



(0) = y

+
(0).
The solutions that satisfy the two differential equations and the boundary conditions at infinity are
y

=
e
αx
α
2
− 1
+ c

e
x
, y
+
=
e
−αx
α
2
− 1
+ c
+
e
−x
.

The two additional boundary conditions give us the equations
y

(0) = y
+
(0) → c

= c
+
y


(0) = y

+
(0) →
α
α
2
− 1
+ c

= −
α
α
2
− 1
− c
+
.

We solve these two equations to determine c

and c
+
.
c

= c
+
= −
α
α
2
− 1
Thus the solution over the whole domain is
y =

e
αx
−α
e
x
α
2
−1
for x < 0,
e
−αx
−α
e

−x
α
2
−1
for x > 0
y =
e
−α|x|
−α
e
−|x|
α
2
− 1
.
This function is plotted in Figure 21.1. You can verify that this solution is twice continuously differentiable.
1073
21.5 Inhomogeneous Boundary Conditions
21.5.1 Eliminating Inhomogeneous Boundary Conditions
Consider the n
th
order equation
L[y] = f(x), for a < x < b,
subject to the linear inhomogeneous boundary conditions
B
j
[y] = γ
j
, for j = 1, . . . , n,
where the boundary conditions are of the form

B[y] ≡ α
0
y(a) + α
1
y

(a) + ···+ y
n−1
y
(n−1)
(a) + β
0
y(b) + β
1
y

(b) + ···+ β
n−1
y
(n−1)
Let g(x) be an n-times c ontinuousl y differentiable function that satisfies the boundary conditions. Substituting y = u+g
into the differential equation and boundary conditions yields
L[u] = f(x) − L[g], B
j
[u] = b
j
− B
j
[g] = 0 for j = 1, . . . , n.
Note that the problem for u has homogeneous boundary conditions. Thus a problem with inhomogeneous boundary

conditions can be reduced to one with homogeneous boundary conditions. This technique is of limited usefulness for
ordinary differential equations but is important for solving some partial differential equation problems.
Example 21.5.1 Consider the problem
y

+ y = cos 2x, y(0) = 1, y(π) = 2.
g(x) =
x
π
+ 1 satisfies the boundary conditions. Substituting y = u + g yields
u

+ u = cos 2x −
x
π
− 1, y(0) = y(π) = 0.
1074
Example 21.5.2 Consider
y

+ y = cos 2x, y

(0) = y(π) = 1.
g(x) = sin x − cos x satisfies the inhomogeneous boundary conditions. Substituting y = u + sin x − cos x yields
u

+ u = cos 2x, u

(0) = u(π) = 0.
Note that since g(x) satisfies the homogeneous equation, the inhomogeneous term in the equation for u is the same as

that in the equation for y.
Example 21.5.3 Consider
y

+ y = cos 2x, y(0) =
2
3
, y(π) = −
4
3
.
g(x) = cos x −
1
3
satisfies the boundary conditions. Substituting y = u + cos x −
1
3
yields
u

+ u = cos 2x +
1
3
, u(0) = u(π) = 0.
Result 21.5.1 The n
th
order differential equation with boundary conditions
L[y] = f(x), B
j
[y] = b

j
, for j = 1, . . . , n
has the solution y = u + g where u satisfies
L[u] = f(x) −L[g], B
j
[u] = 0, for j = 1, . . . , n
and g is any n-times continuously differentiable function that satisfies the inhomogeneous
boundary conditions.
1075
21.5.2 Separating Inhomogeneous Equations and Inhomogeneous Boundary Con-
ditions
Now consider a problem with inhomogeneous boundary conditions
L[y] = f(x), B
1
[y] = γ
1
, B
2
[y] = γ
2
.
In order to solve this problem, we solve the two problems
L[u] = f(x), B
1
[u] = B
2
[u] = 0, and
L[v] = 0, B
1
[v] = γ

1
, B
2
[v] = γ
2
.
The solution for the problem with an inhomogeneous equation and inhomogeneous boundary conditions will be the sum
of u and v. To verify this,
L[u + v] = L[u] + L[v] = f(x) + 0 = f(x),
B
i
[u + v] = B
i
[u] + B
i
[v] = 0 + γ
i
= γ
i
.
This will be a useful technique when we develop Green functions.
Result 21.5.2 The solution to
L[y] = f(x), B
1
[y] = γ
1
, B
2
[y] = γ
2

,
is y = u + v where
L[u] = f(x), B
1
[u] = 0, B
2
[u] = 0, and
L[v] = 0, B
1
[v] = γ
1
, B
2
[v] = γ
2
.
1076
21.5.3 Existence of Solutions of Problems with Inhomogeneous Boundary Con-
ditions
Consider the n
th
order homogeneous differential equation
L[y] = y
(n)
+ p
n−1
y
(n−1)
+ ··· + p
1

y

+ p
0
y = f(x), for a < x < b,
subject to the n inhomogeneous boundary conditions
B
j
[y] = γ
j
, for j = 1, . . . , n
where each boundary condition is of the form
B[y] ≡ α
0
y(a) + α
1
y

(a) + ···+ α
n−1
y
(n−1)
(a) + β
0
y(b) + β
1
y

(b) + ···+ β
n−1

y
(n−1)
(b).
We assume that the coefficients in the differential equation are continuous on [a, b]. Since the Wronskian of the solutions
of the differential equation,
W (x) = exp



p
n−1
(x) dx

,
is non-vanishing on [a, b], there are n linearly independent solution on that range. Let {y
1
, . . . , y
n
} be a set of linearly
independent solutions of the homogeneous equation. From Result 21.3.2 we know that a particular solution y
p
exists.
The general solution of the differential equation is
y = y
p
+ c
1
y
1
+ c

2
y
2
+ ··· + c
n
y
n
.
The n boundary conditions impose 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
− B
1
[y
p
]
γ
2
− B
2
[y
p
]
.
.
.
γ
n
− B
n
[y
p
]






1077

×