Solution of Fokker-Planck equation by finite element and finite difference methods for nonlinear systems