Numerical calculations and rigorous mathematics
- The originator of this book is now retired. Any competent enthusiast is welcome to further this project.
Introduction
[edit | edit source]Everyone knows that mathematics usually proves general theorems that never contradict one another, while numerical calculations usually give particular results approximately; such calculations may disagree within a reasonable error. In the numerical context "number" usually means a terminating decimal (or binary), while in mathematics a (real) number may be (rational number, repeating decimal), (irrational algebraic number; its decimal representation neither terminates nor infinitely repeats), (transcendent, that is, not algebraic), etc.
Estimation (and minimization) of numerical errors is an important part of numerical analysis. Guaranteed error bounds are available in some (relatively simple) cases, and are sometimes practical, but sometimes much greater than the actual errors they bound from above, and sometimes prohibitively laborious to find. Thus it is not uncommon to get an approximate result having only a vague idea about its error.
Being impressed by these distinctions between pure mathematics and applied mathematics one may wonder, are they still two sides of one science, or two different sciences. Some go so far as to distinguish between "theoretical numbers", "pragmatic numbers" and "computer numbers" and consider mathematical constants like and as elements of symbolic calculations devoid of exact numerical values.
Here are two quotes (translated into English) from the book by Е.М. Левич (E.M. Levich), "Математическая физика и компьютерная математика" ("Mathematical physics and computer mathematics"), in Russian. Available online here and here.
"In the eyes of physicists, mathematics is a single building, in which not only one can prove theoretical statements, but also obtain numerical results, using computers, if necessary.
However, modern mathematics is not a monolith, it consists of several types of mathematics that differ from each other not only by their goals, but also by the main objects of research: theoretical mathematics, pragmatical mathematics and computer mathematics. Uniting these types is the fact that in each of them the main objects of research are the so-called "numbers". The meaning of this concept in different types of mathematics is different, so they differ from each other in their properties and areas of applicability.
It should be noted that in modern science the concept of numbers is not strict enough, it is treated as a kind of single concept that reflects certain quantitative entities."
(page 2)
"The second way consists in the numerical solution of the differential equations for certain initial conditions in order to obtain certain quantitative results for verification by experiment. In this case, we are faced with methodological difficulties described in the previous paragraph. Because there is no logical possibility to determine whether the finite set of numbers obtained as a result of the computational process is the solution of the task, we do not have, in fact, what to compare with the experimental results. From what has been said, it follows that if to check the physical theory is necessary to solve numerically by a computer a differential equation or a system of differential equations, then such a theory is unverifiable by experiment." (the last paragraph, page 34)
Vaguely related ideas are discussed by ultrafinitists.
- Ultrafinitism at Wikipedia.
Once in 2016, during a discussion of this kind, the originator of this essay was challenged to prove rigorously that the first 10 digits of the number (a calculator gives something like 22026.46579481 but is not a valid argument in rigorous proof) are indeed 22026.465794; in other words, to prove the following.
Theorem.
He accepted the challenge and proved this theorem. It is in no way an original research in the academic sense; a mathematical journal would reject it as a trivial result obtained by straightforward use of well-known methods. Every professional mathematician can do it easily. But, being of little interest to experts, it can help a student to get rid of some possible misconceptions.
- A theorem is not necessarily general; a particular numerical fact can be a theorem.
- The set of all theorems is infinite (just as the set of natural numbers); finitely many most notable theorems are presented in mathematical literature (and most of them are general), others are not (and similarly, finitely many natural numbers are mentioned for now, others are not).
- Well-known mathematical constants have exact numerical values; usually, their decimal digits do not follow any known pattern, but still can be generated by an algorithm; moreover, correctness of every finite portion of the infinite sequence of digits is a theorem (whose proof also can be generated by an algorithm). Possible algorithms are numerous, but uniqueness of every digit is guaranteed as long as theorems do not contradict one another (hopefully, forever).
The proof, analytic part
[edit | edit source]Lemma 1. The following inequality holds for all such that
The proof uses two well-known power series
- for
- for
Proof of Lemma 1. First, Second,
The proof, arithmetic part
[edit | edit source]Lemma 1 is quite usual; a general fact is proved by symbolic calculations. Accordingly, the proof is concise. In contrast, the theorem states a particular numerical fact, and the arithmetic part of its proof is basically a numeric calculation converted into a proof, which is unusual. Accordingly, some preliminaries and explanations are needed here.
Everyone known that 2+2=4; but, being not an axiom, this fact needs a proof. First, definitions: 2 = 1+1; 3 = 2+1; 4 = 3+1 . Second, the proof: 2+2 = 2+(1+1) = (2+1)+1 = 3+1 = 4. Similarly you can prove that 4+3=7 etc. Also, 2×2 = (1+1)×2 = 1×2 + 1×2 = 2+2 = 4, etc. (If you wish even deeper formalization, try Peano axioms.)
Next step: how to prove that 23×6 = 138 ? First, definitions: 23 = 2×10+3; 100 = 10×10; 138 = 1×100+3×10+8 . Second, the proof: 23×6 = (2×10+3)×6 = (2×10)×6 + 3×6 = (2×6)×10 + 3×6 = (10+2)×10 + (1×10+8) = 100+(2+1)×10+8 = 138. True, some steps are skipped, but hopefully you can fill in the gaps. And by the way, why 138 < 163 ? Since 138 < 138+2 = 140 < 160 < 160+3 = 163. Or, if you prefer, 138 < 138 + 25 = 163.
Thus, "23×6<163" is (an example of) a mathematical statement that has (at least one) proof; in other words, it is a theorem. (See Theory (mathematical logic): "any sentence that follows from the axioms ... is called a theorem of the theory"; see also Formal proof.) Clearly, the set of all theorems is infinite.
We see that arithmetic calculations with natural numbers are unproblematic (and no wonder: they are exact, not approximate); they can be converted to theorems and proofs (and moreover, such conversion can be automated by an algorithm). The same holds for arithmetic calculations with terminating decimals (exact calculations, with no round-off errors). For instance, the statement "2.3×0.6<1.63" reduces readily to "23×6<163".
Now we return to the proof of the theorem. We introduce the number and squeeze it between two terminating decimals as follows.
Lemma 2.
Are you disturbed by the sudden unexplained emergence of these large numbers? If you are, open the following digression.
"A formal proof or derivation is a finite sequence of sentences ..., each of which is an axiom, an assumption, or follows from the preceding sentences in the sequence by a rule of inference. The last sentence in the sequence is a theorem" (Formal proof). Just that - no more, no less. The proof is not required to follow any strategy. It may be tricky; here are some examples.
In order to factor the polynomial one adds and subtracts : Why just ? An explanation can be given, but is not a part of the factorization.
In order to calculate the Gaussian integral one introduces the double integral Why? Just a trick.
In order to get the wonderful formula for Fibonacci numbers one considers geometric progressions satisfying the same recurrence relation.
In order to prove a property of a sequence one often introduces its generating function (and students often wonder what is).
- Generally, any well-defined mathematical object may be introduced at any stage of a proof, at the author's discretion; no apology is expected from the author. Explanations (if any) are comments to the proof, not a part of the proof. Several objects may be introduced during one proof.
Proof of Lemma 2.
We denote and rewrite the needed inequality:
It remains to calculate
Lemma 3.
Proof of Lemma 3.
We denote and rewrite the needed inequality:
We calculate
and the inequality becomes
Lemma 4.
Proof. We denote and rewrite the needed inequality: We calculate and the inequality becomes
Proposition.
Proof. Follows from the four lemmas, since and
Proof of Theorem.
Proposition gives
Taking into account that we get whence
(since and ). Similarly we get
which completes the proof.
Questions, exercises, problems
[edit | edit source]A lot of large natural numbers are introduced in the given proof with no explanation. It appears that properties of these numbers are sufficient for proving the theorem.
- 1a. Think, how to choose such numbers (not necessarily equal to these used in this essay).
- 1b. Program the computer to find such numbers.
Note that the number 22 is special in the proof; initially, the number is squeezed between two terminating decimals, and then squaring is applied 22 times.
- 2a. Think, can 21 or 23 be used in place of 22?
- 2b. Modify your computer program in order to square 21 or 23 times. Do you still reach the goal (to prove the theorem)? Also try to change the number of digits in the large natural numbers.
- 2c. Consider for other values of (not just ).
Quadratic polynomial is used in Lemma 1 as an approximation of the exponential function. Why just quadratic?
- 3a. Think, can a linear or cubic polynomial be used instead?
- 3b. Modify your computer program accordingly.
- 3c. Try to use the power series in order to get rid of the repeated squaring.
Calculation of the exponential function, closely related to the differential equation is just one, relatively simple computational task.
- 4a Treat some other computational tasks in the same spirit.
- 4b Try to find an example of a computational task that cannot be treated this way, even in principle.
And a bonus...
Conclusion
[edit | edit source]Non-rigorous numerical calculations are widely used; rigorous numerical calculations are laborious but possible.
Links
[edit | edit source]- Warwick Tucker, Validated Numerics: A Short Introduction to Rigorous Computations, Princeton University Press, 2011, 152 pages.
- Reliable Computing, An open electronic journal devoted to mathematical computations with guaranteed accuracy, bounding of ranges, mathematical proofs based on floating point arithmetic, and other theory and applications of interval arithmetic and directed rounding.
- Fredrik Johansson, Computing hypergeometric functions rigorously, e-print, 2016.
- Validated numerics, a Wikipedia article.
- Computer-assisted proof, a Wikipedia article.
- Interval arithmetic, a Wikipedia article (basic technique for validated numerics).
- Affine arithmetic, a Wikipedia article (improvement of interval arithmetic).
- INTLAB, The Matlab/Octave toolbox for Reliable Computing.