Question :
I am willing to solve the PDE :$$u_x(x,y) + 3u_y(x,y) - (3x-y)u(x,y) = -2 $$
Thoughts :
The characteristics are :
$$\frac{\mathrm{d}x}{1} = \frac{\mathrm{d}y}{3} \implies u_1 = 3x-y$$
I see now the similarity between the surface yielded by the characteristics and the coefficient of $u(x,y)$. Since we have both a non-zero coefficient of the $u(x,y)$ term and a constant on the right-hand side, I thought of a change of variables, but I couldn't find anything handy.
I am really troubled by such equation which involve both a non-zero $u$ coeffiecient and a constant (or expression) on the right hand side. How does one work with them, with characteristics or even not ?
I will be grateful for any explanations / elaborations.
Method of characteristics simplifies the PDE, but does not necessarily solves them immediately. This is such a case. Let us consider the values of function $u$ along a single characteristic line and define: $$f(t,x_0):=u(x_0+t,3t)$$ We have \begin{align} f_t(t,x_0) &= u_x(x_0+t,3t)+3u_y(x_0+t,3t) = \\ &= \big(3(x_0+t) -3t\big)u(a+t,3t) - 2 = \\ &= 3x_0f(t,x_0) -2 \end{align} So we get an ODE ($x_0$ can be treated as a parameter): $$ f_t(t,x_0) = 3x_0f(t,x_0) -2 $$ The similiarity of the equation of characteristic and the coefficient that you have notices makes it so that there's no free-standing $t$ on the right side, making the equation easy to solve. The solution is $$ f(t,x_0) = \left\{\begin{array}{ll}\frac{2}{3x_0} + C(x_0) \exp\big(3x_0 t\big) & \text{for }x_0 \neq 0 \\ C(0) - 2t & \text{for }x_0 =0 \end{array}\right.$$ You have then $$ u(x,y) = f(\frac{y}{3},x-\frac{y}{3}) = \left\{\begin{array}{ll}\frac{2}{3x-y} + C(x-\frac{y}{3}) \exp\big((x-\frac{y}{3}) y\big) & \text{for }x-\frac{y}{3} \neq 0 \\ C(0) - \frac{2y}{3} & \text{for }x-\frac{y}{3} =0 \end{array}\right.$$ You can find $C(x_0)$ from the initial conditions on $u$, if you are given any. Given $u(x,0)=u_0(x)$ the solution is $$ u(x,y) = \left\{\begin{array}{ll}\frac{2}{3x-y}\Big(1-\exp\big((x-\frac{y}{3}) y\big)\Big) + u(x-\frac{y}{3},0) \exp\big((x-\frac{y}{3}) y\big) & \text{for }x-\frac{y}{3} \neq 0 \\ u(0,0) - \frac{2y}{3} & \text{for }x-\frac{y}{3} =0 \end{array}\right.$$