We present effective numerical algorithms for recovering unknown governing equations from measurement data. Upon recasting the problem into a function approximation problem, we discuss the importance of using a large number of short bursts of trajectory data, rather than using data from a small number of long trajectories. Several recovery strategies using deep neural networks (DNNs) are presented. We demonstrate that residual network (ResNet) is particularly suitable for equation discovery, as it can produce exact time integrator for numerical prediction. We then present a set of applications of the DNN learning of unknown dynamical systems, which may contain random parameters or missing variables, as well as learning of unknown partial differential equations. The numerical examples demonstrate that DNNs can be a highly effective tool for data driven physics recovery.