Global existence, large time behavior, and life span for a degenerate parabolic equation with inhomogeneous density and source