# Why can't DSolve solve this simple system of PDEs?

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?

• Your second equation has an extra - in the Mathematica code. In any case, do you know of a solution yourself? Oct 31, 2018 at 15:46
• 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. Oct 31, 2018 at 16:13
• @ChrisK Oh, I actually forgot to put the minus sign in the equation above
– Tofi
Oct 31, 2018 at 16:15
• 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. Oct 31, 2018 at 21:11
• 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. Oct 31, 2018 at 22:00

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