use of characteristics to solve nonhomogeneous problems