  In this work, a complete error analysis is presented for fully discrete
solutions of the subdiffusion equation with a time-dependent diffusion
coefficient, obtained by the Galerkin finite element method with conforming
piecewise linear finite elements in space and backward Euler convolution
quadrature in time. The regularity of the solutions of the subdiffusion model
is proved for both nonsmooth initial data and incompatible source term.
Optimal-order convergence of the numerical solutions is established using the
proven solution regularity and a novel perturbation argument via freezing the
diffusion coefficient at a fixed time. The analysis is supported by numerical
experiments.
