Newton's method for nonlinear ordinary and partial differential equations