Optimal error estimate of accurate second-order scheme for Volterra integrodifferential equations with tempered multi-term kernels