Solving $(x-y)u_x+u_y=x,~~~u(x,0)=x^2$ by the method of characteristics.

characteristicspartial differential equations

Q. Solve $$(x-y)u_x+u_y=x,~~~u(x,0)=x^2$$ by the method of characteristics.

I am getting the general solution from Lagrange-Charpit equations as $u=x+\frac{y^2}{2}+C$, where $C$ is an arbitrary constant. But it seems to be not coorporate with initial curve. How can I deal with this?

Best Answer

$$(x-y)u_x+u_y=x$$ $$\frac{dx}{x-y}=\frac{dy}{1}=\frac{du}{x}$$ First characteristic equation from solving $\frac{dx}{x-y}=\frac{dy}{1}$ : $$(x-y-1)e^{-y}=c_1$$ $x=c_1e^y+y+1$

Second characteristic equation from solving $\frac{dy}{1}=\frac{du}{x}=\frac{du}{c_1e^y+y+1}\quad\implies\quad\frac{du}{dy}=c_1e^y+y+1$ : $$u-\frac{y^2}{2}-y-c_1e^y=c_2$$ $$u-\frac{y^2}{2}-y-((x-y-1)e^{-y})e^y=c_2$$ $$u-\frac{y^2}{2}-x+1=c_2$$ The general solution of the PDE expressed on the form of implicit equation $c_2=F(c_1)$ with arbitrary function $F$ is : $$u-\frac{y^2}{2}-x+1=F\big((x-y-1)e^{-y} \big)$$ Explicitly the general solution of the PDE is : $$\boxed{u(x,y)=\frac{y^2}{2}+x-1+F\big((x-y-1)e^{-y} \big)}$$ Condition : $$u(x,0)=x^2=\frac{0^2}{2}+x-1+F\big((x-0-1)e^{-0} \big)$$ $$x^2-x+1=F(x-1)$$ Let $X=x-1\quad;\quad x=X+1$ $$(X+1)^2-(X+1)+1=F(X)$$ $$F(X)=X^2+X+1$$ Now the function $F$ is known. We put it into the above general solution where $X=(x-y-1)e^{-y}$ . $$u(x,y)=\frac{y^2}{2}+x-1+\big((x-y-1)e^{-y}\big)^2+\big((x-y-1)e^{-y}\big)+1$$ The particular solution of the PDE which satisfies the specified condition is : $$\boxed{u(x,y)=\frac{y^2}{2}+x+(x-y-1)^2e^{-2y}+(x-y-1)e^{-y}}$$