We compute the joint density of Brownian motion, its local time at the origin, and its occupation time of $\lbrack 0, \infty)$. Two derivations of the main result are offered; one is computational, whereas the other uses some of the deep properties of Brownian local time. We use the result to compute the transition probabilities of the optimal process in a stochastic control problem.
"Trivariate Density of Brownian Motion, Its Local and Occupation Times, with Application to Stochastic Control." Ann. Probab. 12 (3) 819 - 828, August, 1984. https://doi.org/10.1214/aop/1176993230