Using reproducing kernel for solving a class of partial differential equation with variable-coefficients