How can you know if a numerical solution is correct?

Click For Summary
SUMMARY

This discussion focuses on verifying the correctness of numerical solutions for nonlinear systems of differential equations, specifically when no analytic solution is available. Key methods include comparing results with higher precision simulations, utilizing arbitrary precision arithmetic through MPFR, and employing the Taylor Series Method for integration. Participants emphasize the importance of monitoring invariants and constants, although local error estimates may be less relevant in chaotic systems.

PREREQUISITES
  • Understanding of nonlinear ordinary differential equations (ODEs)
  • Familiarity with numerical integration techniques, specifically Runge-Kutta 4th order (RK4)
  • Knowledge of arbitrary precision arithmetic, particularly using MPFR
  • Concept of invariants and constants in differential equations
NEXT STEPS
  • Research the Clean Numerical Simulation method for validating numerical results
  • Explore the implementation of the Taylor Series Method for higher-order integration
  • Study techniques for error analysis in chaotic systems
  • Learn about advanced numerical methods for solving partial differential equations (PDEs)
USEFUL FOR

Mathematicians, physicists, and engineers involved in numerical analysis, particularly those working with nonlinear differential equations and seeking to validate their computational solutions.

maughanster
Messages
20
Reaction score
1
Hi PF,

Suppose I numerically solve a nonlinear system of differential equations. How can I know if my solution is correct (if there is no known analytic solution)? What are the standard practices people do? I have a couple of ideas, but I want to know what people are already doing.

Danke!
 
Physics news on Phys.org
maughanster said:
I numerically solve a nonlinear system of differential equations.

you must specify in what sense because if it is a system of differential equation the solution is supposed to be a function ... what you mean when you said "I numerically solve a nonlinear system of ...'' ? There is an approximate solution (for example a polynomial ...)? Have you found an evalutation of the solution but not the complete analytic expression ? Another question: there are boundary condition for this system ?
Ssnow
 
Thanks for the reply!

I don't know a ton about these types of problems. Say I want to numerically itegrate a system of 4 nonlinear ODEs as an IVP. Or what if I have PDES as an IVP and do RK4 and finite differencing. Can I know if my numerical solution is correct? Assume I do not have an approximate solution (i.e. a polynomial)
 
The main method I currently use is to compare my answer with a "better" solution (example search term "Clean Numerical Simulation"). It sounds a bit obvious, but if you do another simulation with higher precision/order and smaller timestep, you can compare the results and see where they are diverging. This can be automated. I use arbitrary precision (MPFR) arithmetic for mitigating roundoff and because I trust INRIA more than I trust Intel to do floating point properly ;) I use the Taylor Series Method to obtain arbitrary order of integration.

Sometimes there are invariants and constants that you can evaluate and monitor. There are always local error estimates, but I tend to solve nonlinear ODEs that get rather degenerate or chaotic and these render local error irrelevant.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 36 ·
2
Replies
36
Views
5K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K
Replies
5
Views
5K
  • · Replies 5 ·
Replies
5
Views
1K