Message Boards Message Boards

0
|
3677 Views
|
5 Replies
|
0 Total Likes
View groups...
Share
Share this post:

DSolve and initial condition

Posted 3 years ago

Take some simple function of 2 variables, e.g. f[x, y]:= x+y and try to solve a PDE of it for the general solution:

DSolve[{Derivative[1, 0][f][x, y] == 1, Derivative[0, 1][f][x, y] == 1}, f, {x, y}]

This works as expected. However, if you try to give an initial condition for a particular solution, Mathematica is no more able to solve it:

DSolve[{Derivative[1, 0][f][x, y] == 1, 
  Derivative[0, 1][f][x, y] == 1, f[0, 0] == 0}, f, {x, y}]

Has anyone an explanation?

POSTED BY: Daniel Huber
5 Replies
Anonymous User
Anonymous User
Posted 3 years ago

(previous comment removed) I'd like to show a step proof of the 2nd DSolve result or say nothing - I do not have it at the moment.

POSTED BY: Anonymous User
Posted 3 years ago

Thank's for your answer. I have some questions.

Why is the initial condition f[0,0] = 0 impossible for f[x,y]=x+y?

What do you mean by: " choice of f[x,y] which you did not give". DSolve is supposed to give f[x,y], not I.

You seem to imply that Mathematica solves the equations in sequence. Well let's do this. First the first diff.equ. then the second, then the initial condition :

f1 = f /. DSolve[D[f[x, y], x] == 1, f, {x, y}][[1]]
f2 = f1 /. DSolve[{D[f1[x, y], y] == 1}, C[1], y][[1]]
f3 = f2 /. Solve[f2[0, 0] == 0, C[2]][[1]]

Seems to work, f3 is the solution.

Why do you think: "With coupling (you gave a point of intersection of), you cannot express a function that will work for all x and all y for both equations simultaneously.". Well {0,0} is such a point of intersection that works for all x and y.

POSTED BY: Daniel Huber
Anonymous User
Anonymous User
Posted 3 years ago

I had made a careless error in my head while was assuming mm was right. I have no proof to show you at this time why the internals of Mathematica made it's decision and would rather say nothing as I said before.

But since you re-asked, I will say this is not an infrequent question on Communities and that often questioners have set up conditions incorrectly. In this case I will say "valid conditions do not always help Mathematica solve a PDE". The code used to solve is on your system (you can find it through Help). But that is not an answer because I have not read "all of how mm solves each PDE" I cannot answer you directly, as to internals. I wish to avoid taking an unresolved question and adding further guesses.

POSTED BY: Anonymous User
Posted 3 years ago

To err is human, but it is great if someone stands to it. Thank's.

POSTED BY: Daniel Huber
Anonymous User
Anonymous User
Posted 3 years ago

The Help documentation mentions choosing c1 after solving (not during), I'm unsure if there's a reason why. This may hint that, in effect, one should select a function rather than a constant. However, this is guess work.

DSolveValue[{D[f[x, y], x] + D[f[x, y], y] == 2}, f[x, y], {x, y}] == 2 x + C[1][-x + y]
DSolveValue[{D[f[x, y], x] - D[f[x, y], y] == 0}, f[x, y], {x, y}] == C[1][x + y]
DSolveValue[{D[f[x, y], x] + D[f[x, y], y] == 2, f[x, 0] == x}, 
 f[x, y], {x, y}] == x+y

But that is a poor answer, since combining these still does not solve, even though Mathematica "knows how to solve systems of PDE", and because it is a guess not a fact, and because the above is not your original system. The problem is then to know how the internals work exactly, and I have not memorized all of the internals.

DSolveValue[{D[f[x, y], x] - D[f[x, y], y] == 0, 
  D[f[x, y], x] + D[f[x, y], y] == 2, f[x, 0] == x, f[0, y] == y}, 
 f[x, y], {x, y}] == Identity
POSTED BY: Anonymous User
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract