How can I solve my differential equation with Mathematica?

In summary, the conversation discusses a problem with solving a differential equation using Mathematica and the error message received. It is mentioned that there are rules for specifying conditions in solving differential equations and that there is a text published on the subject. A partial solution is provided for the problem.
  • #1
Hertz
180
8
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:
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:
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. >>
 
Physics news on Phys.org
  • #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.
 

What is NDSolve and why is it important?

NDSolve is a numerical differential equation solver used in scientific computing. It is important because it allows scientists to numerically solve complex differential equations that cannot be solved analytically, making it a powerful tool in many fields of science.

What is the "Another Problem with NDSolve" and how does it affect its functionality?

"Another Problem with NDSolve" refers to a specific issue that can arise when using NDSolve to solve certain types of differential equations. This issue can cause incorrect or unstable solutions, impacting the accuracy and reliability of the solver.

How can the "Another Problem with NDSolve" be avoided?

The "Another Problem with NDSolve" can be avoided by using alternative numerical methods, such as the Runge-Kutta method, or by carefully selecting the parameters and settings in NDSolve to ensure stability and accuracy of the solution.

Are there any workarounds for the "Another Problem with NDSolve"?

Yes, there are workarounds for the "Another Problem with NDSolve". One option is to manually adjust the step size and other parameters in NDSolve to find a stable solution. Another option is to use a different numerical solver specifically designed for solving stiff differential equations.

Is there ongoing research to address the "Another Problem with NDSolve"?

Yes, there is ongoing research to address the "Another Problem with NDSolve". Scientists are working on developing more robust and efficient numerical methods, as well as improving the algorithms and techniques used in NDSolve to better handle stiff differential equations and avoid the issue altogether.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
141
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
268
  • MATLAB, Maple, Mathematica, LaTeX
Replies
13
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
5K
  • Programming and Computer Science
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
Back
Top