Numerical methods for system of ODES

In summary, the conversation discusses a system of non-linear coupled ODEs and the best numerical method to solve them. The use of adaptive step size methods such as the RK Dormand Prince method is suggested, but the issue of singularities in the derivatives is raised. The importance of checking for errors and known results is also emphasized.
  • #1
Themis
7
0
Hi there. I want to evolve a system of non linear coupled ODEs

[tex] \frac{dx}{dt} = \frac{-k}{x^5(56-y^8)^{9/2}}(85+y^{5} + y^{6}) [/tex]

[tex] \frac{dy}{dt} = \frac{-k}{x^4(56-y^5)^{7/2}}(44+y^2) [/tex]

Let's say I have the initial conditions. What numerical method someone could use to solve this? adaptive step size like RK dormand prince method? I am a bit confused cause i tried some with no good results (maybe cause I am not good programmer, not of the method's fault)
 
Technology news on Phys.org
  • #2
Themis said:
Hi there. I want to evolve a system of non linear coupled ODEs

[tex] \frac{dx}{dt} = \frac{-k}{x^5(56-y^8)^{9/2}}(85+y^{5} + y^{6}) [/tex]

[tex] \frac{dy}{dt} = \frac{-k}{x^4(56-y^5)^{7/2}}(44+y^2) [/tex]

Let's say I have the initial conditions. What numerical method someone could use to solve this? adaptive step size like RK dormand prince method? I am a bit confused cause i tried some with no good results (maybe cause I am not good programmer, not of the method's fault)
What do you mean by the term "evolve"?
 
  • #3
SteamKing said:
What do you mean by the term "evolve"?
Solve them numerically,Any suggestion due to the non linearity and the denominator?
 
  • #4
Themis said:
Solve them numerically,Any suggestion due to the non linearity and the denominator?
Well, obviously you are going to have a problem if y5 = 58 or y8 = 58 or x = 0.

But the comment, "I tried some with no good result" doesn't really specify what has happened in your case.
 
  • #5
Yes I noticed that problem with the anomalies. What I don't understand is what method someone could use to numerical integrate this kind of equations. I understand that an adaptive step size method is best for this problem but there are a few and someone with experience could advise a method to approach the problem. I tried to use boost libraries (odeint) but the results are not good. When I run the program the output values seem not to change at all when they should be and the lack of experience doesn't help to find the problem. If you know how to use boost I can't show what I did.
 
  • #6
As first approach try to use Matlab ode45 function to integrate ODE and see what happens.
If you already have implemented a numerical method for solving ODE try to use it on known results to check that you code has no error.
 
  • #7
soarce said:
As first approach try to use Matlab ode45 function to integrate ODE and see what happens.
That's equivalent to what the OP already did. Matlab's ode45 uses Dormand Prince by default.

If you already have implemented a numerical method for solving ODE try to use it on known results to check that you code has no error.
I would advise stepping back even further and checking where did those derivatives came from. The singularities in the derivatives are a bit suspect.

To the OP: What are the initial values for x and y, and what is k? If x>1 and 0<y<1, you're not going to see much movement. The derivatives are small because of the factors of 1/x^5 and 1/x^4. Moreover, those singularities at x=0, y=56^(1/8), and y=56^(1/5) make this a very stiff system.
 
  • Like
Likes Pepper Mint

1. What are numerical methods for solving systems of ordinary differential equations (ODEs)?

Numerical methods for solving systems of ODEs are mathematical techniques used to approximate the solutions of a system of ODEs. These methods involve breaking down the system into smaller, simpler equations and using numerical calculations to find approximations of the solutions.

2. Why are numerical methods necessary for solving systems of ODEs?

Numerical methods are necessary because most systems of ODEs do not have closed-form solutions, meaning they cannot be solved using algebraic methods. Numerical methods allow us to approximate solutions to these systems, making it possible to solve a wide range of problems.

3. What are the advantages of using numerical methods for solving systems of ODEs?

One advantage is that numerical methods can handle systems of ODEs with complex or nonlinear relationships between the variables. They also allow for a more flexible and accurate solution compared to analytical methods, which may require simplifying assumptions. Additionally, numerical methods can be easily implemented on a computer for faster and more efficient calculations.

4. What are some common numerical methods used for solving systems of ODEs?

Some common numerical methods include Euler's method, Runge-Kutta methods, and multistep methods such as Adams-Bashforth and Adams-Moulton methods. These methods vary in terms of accuracy, stability, and complexity, and the choice of method depends on the specific system being solved.

5. How do you determine the accuracy of a numerical method for solving systems of ODEs?

The accuracy of a numerical method can be determined by comparing the results to a known analytical solution or by calculating the error between the numerical solution and the true solution. The order of accuracy, or how quickly the error decreases as the step size decreases, can also be used to evaluate the accuracy of a method.

Similar threads

  • Programming and Computer Science
Replies
6
Views
1K
Replies
4
Views
2K
  • Quantum Physics
Replies
1
Views
584
Replies
2
Views
372
  • Programming and Computer Science
Replies
4
Views
4K
  • Calculus and Beyond Homework Help
Replies
3
Views
331
  • Programming and Computer Science
Replies
6
Views
1K
  • Advanced Physics Homework Help
Replies
3
Views
503
  • Special and General Relativity
Replies
5
Views
897
Replies
7
Views
2K
Back
Top