Exact solutions of some nonlinear partial differential equations using functional variable method