1
$\begingroup$

The Partial Differential Equation

With conditions:

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.

$\endgroup$
6
  • 1
    $\begingroup$ you have syntax errors. 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$
    – Nasser
    Commented Feb 3, 2021 at 3:05
  • 1
    $\begingroup$ What NDSolve is basically saying, your PDE is first order in y and in x. But your BC is also derivative of first order. the BC should be lower order derivative that the order of the PDE. So make sure your bc's are correct. For example, DSovle solves it, without the BC. So the problem is with the BC. $\endgroup$
    – Nasser
    Commented Feb 3, 2021 at 3:20
  • $\begingroup$ Ok, but what should I do to solve it? $\endgroup$ Commented Feb 3, 2021 at 3:48
  • $\begingroup$ I do not really need the NDSolve, it was an error, sorry. I need the particular solution with those conditions. $\endgroup$ Commented Feb 3, 2021 at 4:32
  • $\begingroup$ I tried 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 error Encountered non-numerical value for a derivative at x=0 $\endgroup$
    – Nasser
    Commented Feb 3, 2021 at 4:48

1 Answer 1

2
$\begingroup$

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

enter image description here

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

enter image description here

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)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.