  This paper provides a theoretical framework of deriving the forward and
backward Feynman-Kac equations for the distribution of functionals of the path
of a particle undergoing both diffusion and chemical reaction. Very general
forms of the equations are obtained. Once given the diffusion type and reaction
rate, a specific forward or backward Feynman-Kac equation can be obtained. The
listed in the paper include the ones for normal/anomalous diffusions and
reactions with linear/nonlinear rates. Using the derived equations, we also
study the occupation time in half-space, the first passage time to a fixed
boundary, and the occupation time in half-space with absorbing or reflecting
boundary conditions.
