A finite-difference, time-domain solution to Maxwell's equations has b
een developed for simulating electromagnetic wave propagation in 3-D m
edia. The algorithm allows arbitrary electrical conductivity and permi
ttivity variations within a model. The staggered grid technique of Yee
is used to sample the fields. A new optimized second-order difference
scheme is designed to approximate the spatial derivatives. Like the c
onventional fourth-order difference scheme, the optimized second-order
scheme needs four discrete values to calculate a single derivative. H
owever, the optimized scheme is accurate over a wider wavenumber range
. Compared to the fourth-order scheme, the optimized scheme imposes st
ricter limitations on the time step sizes but allows coarser grids. Th
e net effect is that the optimized scheme is more efficient in terms o
f computation time and memory requirement than the fourth-order scheme
. The temporal derivatives are approximated by second-order central di
fferences throughout. The Liao transmitting boundary conditions are us
ed to truncate an open problem. A reflection coefficient analysis show
s that this transmitting boundary condition works very well. However,
it is subject to instability. A method that can be easily implemented
is proposed to stabilize the boundary condition. The finite-difference
solution is compared to closed-form solutions for conducting and nonc
onducting whole spaces and to an integral-equation solution for a 3-D
body in a homogeneous half-space. In all cases, the finite-difference
solutions are in good agreement with the other solutions. Finally, the
use of the algorithm is demonstrated with a 3-D model. Numerical resu
lts show that both the magnetic field response and electric field resp
onse can be useful for shallow-depth and small-scale investigations.