Solution (source code)

= Solution
{c}

Put $q=1-2r/\sigma^2$. The <Black-Scholes reflection symmetry> maps $F$ to $(S/B)^qF(B^2/S,t)$, which solves the same PDE. Their difference vanishes at $S=B$. For $S>B$ at maturity the reflected argument is below $B$, where the terminal function in part <3/a/ii> is zero. Thus the boundary and terminal data of the alive <down-and-out put> are satisfied:
$$
\boxed{G(S,t)=F(S,t)-\left(\frac SB\right)^qF(B^2/S,t),\qquad S>B.}
$$
The killed-domain <Feynman-Kac formula> identifies this solution with the discounted payoff conditional on survival. For $S\leq B$, or after any prior barrier hit, the actual price is \b[zero]. The reflected difference is a formula on the alive domain $S>B$; extending that algebraic expression to $S<B$ generally gives a nonzero, possibly negative function and is not a valid barrier-option price.