# General solution of a first order PDE with zeroth order term

So I have got the following equation: $$x\frac{\partial u}{\partial x} - 2 \frac{\partial u}{\partial y} = 2u$$

I have tried to solve the following way. I was taught that LHS can be thought of as the directional derivative of $u$ in the direction of the vector $\begin{bmatrix}x \\ -2\end{bmatrix}$. Therefore, on the curves defined by $$\frac{dy}{dx} = \frac{-2}{x} ==> y = - 2ln(x) + K$$ the PDE reduces to an ODE of the form: $$\frac{du}{dx} = 2u ==> u = e^{2x}e^K$$ where $k$ is a constant. Therefore $u(x,y)$ must be: $$e^{2x} f(y + 2ln(x))$$ where $f$ is any arbitrary function. However this solution is wrong (I have plugged in the equation and checked with Maple).

• I upvoted your question for the efforts you have shown – Isham May 13 '18 at 20:14

## 2 Answers

This line is not correct $$\frac{du}{dx} = 2u ==> u = e^{2x}e^K$$ It should be $$\frac{du}{2u} = \frac {dx}x \implies .....$$

Here is my approach

$$x\frac{\partial u}{\partial x} - 2 \frac{\partial u}{\partial y} = 2u$$ Lagrange equation is $$\frac {dx}{x}=-\frac {dy}{2}=\frac {dz}{2z}$$ Integrating first equation $$\int \frac {dx}{x}=-\frac 12 dy \implies \ln(x)=-\frac 12y +C_1$$ $$\implies C_1=\ln(x)+\frac 12y$$ Integrating second eqaution $$-\frac {dy}{2}=\frac {dz}{2z} \implies \ln(z)=-y+C_2$$ $$\implies C_2=\ln(z)+y$$ Therefore $$\ln(z)+y=f(\ln(x)+\frac12y)$$ $$\ln(z)=f(\ln(x)+\frac12y)-y$$ $$\displaystyle u=\displaystyle e^{f(\ln(x)+\frac12y)-y}$$ $$\displaystyle \boxed{u(x,y)=\displaystyle F(\ln(x)+y/2)e^{-y}}$$

• It's worth pointing out that $e^{f(\ln x + y/2)} = F(\ln x + y/2)$ – Dylan May 13 '18 at 18:50
• That's really helpful, however I am struggling to understand why approach went wrong. – daljit97 May 13 '18 at 18:58
• @daljit97 : Your claim that $\frac{du}{dx}=2u$ is wrong, the right side has to be the fraction $\frac{2u}{x}$. – LutzL May 13 '18 at 19:02
• @daljit97 : Your solution is a surface with 2 free parameters. If you decompose it into characteristic curves, you get a one-parameter family. Thus the 2 integration constants, which are constants along characteristic curves, have to be dependent. – LutzL May 13 '18 at 20:09
• @LutzL oh alright that makes sense – daljit97 May 13 '18 at 20:11

On the curves with $y=-2\ln(x)+K_1$ the derivative of $z(x)=u(x,-2\ln(x)+K_1)$ is $$z'(x)=u_x-\frac2xu_y=\frac2xz(x)$$ which has the solution $z=K_2x^2$ and with $K_2=f(K_1)$ the general solution form is $$u(x,y)=x^2f(2\ln(x)+y)$$ so that you get a slightly different factor.

Note that the first identity can also be written as $x^2e^y=C$ so that then the alternative form of the general solution is $$u(x,y)=x^2g(x^2e^y)=e^{-y}h(x^2e^y).$$