# Confusion solving linear first order PDE

In my course, it has been presented to us that in order to solve a PDE of the form: $$a(x,y)U_x +b(x,y)U_y=c(x,y)U+d(x,y)$$ The general method is to solve $$\frac{dy}{dx}=\frac{b(x,y)}{a(x,y)}$$ the equation of the characteristic curve. Then we have to solve: $$\frac{d}{dx}U(x,y)=\frac{c(x,y)}{a(x,y)}U+\frac{d(x,y)}{a(x,y)}$$ I am struggling with a particular example: $$U_x+yU_y=0$$ In my lecture notes the first step is to solve $$\frac{dy}{dx}=\frac{y}{1}$$ and this obviously yields $$y=Ce^x$$ for some $$C \in \mathbb{R}$$, this is fine. Solving the second equation we find that $$\frac{d}{dx}U(x,y)=0$$ Now here is where I am confused, in my notes the following is written after this point: "Now, observe that for $$\frac{d}{dx}U(x,Ce^x)=U_x+Ce^xU_y=U_x+yU_y=0$$ Thus, along each characteristic curve the solution is a constant and the solution can only depend on C —that is $$U(x,y)=f(C)$$."

I really do not understand what this is saying and how this conclusion is reached, can anyone explain this further?

Assume $$a\not\equiv 0$$, so that the PDE reads $$U_x + \tfrac{b}{a} U_y = \tfrac{c}{a} U + \tfrac{d}{a} ,$$ with $$a$$, $$b$$, $$c$$, $$d$$ function of $$(x,y)$$. Now, consider curves described by an equation of the form $$y = y(x)$$ in $$y$$-$$x$$ coordinates. Thus, the 'total' directional derivative of $$U = U(x, y(x))$$ along these curves satisfies $$\tfrac{\text d}{\text d x} U = U_x + \tfrac{\text d y}{\text d x} U_y .$$ according to the multivariate chain rule. The method of characteristics consists in setting consistently $$\tfrac{\text d}{\text d x} y = \tfrac{b}{a}, \qquad \tfrac{\text d}{\text d x} U = \tfrac{c}{a} U + \tfrac{d}{a}$$ to transform the initial PDE into ordinary differential equations of the variable $$x$$.
Example. Set $$a\equiv 1$$, $$b = y$$, $$c\equiv 0$$, $$d\equiv 0$$. As explained above, the method of characteristics amounts to setting $$y = y(x)$$ with $$\tfrac{\text d}{\text d x} y = y, \qquad \tfrac{\text d}{\text d x} U = 0 .$$ Thus, we know that $$y = c_1 \text{e}^x$$ and $$U = c_2$$ with $$c_1$$, $$c_2$$ arbitrary constants. Let us go back to our assumptions on $$U$$ to note that $$U(x, c_1 \text{e}^x) = c_2$$, which implicitly links the constants $$c_1$$, $$c_2$$. More precisely, let us assume that for a given fixed $$x_0$$, we know the expression of $$U(x_0, c_1\text{e}^{x_0}) = f(c_1)$$ for some suitable function $$f$$. It then follows that $$c_2 = f(c_1)$$, and thus $$U(x,y) = f(y\text{e}^{-x}).$$ See also this post for further attempts at explaining this fact.