working with wavefronts, analytical solution