Solving ODE Convergence Problem with Secant Approximation

In summary, the speaker is struggling with finding the appropriate criteria to measure a function of time, S(t), until its derivative, dS/dt, approaches zero. They are currently using a secant approximation and have encountered issues with machine precision. They are open to suggestions, particularly if there are built-in functions in Python that can assist with their situation.
  • #1
brydustin
205
0
I have a pesky problem, I have this function of time, S(t) and I'm trying to find how far to evaluate S (its an expensive process and must be done for finite t=time). Essentially, I want to measure S until dS/dt ≈ 0. But my current criteria is making the computation itself inefficient not to mention it is erroneous -- at times it is satisfied at very early t and at other times as t approaches infinity. Now, in theory the solution "really" only exists as t approaches infinity (i.e. dS/dt = 0, thence we take ≈0)
So currently, my approach has been a secant approximation of the derivative
(i.e. [ S(t_{n}) - S(t_{n-1}) ] / [t_{n} - t_{n-1}] < tolerance )

Where t_{n} - t_{n-1} is roughly 10^-15 (its a small scale because all the dynamics of this ODE happen on short time scales.) The code was constructed in python so if there are already built in functions that can help in my situation that would be nice as well.

All help appreciated!
 
Physics news on Phys.org
  • #2
With a scale that small, it is likely that you are unable to resolve due to the machine precision of your platform.

Try normalizing your units of time to something much smaller than seconds (assuming that's the unit you're using now).
 

Related to Solving ODE Convergence Problem with Secant Approximation

What is an ODE convergence problem?

An ODE convergence problem refers to the difficulty in finding a solution to a system of ordinary differential equations (ODEs) using numerical methods. This can occur when the ODEs are complex or when the chosen numerical method is not suitable for the problem.

What is a secant approximation?

A secant approximation is a numerical method used to approximate the solution to an ODE. It involves using two points on the graph of the ODE to estimate the slope of the curve, and then using this slope to find the next point on the curve. This process is repeated until the desired accuracy is achieved.

Why is solving ODE convergence problems with secant approximation important?

Solving ODE convergence problems with secant approximation is important because it allows for the efficient and accurate numerical solution of complex ODEs. It is also a useful tool for analyzing the behavior of systems described by ODEs.

What are some common challenges when using secant approximation to solve ODE convergence problems?

Some common challenges when using secant approximation include choosing appropriate initial points, selecting a suitable stopping criterion, and dealing with divergence or oscillatory behavior of the solution. Additionally, the accuracy of the approximation may decrease as the number of iterations increases.

What are some ways to improve the accuracy of secant approximation for solving ODE convergence problems?

Some ways to improve the accuracy of secant approximation include using smaller step sizes, adjusting the initial points, and using higher-order numerical methods such as the modified secant method. It is also important to carefully analyze the behavior of the solution and adjust the parameters accordingly. Additionally, using a combination of different numerical methods can also improve the accuracy of the approximation.

Similar threads

Replies
1
Views
787
  • Biology and Chemistry Homework Help
Replies
2
Views
323
  • Differential Equations
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • Biology and Chemistry Homework Help
Replies
13
Views
446
  • Calculus and Beyond Homework Help
Replies
3
Views
860
  • Calculus and Beyond Homework Help
Replies
16
Views
850
Replies
3
Views
2K
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
635
Back
Top