Undergrad How can you know if a numerical solution is correct?

Click For Summary
To verify the correctness of a numerical solution for nonlinear differential equations without an analytic solution, practitioners often compare results with higher precision simulations or alternative methods, such as the Taylor Series Method. Utilizing arbitrary precision arithmetic can help mitigate roundoff errors, enhancing reliability. Monitoring invariants and constants can also provide insight into the solution's accuracy. Local error estimates may be less effective for chaotic or degenerate systems, making robust comparison methods essential. Ultimately, thorough testing against more precise solutions is a common practice in numerical analysis.
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!
 
Mathematics 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.
 
Here is a little puzzle from the book 100 Geometric Games by Pierre Berloquin. The side of a small square is one meter long and the side of a larger square one and a half meters long. One vertex of the large square is at the center of the small square. The side of the large square cuts two sides of the small square into one- third parts and two-thirds parts. What is the area where the squares overlap?

Similar threads

  • Poll Poll
  • · Replies 1 ·
Replies
1
Views
1K
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
Replies
7
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K