Analytical and numerical solution of nonlinear differential equation arising in physical and chemical sciences