Analytic solutions for the finite-difference time-domain and transmission-line-matrix methods