4
$\begingroup$

I have a system of 1st order equations (it's overdetermined but well posed) that is solved within an arbitrary constant:

f[u_, v_] := Cos[u - v]; 
DSolve[{D[x[u, v], u] == Cos[u - v] f[u, v], D[x[u, v], v] == Sin[u - v] D[f[u, v], v]}, x[u, v], {u, v}]

Fine, I get a solution. Now, when I impose the initial condition $x(0,0)=0$ Mathematica does not return anything

DSolve[{D[x[u, v], u] == Cos[u - v] f[u, v], D[x[u, v], v] == Sin[u - v] D[f[u, v], v], x[0, 0] == 0},  x[u, v], {u, v}]

but I get just the same code I introduced.

I can take the initial solution with the arbitrary constant and just solve a linear equation, but I would like to understand why the initial condition is not automatically evaluated by DSolve.

$\endgroup$
6
  • 1
    $\begingroup$ With Maple 2021 I have: $$x(u,v)=\frac{1}{4} \sin (2 u-2 v)+\frac{u}{2}+\frac{v}{2}$$ $\endgroup$ Jul 24 at 9:21
  • $\begingroup$ Why do you call it an initial condition? It is a boundary condition---and this is the problem---you do not define it at one point. $\endgroup$
    – yarchik
    Jul 26 at 12:42
  • $\begingroup$ @yarchik, Such systems of equations have unique solutions up to a constant, which means that we fix the constant at a unique point, not along a curve. Regardless the name that you may give to such conditions, I do not see why DSolve should not evaluate it. $\endgroup$ Jul 26 at 14:22
  • $\begingroup$ Did you report it to WRI? They are the ones that improve the code. (Or maybe they'll tell you how to properly set it up. But I'm with you: This should, or they should make it, workjust as you set it up.) $\endgroup$
    – Michael E2
    Aug 29 at 23:32
  • 1
    $\begingroup$ A similar problem in the documentation: DSolve[{D[f[x, y], x] == x y Cos[x y] + Sin[x y], D[f[x, y], y] == -E^-y + x^2 Cos[x y]}, f, {x, y}]. Recover a function from its gradient vector. The solution represents a family of parallel surfaces. $\endgroup$ Aug 30 at 0:53
1
$\begingroup$

For your kind of problem, instead of solving the compatible system you can just solve one of them with a condition of the type $x(0,v)=0$. For instance

DSolve[{D[x[u, v], u] == Cos[u - v] f[u, v], u[0,v]==0}, x[u, v], {u, v}]

Now, why DSolve doesn't solve the problem how you posed it? It expects different kind of conditions, see DSolve's help for more info. In general defining only a point means nothing for a PDE because its solution will depend on a number of arbitrary functions. In your case the solution depends on a constant that's why $x(0,0)=0$ works.

$\endgroup$
1
$\begingroup$

According to the documentation:

(*Recover a function from its gradient vector*)
sol = DSolve[{D[x[u, v], u] == Cos[u - v] Cos[u - v], 
    D[x[u, v], v] == Sin[u - v] D[Cos[u - v], v]}, x, {u, v}][[1]]

(*{x -> Function[{u, v}, v + C[1] + 1/4 (2 u - 2 v + Sin[2 (u - v)])]}*)

The solution represents a family of parallel surfaces:

Plot3D[Table[x[u,v]/.sol[[1]]/.{C[1]->k},{k,1,16,4}]//Evaluate, 
{u,0,15},{v,0,2},PlotRange->All]

enter image description here

$\endgroup$
1
  • $\begingroup$ True, it's exactly the same. It's not an initial or boundary problem (actually these names are essentially defined for second and higher order of derivatives), but we just need a point in space to have a unique solution. $\endgroup$ Aug 30 at 7:11

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.