Quasi-linear PDE equation
Mathematica can't solve this pde, so the error is from the /.
command and not from the DSovle
command. You should always check that the last command worked before using its result to avoid hard to detect errors.
On V 12.1 this gives
ClearAll[u, x, y];
pde = 2 D[u[x, y], x] + u[x, y] D[u[x, y], y] == u[x, y]^2/y;
DSolve[pde, u[x, y], {x, y}]
Maple 2020 solves this giving
pde := 2*diff(u(x,y),x) + u(x, y)*diff(u(x,y),y) = u(x, y)^2/y;
sol:=pdsolve(pde,u(x,y));
DEtools:-remove_RootOf( sol );
Where F1
above is an arbitrary function.
One possibility is, do it mumerically with given initial conditions, for example:
usol[x0_, y0_] :=
u /. First@
NDSolve[{2* Derivative[1, 0][u][x, y] +
u[x, y]* Derivative[0, 1][u][x, y] == u[x, y]^2/y,
u[0, y] == y0, u[x, 4] == x0}, u, {x, 0, 3}, {y, 1, 4}]
Plot3D[Evaluate[usol[-1, -1][x, y]], {x, 0, 3}, {y, 1, 4}]