Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Another Problem with NDSolve

Tags:
  1. Dec 30, 2013 #1
    Hi, I can't quite figure out what I'm doing wrong here. I tried restarting mathematica as well which is what fixed my previous problem

    Code (Text):
    Clear[eqn, soln, u, x, y]
    eqn = D[u[x, y], {x, 2}] + D[u[x, y], {y, 2}] == 0;
    soln = NDSolve[{eqn, u[x, 0] == Sin[x], u[0, y] == 0, u[1, y] == 0},
      u[x, y], {x, 0, 1}, {y, 0, 1}]
    and I'm getting the error:
    Code (Text):
    NDSolve::ivone: Boundary values may only be specified for one independent variable. Initial values may only be specified at one value of the other independent variable. >>
     
  2. jcsd
  3. Dec 30, 2013 #2
    There are rules about how you can and can't specify conditions when trying to solve differential equations and the wording of the error message appears to fairly clearly state that you have violated that rule. There is an entire text published on only how to solve differential equations with Mathematica, and it is barely an introduction to the subject.

    This will get you part way to a solution

    In[1]:= Clear[eqn, soln, u, x, y];
    eqn = D[u[x, y], {x, 2}] + D[u[x, y], {y, 2}] == 0;
    DSolve[{eqn}, u[x, y], {x, y}]

    Out[1]= {{u[x, y] -> C[1][I x + y] + C[2][-I x + y]}}

    So that says the generic solution to your problem consists of unknown functions C[1] and C[2] each of which accept a complex argument. Your u[x,0]==Sin[x] puts pretty tight requirements on what C[1] and C[2] are. Do you know just enough about complex functions to guess what C[1] and C[2] are? With that you might be able to fiddle a little and guess how to then modify those to satisfy your two remaining conditions.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Another Problem with NDSolve
  1. Another Matlab Problem (Replies: 2)

  2. Problem with ndsolve (Replies: 2)

Loading...