I tried to use Mathematica 10.2 and 10.3 to solve this simple PDE and I want to a general solution. But it seems not working. DSolve has been improved in v10.3. But we see it’s perhaps not improved enough.
eq = (x - y)*D[f[x, y], x, y] - D[f[x, y], x] + D[f[x, y], y] == 0;
DSolve[eq, f[x, y], {x, y}]
(* ? :( *)
I know the general solution of this partial differential equation is:
f(x,y)=\frac{c_2(x)+c_1(y)}{x-y}
nma
(Nasser M. Abbasi)
December 7, 2015, 8:50pm
2
good catch. I just run this by that other competitor computer algebra software (I am not sure if it OK to say the name here), and it solved it giving the solution you show:
May be there is a trick to do this in Mathematica, but I have not found one.
The Trick is a substitution, f[x, y] → g[x, y]/(x - y), in order to eliminate the (x - y) term from the ODE.
(“Of course this is not my trick”)
(Unevaluated[(x - y)*D[f[x, y], x, y] - D[f[x, y], x] + D[f[x, y], y]] /. f[x, y] -> g[x, y]/(x - y)) // Simplify
(* Derivative[1, 1][g][x, y] *)
DSolve[Derivative[1, 1][g][x, y] == 0, g[x, y], {x, y}]
(* {{g[x, y] -> C[1][x] + C[2][y]}} *)
Then:
f(x,y)=\frac{c_1(x)+c_2(y)}{x-y}
Yes Maple is powerfull software.
My observations were incorrect; the proposed solution does simplify to zero if i used Simplify[]. Ignore my post. Thank you.
kayh
(Kay Herbert)
December 10, 2015, 3:42pm
5
Since you provide no boundary conditions, a similarity solution with eta=x/y can be found in Mathematica:
eq = HoldForm[(x - y)*D[f[x, y], x, y] - D[f[x, y], x] + D[f[x, y], y]]
eqt = eq /. f[x, y] -> f[eta] /. eta -> x/y
ReleaseHold[eqt]
-((x Derivative[1][f][x/y])/y^2) -
Derivative[1][f][x/
y]/y + (x - y) (-(Derivative[1][f][x/y]/y^2) - (
x (f^\[Prime]\[Prime])[x/y])/y^3)
% /. x -> y eta
-(Derivative[1][f][eta]/y) - (
eta Derivative[1][f][
eta])/y + (-y + eta y) (-(Derivative[1][f][eta]/y^2) - (
eta (f^\[Prime]\[Prime])[eta])/y^2)
% y
y (-(Derivative[1][f][eta]/y) - (eta Derivative[1][f][eta])/
y + (-y + eta y) (-(Derivative[1][f][eta]/y^2) - (
eta (f^\[Prime]\[Prime])[eta])/y^2))
Simplify[%]
eta (-2 Derivative[1][f][eta] - (-1 + eta) (f^\[Prime]\[Prime])[eta])
DSolve[% == 0, f, eta]
{{f -> Function[{eta}, -(C[1]/(-1 + eta)) + C[2]]}}