The Burgers’ equation is solved using the explicit finite difference method (EFDM) and physics-informed neural networks (PINN). We compare our numerical results, obtained using the EFDM and PINN for three test problems with various initial conditions and Dirichlet boundary conditions, with the analytical solutions, and, while both approaches yield very good agreement, the EFDM results are more closely aligned with the analytical solutions. Since there is good agreement between all of the numerical findings from the EFDM, PINN, and analytical solutions, both approaches are competitive and deserving of recommendation. The conclusions that are provided are significant for simulating a variety of nonlinear physical phenomena, such as those that occur in flood waves in rivers, chromatography, gas dynamics, and traffic flow. Additionally, the concepts of the solution techniques used in this study may be applied to the development of numerical models for this class of nonlinear partial differential equations by present and future model developers of a wide range of diverse nonlinear physical processes.