How can you know if a numerical solution is correct?

Click For Summary

Discussion Overview

The discussion revolves around the methods for verifying the correctness of numerical solutions to nonlinear systems of differential equations, particularly in the absence of known analytic solutions. Participants explore various approaches and practices used in numerical analysis, including integration techniques and error estimation.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant inquires about the meaning of "numerically solving" a nonlinear system of differential equations, emphasizing the need for clarity regarding the nature of the solution and boundary conditions.
  • Another participant describes their approach of comparing numerical results with a more precise solution, suggesting the use of higher precision methods and smaller timesteps to identify divergences.
  • The use of arbitrary precision arithmetic is mentioned as a strategy to mitigate roundoff errors, with a preference for certain libraries over others for floating-point operations.
  • Monitoring invariants and constants is proposed as a method to evaluate the correctness of solutions, although one participant notes that local error estimates may be less relevant for chaotic or degenerate systems.

Areas of Agreement / Disagreement

Participants express differing views on the methods for verifying numerical solutions, with no consensus reached on a single best practice. The discussion highlights multiple approaches and the complexity of the problem.

Contextual Notes

Limitations include the lack of a known analytic solution, which complicates the verification process. The discussion also reflects varying levels of familiarity with numerical methods among participants.

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
6K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 10 ·
Replies
10
Views
3K
Replies
5
Views
5K
  • · Replies 5 ·
Replies
5
Views
2K