Solution of nonlinear problems in applied sciences by generalized collocation methods and Mathematica