0
|
5144 Views
|
8 Replies
|
1 Total Likes
View groups...
Share
GROUPS:

# Mathematica 8 - problem with NDSolve function for differential equation

Posted 9 years ago
 I need to solve one differential equation: equation: boundary conditions: But when I use NDSolve function for it in Mathematica 8.0 it shows some error: I consulted my finite element analysis teacher but he said that he can't see any error in my formula and I need to figure it out by myself. Is it even possible to solve this kind of equation using NDSolve? If yes than how can I enter NDSolve formula for this equation to solve it ?
8 Replies
Sort By:
Posted 9 years ago
 Yes, running 10.02 on Windows 8.1
Posted 9 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 9 years ago
 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 9 years ago
 In the future please post your code usind <> on the toolbar so we can copy it. It's a little more tricky: s = NDSolve[{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}, u, {x, 0, 2}, {y, 0, 1}] Plot3D[u[x, y] /. s[[1]], {x, 0, 2}, {y, 0, 1}] 
Posted 9 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 9 years ago
 In psudeo-math-english,in the top you have del u/del x when x equals 2 is zerowhile 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 9 years ago
 Thank you for your help but you misunderstood me. My teacher said that I need to figure it out by myself not because I need to learn how to solve such problems but because he just doesn't know what is wrong and can't help me as he is a mechanical engineering (not math) expert. And if he - Doctor of Engineering can't solve it then how I - second year student can do it ? What's more he suggested that I should either ask on some forum or leave this problem and continue with the rest of my project, becuase it's very small part of my finite element analysis project and it's only needed to check if whole thing is correct. I don't have time to sweat blood to find solution.Also complex differential equations are not important part of my studies as I study biomedical engineering, not mathematics.So could you please tell me where is the mistake in my formula ? I would be very grateful.
Posted 9 years ago