Consider the standard setup from Black and Cox (1976, Journal of Finance).
A firm issues a defaultable coupon bond to finance a productive asset that follows a geometric brownian motion: $$dx_t = \mu x_t dt + \sigma x_t dW_t$$ with absorbing barrier $x_b$ (default threshold). The bond pays a fixed coupon rate $c$ and principal $p$, and has maturity $t \in [0, T]$. The payments of coupon and principal occur conditional on not having defaulted and otherwise the recovery value is $\alpha x_b$.
The price of the bond $u$ is described by the partial differential equation: $$\frac{\partial u}{\partial t}(x,t) + \mu \frac{\partial u}{\partial x}(x,t) + \frac{1}{2} \sigma^2 \frac{\partial^2 u}{\partial x^2}(x,t) - r u(x,t) + c = 0$$ defined for all $x \in \mathbb{R}_+$ and $t \in [0,T]$, subject to the boundary conditions: $$u(x,T) = p; \; \; u(V_b, t) = \alpha x_b$$
Denote by $f(s; x_t)$ the density of the first passage time $s$ of $x_t$ to $x_b$ and $F(s; x_t)$ the cumulative distribution. The solution of the pde is (correct me if mistaken!):
\begin{equation} \begin{split} u(x_t, t) = & \int_t^T e^{-r(s-t)} c [1-F(s; x_t)] ds + e^{-r(T-t)} p [1-F(T; x_t)] \\ & + \int_t^T e^{-r(s-t)} \alpha x_b f(s;x_t) ds \end{split} \end{equation}
First question: is the only way to get to this formula the FK representation? I was looking into attacking directly the pde as in Black–Scholes (e.g. through the solution of the equivalent diffusion equation), but it's unclear to me how to treat the barrier.
Second question: which is the FK representation in this case? My attempt is: \begin{equation} \label{FeynmanKac} \begin{split} u(x_t, t) = E_t \Bigg\{ & \int_t^{T \wedge \tau_b} e^{- r(s-t)} c ds + \\ & e^{- r(T \wedge \tau_b - t)} \Big( 1_{\{ \tau_b > T \}} p + 1_{\{ \tau_b < T \}} \alpha x_b \Big) \Bigg\} \end{split} \end{equation} where $\tau_b$ is the first passage time of $x_t$ through $x_b$ and $1$ is the indicator function. Not fully sure how to get the density from the FK, this is the step that confuses me mostly.