Solving $x\frac{\partial u}{\partial x} + y\frac{\partial u}{\partial y }=1$

I want to solve the differential equation $$x\frac{\partial u}{\partial x} + y\frac{\partial u}{\partial y }=1$$

with the initial condition $u(1,y)=y.$

I'm very unfamiliar with possible methods to solve pde's. A method I found (link) would go as follows:

$$\dot{x}=x,\;\;\;\;x(0)=1\\\dot{y}=y,\;\;\;\; y(0)=y\\\dot{u}=1,\;\;\;\;u(0)=1$$ but the second equation doesn't seem possible. Can this method be applied to solve the equation or I need a new one?

Another question: In the link (page 2) they wrote $x(t)=0$, and after $x(t)=e^t$ as a solution, but how can that be when $e^t$ is nonzero for every $t$?

• I guess you mean the method of characteristics ? Yes that would be appropriate here. – Chinny84 Nov 26 '14 at 18:13

There is a simpler way. Set $\alpha=\ln x$, $\beta=\ln y$, then the equation becomes $$\frac{\partial u}{\partial \alpha}+\frac{\partial u}{\partial \beta}=1.$$ Next make another change of variables $z_{\pm}=\alpha\pm\beta$, after which the equation reduces to $$\frac{\partial u\,}{\partial z_+}=\frac12,$$ with the obvious general solution $u=\frac{z_+}{2}+F(z_-)$, where $F$ denotes an arbitrary function. Hence $$u(x,y)=\frac{\ln xy}{2}+F\left(\ln\frac{x}{y}\right).$$ It remains to use the initial condition to determine the form of $F$; and one finds $F(z)=\frac{z}{2}+e^{-z}$.

• Very nice indeed, +1! – Robert Lewis Nov 26 '14 at 18:39

This is known as the method of characteristics. First it helps to distinguish $u(1,s)=s$, so that the second equation reads $\dot{y}=y$ with $y(0)=s$. Afterall it's not that $y(0)=y$, that makes no sense. Rather, we make $y(0)=s$ a free parameter which then ensures $u(1,s)=s$. This is also where you need to set up the $u$ equation correctly, it should read $\dot{u}=1$ with $u(0)=u(x(0),y(0))=s$.

The first equation gives you $x=e^t$, the second gives $y=se^t$ and the third gives $u=t+s$. This gives $u(x,y)=\ln(x)+y/x$.

Now check, $u_x=1/x-y/x^2$ and $u_y=1/x$, so $xu_x+yu_y=1$ as required. Finally, $u(1,y)=y$.

I use this method usually, i.e. we get $$\frac{dx}{x}=\frac{dy}{y}=\frac{du}{1},$$ which implies $$\frac{dx}{x}=\frac{dy}{y}\quad\text{and}\quad\frac{dy}{y}=\frac{du}{1},$$ so $x=ky$ where k is constant and $y=ce^{u}$, hence I get the characteristic equation $$f\left(\frac{x}{y}\right)=\frac{y}{e^u}\tag{1}.$$

Apply initial condition $u(1,y)=y$, i.e. $x=1$, $y=y$, $u=y$.

We get $f\left(\frac{1}{y}\right)=\frac{1}{e^y}$,hence $f(t)=e^{-\frac{1}{t}}$ by putting $t=\frac{1}{y}$,apply it in eqn($1$) we get $e^{-\frac{y}{x}}=\frac{y}{e^u}$, from here find $u(x,y)$.

But of course it helps only to find one solution.


In this particular case it's convenient to 'shift' the solution by '$\,\ln\pars{x}\,$' in order to have an homogeneous equation: \begin{align} x\,\partiald{\rm u}{x} + y\,\partiald{\rm u}{y}=1\quad\imp\quad x\,\partiald{\bracks{{\rm u} - \ln\pars{x}}}{x} +y\,\partiald{\bracks{{\rm u} - \ln\pars{x}}}{y}=0 \end{align}
So, we'll use the Characteristics Method: $$\dot{x}=x\,,\quad\dot{y}=y\qquad\imp\quad\totald{y}{x}={y \over x}\quad\imp\quad {y \over x}=\mbox{constant}$$
The form of the solution is given in terms of an arbitrary function , for the time being, $\fermi\pars{x,y}$ of $y/x$. $\fermi\pars{x,y}$ is deduced by imposing the initial condition $\,{\rm u}\pars{1,y}=y$: $$\,{\rm u}\pars{x,y} - \ln\pars{x}=\fermi\pars{y \over x}\quad\imp\quad y=\,{\rm u}\pars{1,y}=\fermi\pars{y}$$
which is replaced in the previously found general solution $\,{\rm u}\pars{x,y} = \ln\pars{x} + \fermi\pars{y \over x}$: $$\color{#66f}{\large\,{\rm u}\pars{x,y}} =\color{#66f}{\large\ln\pars{x} + {y \over x}}$$