Group Abstract Group Abstract

Message Boards Message Boards

Mathematica 8 - problem with NDSolve function for differential equation

Posted 11 years ago
POSTED BY: Jacek Michalski
8 Replies
POSTED BY: Kay Herbert
Posted 11 years ago

Weird, becuase when I copy your codes to Mathematica it still shows errors. So something must be wrong with my program. Maybe it's because I have Mathematica 8. I suppose you have newer version, don't you ?

POSTED BY: Jacek Michalski

I usually break it up to make it more readable:

ClearAll["Global'*"]

eqns = {D[u[x, y], x, x] + D[u[x, y], y, y] - 3 u[x, y] == x y, 
  u[0, y] == 0, (D[u[x, y], x] /. x -> 2) == 0, u[x, 0] == 0, u[x, 1] == 0}

Traditional form lets me check if my equations make sense!

TraditionalForm[eqns]

s = NDSolve[eqns, u, {x, 0, 2}, {y, 0, 1}]

Plot3D[u[x, y] /. s[[1]], {x, 0, 2}, {y, 0, 1}]
POSTED BY: Kay Herbert
POSTED BY: Kay Herbert
Posted 11 years ago

Unfortunatelly it looks like this mistake is not a problem here, because I've found previous version of my project and this boundary condition is correct there: u^(1,0)[2,y]==0 and that error message is still appearing.

POSTED BY: Jacek Michalski
Posted 11 years ago

In psudeo-math-english,

in the top you have del u/del x when x equals 2 is zero

while in the bottom you have u[2,y] is zero.

That was why I suggested you carefully compare the top and bottom half, character by character, to stumble onto this.

Exactly how to resolve that is another issue.

POSTED BY: Bill Simpson
Posted 11 years ago
POSTED BY: Jacek Michalski
Posted 11 years ago
POSTED BY: Bill Simpson
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard