Differentiability of weak solutions to an abstract inhomogeneous differential equation