Solving ODE w/ Matlab ode45: Error Message Explained

  • Thread starter Thread starter eurekameh
  • Start date Start date
  • Tags Tags
    Matlab Ode45
Click For Summary

Discussion Overview

The discussion revolves around troubleshooting an error encountered while using Matlab's ode45 function to solve an ordinary differential equation (ODE) related to orbital motion. Participants explore the nature of the error message and the conditions under which the ODE fails to converge, focusing on the formulation and parameters used in the integration process.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant reports an error message indicating that ode45 is unable to meet integration tolerances without reducing the step size below a minimum value.
  • Another participant suggests that the issue may stem from the ODE formulation and encourages sharing the specific ODE being solved for better diagnosis.
  • A participant provides their ODE function, which involves a second-order equation related to orbital motion, and notes that the integration works for a shorter time interval but fails for longer intervals.
  • There is a mention of initial conditions for the ODE, specifically x0 = 1000 and xdot,0 = -7, but the implications of these conditions on convergence are not fully explored.
  • One participant expresses uncertainty about the reasons for the lack of convergence, indicating a need for further clarification.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the cause of the convergence issue, and multiple viewpoints regarding the ODE formulation and its parameters are presented without resolution.

Contextual Notes

Limitations include the lack of detailed information about the specific ODE being solved and the potential impact of the chosen time interval on the integration process. The discussion does not clarify whether the problem lies in the mathematical formulation or the numerical method used.

Who May Find This Useful

This discussion may be useful for individuals working with numerical methods for solving ODEs, particularly in the context of Matlab and those encountering similar convergence issues.

eurekameh
Messages
209
Reaction score
0
I'm trying to solve an ODE using matlab's ode45, but I'm receiving the following error:

Warning: Failure at t=4.509803e+01. Unable to meet integration tolerances without reducing the step size below the smallest value allowed (1.136868e-13) at time t.

Can anybody explain what this means?
 
Physics news on Phys.org
Sounds like ode45 is having trouble converging on a solution.

In order to diagnose the problem in more detail, you should probably post the ODE you are trying to solve.
 
function dxdt = test(t,x)
mu = 398600.64;
dxdt_1 = x(2);
dxdt_2 = (-mu/x(1)^3)*x(1);
dxdt = [dxdt_1;dxdt_2];

It's a second-order ODE and I'm trying to solve it from the time interval of 0 to 28800. When I lower this time interval to something like 50, the program seems to work fine, but anything higher than that, it stops to converge. Here is my code to run it:

t = 0:28800
[t x] = ode45(@test,t,[1000;-7]);
 
I don't have the ODE you are trying to solve, only your reformulation for Matlab.
 
I'm trying to solve the orbit motion of equation x,doubledot = (-mu/x^3)*x, with an initial condition of x0 = 1000, and xdot,0 = -7.
 
Do you know why it's not converging?
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
Replies
2
Views
2K
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 13 ·
Replies
13
Views
5K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
7K