With conditions:
I tried this:
pde = DSolve[D[D[u[x, y] y] x] == 3 D[u[x, y] y] + 2 y, u, {x, y}]
But I couldn't use the conditions and I need to find the particular solution with those conditions.
of course I want to see it
Mathematica 12.2
ClearAll[u, x, y];
ode = D[D[u[x, y], y], x] == 3 D[u[x, y], y] + 2 y;
bc = {Derivative[0, 1][u][0, y] == y^2 - 2*y, u[x, 0] == x + 3*Exp[-x]};
DSolve[{ode, bc}, u[x, y], {x, y}]
gives
While NDSolve complains about derivative at x=0
ClearAll[u, x, y];
ode = D[D[u[x, y], y], x] == 3 D[u[x, y], y] + 2 y;
bc = {Derivative[0, 1][u][0, y] == y^2 - 2*y, u[x, 0] == x + 3*Exp[-x]};
NDSolve[{ode, bc}, u, {x, 0, 10}, {y, 0, 5}]
NDSolve::ndnum: Encountered non-numerical value for a derivative at x == 0.`.
Maple 2020.2
restart;
pde:= diff(diff(U(x,y),y),x) = 3*diff(U(x,y),y)+2*y;
bc := D[2](U)(0,y)=y^2-2*y,U(x,0)=x+3*exp(-x);
pdsolve([pde,bc],U(x,y))
gives
Notation wise: Derivative[0, 1][u][0, y] == y^2 - 2*y
in Mathematica, means derivative w.r.t to second independent variable, which is y
. This translates to D[2](U)(0,y)=y^2-2*y
in Maple. Do not confuse D[2]
with the second derivative. This means the "second slot", which is y
also.
So the solution it gives is
u(x,y) = exp(3*x)*y^2*(y - 2)/3 - y^2/3 + x + 3*exp(-x)
ode = D[D[u[x, y], y], x] == 3 D[u[x, y], y] + 2 y; bc = {Derivative[0, 1][u][0, y] == y^2, Derivative[0, 1][u][x, 0] == x + 3*Exp[-x]}; NDSolve[{ode, bc}, u, {x, 0, 10}, {y, 0, 5}]
NDSolve complains now because derivatives should be lower than the differential order of the PDE. Make sure your BC are correct. For example, on the lower edge, you are taking derivative w.r.t y. double check that is what you want. $\endgroup$DSovle
solves it, without the BC. So the problem is with the BC. $\endgroup$DSolve
with the conditions you have now, and it could not solve it. But Maple can solve it. If you want, I can show you the Maple command and its solution.NDSolve
can't solve it. It gives errorEncountered non-numerical value for a derivative at x=0
$\endgroup$