How to solve this equation? Should I use method of characteristics? Question states: find the solution that satisfies this condition: \begin{aligned} xu_{x}-yu_y+u &= x\\ u&= x^2 \ when \ y=x \end{aligned}
I just plugged "u" and solved accordingly, at the end I got x=0 and x=1/3.
$$xu_x-yu_y=x-u$$ Charpit-Lagrange system of characteristic OEDs : $$\frac{dx}{x}=\frac{dy}{-y}=\frac{du}{x-u}$$ First characteristic equation from $\frac{dx}{x}=\frac{dy}{-y}$ : $$xy=c_1$$ Second characteristic equation from $\frac{dx}{x}=\frac{du}{x-u}$ : $$xu-\frac12 x^2=c_2$$ General solution of the PDE on the form of implicit equation : $$xu-\frac12 x^2=F(xy)$$ where $F$ is an arbitrary function, to be determined according to the boundary condition. $$u(x,y)=\frac12 x+\frac{1}{x} F(xy)$$ Condition : $u(x,x)=x^2=\frac12 x+\frac{1}{x} F(x^2)$ $$F(x^2)=x^3-\frac12 x^2$$ This determines the function $F$ : $$F(X)=X^{3/2}-\frac12 X$$ We put this function into the general solution where $X=xy$ : $$u(x,y)=\frac12 x+\frac{1}{x}\left((xy)^{3/2}-\frac12 (xy) \right)$$ $$u(x,y)=\frac{x-y}{2}+x^{1/2}y^{3/2}$$