3
$\begingroup$

I have a system of two PDEs: $$\frac{\partial\psi}{\partial y}=ax+b$$ $$-\frac{\partial\psi}{\partial x}=-ay+cx$$ where $a$, $b$, and $c$ are constant reals. When I plug the system into DSolve:

DSolve[{D[ψ[x, y], y] == a x + b, -D[ψ[x, y], x] == -a y + c x}, ψ[x, y], {x, y}] 

I don't get any answer. Why?

$\endgroup$
  • $\begingroup$ Your second equation has an extra - in the Mathematica code. In any case, do you know of a solution yourself? $\endgroup$ – Chris K Oct 31 '18 at 15:46
  • 6
    $\begingroup$ DSolve[{D[\[Psi][x, y], y] == a x + b, D[\[Psi][x, y], x] == a y - c x}, \[Psi][x, y], {x, y}] works. For some reason it doesn't seem to like it when you multiply both sides of the 2nd equations by -1. On the whole, though, you have to keep in mind that these sort of equations possibly have no solution. $\endgroup$ – Sjoerd Smit Oct 31 '18 at 16:13
  • $\begingroup$ @ChrisK Oh, I actually forgot to put the minus sign in the equation above $\endgroup$ – Tofi Oct 31 '18 at 16:15
  • 1
    $\begingroup$ It does seem surprising that a trivial transformation of this equation changes it from one that Mathematica can't handle into one that it can. $\endgroup$ – mikado Oct 31 '18 at 21:11
  • 3
    $\begingroup$ Although DSolve often cannot solve simple sets of PDEs, this case is so egregious that it may be a bug. I suggest you report it to Wolfram, Inc. $\endgroup$ – bbgodfrey Oct 31 '18 at 22:00
2
$\begingroup$

First of all, it's important to keep in mind that systems like these do not necessarily have a solution. A simple example would be the following:

DSolve[
 {
  D[\[Psi][x, y], x] == y,
  D[\[Psi][x, y], y] == 2 x
  },
 \[Psi][x, y],
 {x, y}
]

Returns unevaluated

This is how DSolve tells you it couldn't find a solution. If you differentiate the first equation w.r.t y and the 2nd w.r.t. x you get D[\[Psi][x, y], x, y] == 1 and D[\[Psi][x, y], y, x] == 2. Since the order of differentiation shouldn't matter, D[\[Psi][x, y], x, y] == D[\[Psi][x, y], y, x] should hold, but clearly that's not the case here.

With that out of the way, DSolve works for the following equations:

DSolve[
 {
  D[\[Psi][x, y], y] == a x + b,
  D[\[Psi][x, y], x] == a y - c x
  },
 \[Psi][x, y],
 {x, y}
]

Out[2] = {{\[Psi][x, y] -> -((c x^2)/2) + b y + a x y + C[1]}}

Unfortunately, DSolve seems rather fussy and doesn't like it when you multiply an equation with a constant factor:

DSolve[
 {
  D[\[Psi][x, y], y] == a x + b,
  2 D[\[Psi][x, y], x] == 2 (a y - c x)
  },
 \[Psi][x, y],
 {x, y}
]

Returns unevaluated

edit I just reported this bug

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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