# Solving PDE of type $x u_x + y u_y = f(x, y)$

How do I solve the differential equation of the type $$x u_x + y u_y = f(x, y)$$ For example, let $f(x, y) = xy$. Using following method, I found $F(x,y) = F(x/y)$ is solution to homogeneous equation

What method can I use to find the particular solution of the given DE? When $f(x,y) = xy$, I put $$u_y = cx \implies u(x, y) = cxy$$ Putting this on DE, I found $c=1/2$. Is there general way to solve for particular solution of PDE?

You can change to new variables $s=x/y$ and $t=y$ (for example).
(Let's say that we're looking for solutions in the region $y>0$, to avoid having to worry about division by zero.)
Then $u_x=u_s s_x + u_t t_x = u_s/y$ and $u_y=u_s s_y + u_t t_y = -u_s \, x/y^2 + u_t$, so your PDE becomes $$x \, u_s/y + y \, (-u_s \, x/y^2 + u_t) = f(x,y) ,$$ i.e., $$u_t = \frac{f(x,y)}{y} .$$ If you now express the right-hand side in terms of the new variables, you get something of the form $$u_t = g(s,t) ,$$ and now you can simply integrate with respect to $t$, to get $$u(s,t) = G(s,t) + F(s) ,$$ i.e., $$u(x,t) = G(x/y,y) + F(x/y) ,$$ where $G$ is the particular solution you asked about, and $F$ is the homogeneous solution that you already knew.