  In this paper, we propose and analyze a second-order time-stepping numerical
scheme for the inhomogeneous backward fractional Feynman-Kac equation with
nonsmooth initial data. The complex parameters and time-space coupled
Riemann-Liouville fractional substantial integral and derivative in the
equation bring challenges on numerical analysis and computations. The nonlocal
operators are approximated by using the weighted and shifted Gr\"{u}nwald
difference (WSGD) formula. Then a second-order WSGD scheme is obtained after
making some initial corrections. Moreover, the error estimates of the proposed
time-stepping scheme are rigorously established without the regularity
requirement on the exact solution. Finally, some numerical experiments are
performed to validate the efficiency and accuracy of the proposed numerical
scheme.
