Solutions of second-order partial differential equations in two independent variables using method of characteristics