The generalized Bott-Duffin inverse and its applications