Message Boards Message Boards

0
|
26492 Views
|
10 Replies
|
4 Total Likes
View groups...
Share
Share this post:

My program has been running for two days. Is this normal?

Posted 10 years ago

My problem is to solve 20 second-order ODEs with 40 boundary conditions. The 20 ODEs can be divided into 10 mutually independant groups, each group containing 2 ODEs and 2 unknown functions, but the boundary conditions mix all the 20 unknown functions together. So what I did was typing in all 20 ODEs and 40 boundary conditions in one command "DSolve". This program has been running for two days and it is still running. I don't know how long it is going to be before I can get the final solutions or I may never get the solutions. I feel that something is wrong. Besides, only solving the 20 ODEs without boundary conditions, Mathematica 7 can give the general solutions of the 20 unknown functions in less than 10 seconds. Then why it took so long when adding the boundary conditions? It seems to me that it is only a problem of solving 40 algebraic equations. Although some of the 40 algebraic equations may be complicated, I don't think it should take such long time to compute. I am a novice at Mathematica and I've only used Mathematica to solve some basic and simple problems. So I want to ask whether my situation is normal. Should I keep waiting for the solutions or abort the computation? Is there any advice to accelerate the computational speed of my problem? Many thanks!!!

POSTED BY: Hui Sun
10 Replies

Solving 40 nonlinear algebraic equations can take considerable time.

POSTED BY: Daniel Lichtblau
Posted 10 years ago

You may try NDSolve instead of DSolve..

POSTED BY: Okkes Dulgerci

Thanks for your advice. I am now trying to use NDSolve. It's indeed much faster than using DSolve. But I've encountered another problem. For 6 second-order ODEs with 12 boundary conditions, I can obtain the exact symbolic solutions in relatively less time by using DSolve. Then I plotted the first derivative of the symbolic solutions, from which I got the right graph. But when I used NDSolve to solve the same problem, I got nothing after I plotted the first derivative of the numerical solutions. Why so? Besides, the graph of the symbolic solutions is the same as the graph of the numerical solutions. Then why the graphs of the first derivative of the two solutions are totally different? Looking forward to your reply. Many thanks!!

POSTED BY: Hui Sun
Posted 10 years ago

Can you upload your code.. Never mind, I guess you asked your question with another name and is solved..

POSTED BY: Okkes Dulgerci

Yes. Sorry, my fault. Now I know how to ask questions. The most efficient way of asking for help is uploading the problematic code, rather than describe the problem with empty words. Anyway, many thanks for your help and patience! :-)

POSTED BY: Hui Sun

It's hard to help you without seeing the actual problem. It could be that you have a simple typo or syntax error. You say that MM7 can find all general solution in a snap. So why not find the general solution first and then solve for the unknown coefficients by substituting the boundary conditions? This probably can be done step by step.

POSTED BY: Kay Herbert

I would never jump into a complicated problem without first trying out smaller similar problems. Ask yourself how long does it take to solve for a fifth, fourth, third, and half of that many conditions and estimate the time necessary to solve the whole number of conditions. The estimate won't be exact, but it should tell you if your talking hours, days, or weeks.

You can also time out other approaches as you make the problem grow and see how much time you could save on the big problem by using them.

POSTED BY: Marvin Ray Burns

Thanks for the advice. I am already trying to solve a smaller unit cell with less ODEs and less boundary conditions.

POSTED BY: Hui Sun

Boundary value problems are much tougher than initial value problems. You may wish to try quasi-linearization, an iterative approach, rather than the built-in method, if you are looking for a numerical solution.

http://library.wolfram.com/infocenter/Conferences/368/

POSTED BY: Frank Kampas

Thanks for the advice, but I kind of want symbolic solutions.

POSTED BY: Hui Sun
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