470 An Introduction to Partial Differential Equations with MATLAB©R
Now perform variation of parameters, as in the example. We getyp=u 1 y 1 +u 2 y 2 ,where
u′ 1 =
f(x)y 2 (x)
r(x)W(x),u′ 2 =−
f(x)y 1 (x)
r(x)W(x),
andWis the Wronskian
W(x)=y 1 (x)y′ 2 (x)−y 2 (x)y′ 1 (x)(see Exercise 9a).¶(Oh, and how do we know thatWis never zero?) Then,
u 1 =∫xc 1y 2 (ξ)
r(ξ)W(ξ)f(ξ)dξ,u 2 =−∫xc 2y 1 (ξ)
r(ξ)W(ξ)
f(ξ)dξand
yp=y 1 (x)∫xc 1y 2 (ξ)
r(ξ)W(ξ)f(ξ)dξ−y 2 (x)∫xc 2y 1 (ξ)
r(ξ)W(ξ)
f(ξ)dξ.As in the example, we’d likeypto be our solution, so we’d likec 1 andc 2
to be such thatypsatisfies the boundary conditions. First, our life is made
much easier by the fact thatr(x)W(x) is constant ona≤x≤b.‖ Further,
led by the example, our selection ofy 1 andy 2 suggests that we letc 1 =band
c 2 =a. Then,
yp=−y 1 (x)∫bxy 2 (ξ)
rWdξ−y 2 (x)∫xay 1 (ξ)
rWdξ,so
a 1 yp(a)+a 2 y′p(a)=−[a 1 y 1 (a)+a 2 y′ 1 (a)]∫bay 2 (ξ)
rWdξ−[a 1 y 2 (a)+a 2 y′ 2 (a)]∫aay 1 (ξ)
rWdξ=0(see Exercise 9b). Similarly, atx=b.
¶Why are we not concerned with the possibility thatrW=0atsomepoint?
‖See Exercise 3, Section 8.1.