Mixed finite-element method for multi-term time-fractional diffusion and diffusion-wave equations