Method of characteristics for $x u_y + u_x=u$

I am trying to solve the PDE $$x\frac{\partial u}{\partial y}+\frac{\partial u}{\partial x}=u,$$ subject to the conditions $$u(x,0)=0$$ and $$u(0,y)=y$$.

The characteristic equations are: $$\frac{dx}{dt}=1, \ \frac{dy}{dt}=x, \ \frac{du}{dt}=u.$$ Solving these ODEs gives \begin{align} x(t,s)&=t+A(s) \\ y(t,s)&=\frac{t^2}{2}+A(s)t+B(s) \\ u(t,s)&=C(s)e^t. \end{align}

Case $$1$$, $$u(x,0)=0$$: \begin{align} x(0,s)&=s\implies x(t,s)=t+s \\ y(0,s)&=0\implies y(t,s)=\frac{t^2}{2}+st \\ u(0,s)&=0\implies u(t,s)=0 \\ \therefore u(x,y)&=0 \end{align}

Case $$2$$, $$u(0,y)=y$$: \begin{align} x(0,s)&=s\implies x(t,s)=t \\ y(0,s)&=0\implies y(t,s)=\frac{t^2}{2}+s \\ u(0,s)&=0\implies u(t,s)=se^t \\ \therefore u(x,y)&=\left(y-\frac{x^2}{2}\right)e^x \end{align}

The solutions say that case $$1$$ is valid for $$y\leq x^2/2$$ and case $$2$$ is valid for $$y>x^2/2$$. Have absolutely no idea why this.

I solved this problem using a Laplace transform and I arrived at the same conditions. But how can this possibly be interpreted when using the method shown.

$$x\frac{\partial u}{\partial y}+\frac{\partial u}{\partial x}=u$$ I agree with your calculus. A different presentation of the Charpit-Lagrange equations : $$\frac{dy}{x}=\frac{dx}{1}=\frac{du}{u}=dt$$ A first characteristic equation comes from $$\frac{dy}{x}=\frac{dx}{1}$$ : $$y-\frac{x^2}{2}=c_1$$ A second characteristic equation comes from $$\frac{dx}{1}=\frac{du}{u}$$ : $$e^{-x}u=c_2$$ General solution of the PDE on implicit form $$c_2=F(c_1)$$ : $$e^{-x}u=F\left(y-\frac{x^2}{2}\right)$$ $$u(x,y)=e^xF\left(y-\frac{x^2}{2}\right)$$ $$F(X)$$ is an arbitrary fonction to be determined according to the boundary conditions.

First condition alone :

$$u(x,0)=0=e^xF\left(0-\frac{x^2}{2}\right)\quad\implies\quad F(X)=0\quad\text{on}\quad X<0$$

Putting $$F=0$$ into the above general solution leads to $$u(x,y)=0$$ Of course this trivial solution was obvious by inspection of the PDE.

Second condition alone :

$$u(0,y)=y=e^0F\left(y-\frac{0^2}{2}\right)=F(y)=y$$

The function $$F$$ is determined : $$F(X)=X$$. We put it into the above general solution where $$X=y-\frac{x^2}{2}$$ .

$$u(x,y)=e^x (y-\frac{x^2}{2})$$

Both conditions together :

In order to satisfy both conditions, necessarily the function $$F(X)$$ is a piecewise function now defined on two domains : $$F(X)=\begin{cases} 0 && X<0\\ X && X>0 \end{cases}$$ Since $$X=y-\frac{x^2}{2}$$ the boundary between the two domains is $$y=\frac{x^2}{2}$$. $$u(x,y)=\begin{cases} 0 && y<\frac{x^2}{2}\\ e^x (y-\frac{x^2}{2}) && y>\frac{x^2}{2} \end{cases}$$ This is in agreement with your own results.

• (+1) I like this method presented, thanks! My main question is though, if I were to use the method that I have shown, how am I too see the correct domains for the piecewise function of $u(x,y)$? For instance, for case $2$, how is it obvious that $y>\frac{x^2}{2}$ given that I have shown $u(x,y)=e^x\left(y-\frac{x^2}{2}\right)$? Why can't $y<\frac{x^2}{2}$? – Stuart-James Burney Apr 28 at 14:28