
Math, STA? !! 1
In early 2012, a video recording of Harry Bernhardt’s report on CodeMash titled “WAT” was surfing the Internet. On habr there were even two habrastaty about this report: one , two . This presentation talked about some of the subtleties of Ruby and JavaScript that seem illogical and cause a reaction: “WAT?”.
In the same habrastati I collected ten examples of mathematical reasoning, which, on the contrary, at first glance seem logical, but seeing the result, I also want to ask the question "STA? !!".
So, can you determine where the catch is?

1. Everyone in the school passes the formula for the sum of the first n members of the arithmetic progression , applying this formula to the sum of the firstn positive integers we get:
1 + 2 + 3 + ... + n = n ( n + 1) / 2.
If this formula is applied to the sum of numbers from 1 to n - 1, then of course we get
1 + 2 + 3 + ... + ( n - 1) = ( n - 1) n / 2.
Let's add to both sides of the last equality one by one:
1 + 2 + 3 + ... + ( n - 1) + 1 = ( n - 1) n / 2 + 1.
Simplifying, we get:
1 + 2 + 3 + ... + n = ( n - 1) n / 2 + 1.
What is the sum of the left-hand side of this equation we recorded at the beginning, therefore,
n ( n + 1) / 2 = ( n - 1) n / 2 + 1.
We open the brackets:
n 2 /2 + n / 2 = n 2 / 2 - n / 2 + 1.
Simplify, and we get that
n = 1.
Since n was arbitrary, we showed that all positive integers are 1.
2. Consider the integral
.
Since the function 1 / x 2 is positive over its entire domain of definition, the value of the integral must be positive. Let's check.
The antiderivative of the function 1 / x 2 can be found in the antiderivative table and is equal to −1 / x + const.
We use the Fundamental Theorem formula:
.
3. Рассмотрим систему уравнений

Число переменных совпадает с числом уравнений, поэтому применим метод Крамера, который заключается в том, что решение выражается в виде xk = Δk / Δ, где Δ — определитель матрицы системы, а Δk — определитель матрицы, полученной из матрицы системы заменой k-го столбца на столбец свободных членов. Но столбец свободных членов совпадает с любым из столбцом матрицы, поэтому Δ = Δk. А значит, xk = 1 для всех k. Хорошо, подставим это решение в первое уравнение:

Следовательно, 100c1= c 1 . Dividing both sides of the equality by c 1 , we obtain 100 = 1.
4. Consider the series

This is the so-called alternating harmonic series , it converges, and its sum is ln 2. We
rearrange the members of this series so that two negative ones follow one negative term:

It seems that nothing bad happened, the series both converged and converges but let's consider the subsequence of partial sums of this series:
.
The last sum is nothing more than the sum of the first 2 m members of the initial alternating harmonic series, the sum of which, as we recall, is equal to ln 2. And this means that the sum of the series with rearranged terms is equal to ½ln 2.

5. Let's move on to the limits. Consider the limit
.
Since the numerator and denominator tend to infinity with x tending to infinity, as well as the numerator and denominator are differentiable, we can apply the Lopital rule.
Find the derivative of the numerator:
(½sin2 x + x ) '= cos2 x + 1 = 2cos 2 x .
Find the derivative of the denominator:
(e sin x (cos x sin x + x )) '= e sin x cos x (cos x sin x +x ) + e sin x (−sin 2 x + cos 2 x + 1) = e sin x cos x (cos x sin x + x + 2cos x ).
From where

now we notice that the numerator is a bounded function, and the denominator tends to plus infinity as x tends to plus infinity, so the limit is 0.
If you have not noticed anything unusual, then rewrite the denominator in the original limit as follows:
e sin x (cos x sin x +x ) = e sin x (½sin 2x + x ).
Therefore, the numerator and denominator of the original function can simply be reduced by ½sin 2x + x , therefore, the function under the limit sign is simply equal to e −sin x . And such a function already has no limit with x tending to plus infinity!
6. Here is another limit:
.
Let's look at the function graph under the limit sign:

It is seen that the function with x tending to zero on the right tends to zero. Let's count several values for certainty:
So the limit is probably 0. Agree? We calculate symbolically:
Got plus infinity! And that is the correct answer.

7. Consider the matrix
.
We will use some mathematical package to find its eigenvalues. I had Maxima at hand, so I took advantage of it :
That is obtained approximately the
eigenvalues: -5.560, 5,064 1,892 + i , 5,064 - 1,892 i , 1,156 4,316 + i , 1,156 - 4,316 i , -3.440 3,327 + i , -3.440 - 3,327 i .
Well, numbers are numbers, but let's find the eigenvalues of the transposed matrix, we expect to get the same numbers, since the eigenvalues of the matrix do not change when transposed.
That is, the eigenvalues of the transposed matrix are approximately the following:
−8.318, 7.570 + 3.333 i , 7.570 - 3.333 i , 1.804 + 7.453 i , 1.804 - 7.453 i , −5.215 + 5.891 i , −5.215 - 5.891 i .
Not a single match! But let's go ahead and find the eigenvalues symbolically:
This time we got −1, 1, −2, 2, −4, 4, 0.

8. Consider the equality that some consider the most beautiful in mathematics:
e i π + 1 = 0.
We rewrite it in the form
e i π = −1.
By squaring both sides of the equality, we get
e 2 i π = 1.
And now we raise both sides of the last equality to the power i :
(e 2 i π ) i = 1 i .
We know that 1 is equal to 1 to any degree, so
e 2 i 2 π = 1.
But we also know that i 2= −1, therefore,
e −2π = 1.
Here, just in case, you can take a calculator and make sure that e −2π is still approximately equal to 0.001867442731708, which certainly is not 1.
9. Consider a stepped plate of infinite length, consisting of rectangles: the first rectangle is a square with dimensions of 1 cm by 1 cm, the second is a rectangle with dimensions of 0.5 cm by 2 cm, each next rectangle is twice as long and two already the previous one, then there are measures 2 k −1 by 2 1− k cm. Note that the area of each rectangle is one square centimeter, so the area of the entire plate is infinite. Therefore, to paint this plate will require an infinite amount of paint.
Consider a vessel consisting of cylinders. The height of the first cylinder is 1 cm, the radius is also 1 cm, the height of the second cylinder is 2 cm, the radius is 0.5 cm, and so on, each next cylinder is also twice as long as the previous one, and its radius is half as much.
Let us find the volume of this vessel: the volumes of the cylinders form a geometric progression: π, ½π, ¼π, ..., π / 2 k , ... Therefore, the total volume is finite and equal to 2π cubic centimeters.
Fill our vessel with paint. Let’s lower our plate into it and pull it out. It will be completely painted with a finite amount of paint from all sides!
10. Well, finally, we prove the following statement:
All horses are white.
To prove this, we use induction.
Base induction. Obviously, there are white horses. Choose one of these horses.
Induction step. Let it be proved that any k horses are white. Consider the set of k + 1 horses. We remove one horse from this set. The remaining k horses will be white by induction. Now we will return the stowed horse and remove some other. The remaining k horses will again be white by induction. Therefore, all k + 1 horses will be white.
It follows that all the horses are white. Q.E.D.
If you still want to look for errors in reasoning, I recommend the book S. Klymchuk, S. Staples, “Paradoxes and Sophisms in Calculus”.
In the same habrastati I collected ten examples of mathematical reasoning, which, on the contrary, at first glance seem logical, but seeing the result, I also want to ask the question "STA? !!".
So, can you determine where the catch is?

1. Everyone in the school passes the formula for the sum of the first n members of the arithmetic progression , applying this formula to the sum of the firstn positive integers we get:
1 + 2 + 3 + ... + n = n ( n + 1) / 2.
If this formula is applied to the sum of numbers from 1 to n - 1, then of course we get
1 + 2 + 3 + ... + ( n - 1) = ( n - 1) n / 2.
Let's add to both sides of the last equality one by one:
1 + 2 + 3 + ... + ( n - 1) + 1 = ( n - 1) n / 2 + 1.
Simplifying, we get:
1 + 2 + 3 + ... + n = ( n - 1) n / 2 + 1.
What is the sum of the left-hand side of this equation we recorded at the beginning, therefore,
n ( n + 1) / 2 = ( n - 1) n / 2 + 1.
We open the brackets:
n 2 /2 + n / 2 = n 2 / 2 - n / 2 + 1.
Simplify, and we get that
n = 1.
Since n was arbitrary, we showed that all positive integers are 1.
STA? !!! 1
Actually, this equality is false:
1 + 2 + 3 + ... + ( n - 1) + 1 = 1 + 2 + 3 + ... + n .
This will become noticeable if instead of
1 + 2 + 3 + ... + ( n - 1)
write
1 + 2 + 3 + ... + ( n - 3) + ( n - 2) + ( n - 1).
Then
1 + 2 + 3 + ... + ( n - 3) + ( n - 2) + ( n - 1) + 1 = 1 + 2 + 3 + ... + ( n - 3) + ( n - 2) + n ,
which of course is not equal to
1 + 2 + 3 + ... + n .
1 + 2 + 3 + ... + ( n - 1) + 1 = 1 + 2 + 3 + ... + n .
This will become noticeable if instead of
1 + 2 + 3 + ... + ( n - 1)
write
1 + 2 + 3 + ... + ( n - 3) + ( n - 2) + ( n - 1).
Then
1 + 2 + 3 + ... + ( n - 3) + ( n - 2) + ( n - 1) + 1 = 1 + 2 + 3 + ... + ( n - 3) + ( n - 2) + n ,
which of course is not equal to
1 + 2 + 3 + ... + n .
2. Consider the integral

Since the function 1 / x 2 is positive over its entire domain of definition, the value of the integral must be positive. Let's check.
The antiderivative of the function 1 / x 2 can be found in the antiderivative table and is equal to −1 / x + const.
We use the Fundamental Theorem formula:

Not a very positive number!
First, the Newton-Leibniz formula is applicable only if the integrand is continuous on a given interval. Our function at zero has a discontinuity of the second kind and is not bounded on the interval [−1, 1]. (Instead of continuity, you can require the performance of weaker properties, but in any case, the formula cannot be applied.)
3. Рассмотрим систему уравнений

Число переменных совпадает с числом уравнений, поэтому применим метод Крамера, который заключается в том, что решение выражается в виде xk = Δk / Δ, где Δ — определитель матрицы системы, а Δk — определитель матрицы, полученной из матрицы системы заменой k-го столбца на столбец свободных членов. Но столбец свободных членов совпадает с любым из столбцом матрицы, поэтому Δ = Δk. А значит, xk = 1 для всех k. Хорошо, подставим это решение в первое уравнение:

Следовательно, 100c1= c 1 . Dividing both sides of the equality by c 1 , we obtain 100 = 1.
WAT? !!
The Cramer method is applicable only when the determinant Δ is nonzero. In this case, this is not so.
4. Consider the series

This is the so-called alternating harmonic series , it converges, and its sum is ln 2. We
rearrange the members of this series so that two negative ones follow one negative term:

It seems that nothing bad happened, the series both converged and converges but let's consider the subsequence of partial sums of this series:

The last sum is nothing more than the sum of the first 2 m members of the initial alternating harmonic series, the sum of which, as we recall, is equal to ln 2. And this means that the sum of the series with rearranged terms is equal to ½ln 2.

How is it that ln2 = ln2 / 2?
Since the series was conditionally convergent, it cannot be guaranteed that its sum will remain unchanged when the members are rearranged. Moreover, Riemann’s theorem states that from this series (and any other conditionally convergent) by a suitable permutation of the terms, one can obtain a series whose sum will be any given number in advance, or a divergent series in general.
5. Let's move on to the limits. Consider the limit

Since the numerator and denominator tend to infinity with x tending to infinity, as well as the numerator and denominator are differentiable, we can apply the Lopital rule.
Find the derivative of the numerator:
(½sin2 x + x ) '= cos2 x + 1 = 2cos 2 x .
Find the derivative of the denominator:
(e sin x (cos x sin x + x )) '= e sin x cos x (cos x sin x +x ) + e sin x (−sin 2 x + cos 2 x + 1) = e sin x cos x (cos x sin x + x + 2cos x ).
From where

now we notice that the numerator is a bounded function, and the denominator tends to plus infinity as x tends to plus infinity, so the limit is 0.
If you have not noticed anything unusual, then rewrite the denominator in the original limit as follows:
e sin x (cos x sin x +x ) = e sin x (½sin 2x + x ).
Therefore, the numerator and denominator of the original function can simply be reduced by ½sin 2x + x , therefore, the function under the limit sign is simply equal to e −sin x . And such a function already has no limit with x tending to plus infinity!
Hey, why did Lopital rule get 0 ?!
In the formulation of Lapital's Theorems there is also a requirement that the denominator does not turn to 0 in some punctured neighborhood of the point at which we consider the limit. This requirement has not been met here.
I took this example from D. Gruntz's dissertation, “On Computing Limits in a Symbolic Manipulation System”.
I took this example from D. Gruntz's dissertation, “On Computing Limits in a Symbolic Manipulation System”.
6. Here is another limit:

Let's look at the function graph under the limit sign:
(%i14) plot2d(1/x^(log(log(log(log(1/x)))) - 1), [x, 0, 0.01]);

It is seen that the function with x tending to zero on the right tends to zero. Let's count several values for certainty:
(%i47) f(x) := 1/x^(log(log(log(log(1/x)))) - 1)$
(%i48) f(0.00001);
(%o48) 2.7321447178155322E-6
(%i49) f(0.0000000000000001);
(%o49) 9.6464144195334194E-13
(%i50) f(10.0^-20);
(%o50) 7.8557909648538576E-15
(%i51) f(10.0^-30);
(%o51) 1.0252378366509659E-19
(%i52) f(10.0^-40);
(%o52) 2.8974935848725609E-24
(%i53) f(10.0^-50);
(%o53) 1.4064426717966528E-28
So the limit is probably 0. Agree? We calculate symbolically:
(%i59) limit(1/x^(log(log(log(log(1/x)))) - 1), x, 0, plus);
(%o59) inf
Got plus infinity! And that is the correct answer.

And now you're just fooling me, I saw the schedule!
Let's take a close look at the function ln ln ln ln x. This function is increasing, while its limit on plus infinity is equal to plus infinity, but it increases very slowly, for example, it takes the value 10 at x = e e e e 10 , which is approximately equal to 10 10 10 9565.6 . Therefore, the expression ln ln ln ln 1 / x - 1 still tends to infinity with x tending to 0 on the right, and therefore the desired limit is equal to infinity.
I also took this example from D. Gruntz's dissertation, “On Computing Limits in a Symbolic Manipulation System”.
I also took this example from D. Gruntz's dissertation, “On Computing Limits in a Symbolic Manipulation System”.
7. Consider the matrix

We will use some mathematical package to find its eigenvalues. I had Maxima at hand, so I took advantage of it :
(%i162) load(lapack)$
(%i163) dgeev(C);
(%o163) [[1.892759249004818 %i + 5.064646369950517,
5.064646369950517 - 1.892759249004818 %i,
4.316308825205465 %i + 1.156345532561647,
1.156345532561647 - 4.316308825205465 %i, - 5.560325596213962,
3.327556714595323 %i - 3.440829104405306,
- 3.327556714595323 %i - 3.440829104405306], false, false]
That is obtained approximately the
eigenvalues: -5.560, 5,064 1,892 + i , 5,064 - 1,892 i , 1,156 4,316 + i , 1,156 - 4,316 i , -3.440 3,327 + i , -3.440 - 3,327 i .
Well, numbers are numbers, but let's find the eigenvalues of the transposed matrix, we expect to get the same numbers, since the eigenvalues of the matrix do not change when transposed.
(%i164) dgeev(transpose(C));
(%o164) [[3.333252572558635 %i + 7.570309809213996,
7.570309809213996 - 3.333252572558635 %i,
7.453248893016916 %i + 1.804487379065658,
1.804487379065658 - 7.453248893016916 %i,
5.891112477041645 %i - 5.215502218450374,
- 5.891112477041645 %i - 5.215502218450374, - 8.318589939657096], false, false]
That is, the eigenvalues of the transposed matrix are approximately the following:
−8.318, 7.570 + 3.333 i , 7.570 - 3.333 i , 1.804 + 7.453 i , 1.804 - 7.453 i , −5.215 + 5.891 i , −5.215 - 5.891 i .
Not a single match! But let's go ahead and find the eigenvalues symbolically:
(%i166) eigenvalues(C);
(%o166) [[- 1, 1, - 2, 2, - 4, 4, 0], [1, 1, 1, 1, 1, 1, 1]]
This time we got −1, 1, −2, 2, −4, 4, 0.

I did not understand anything!
In fact, C = L -1 R L , where
,
.
Therefore, the correct answer is: −1, 1, −2, 2, −4, 4, 0.
Numerical methods give incorrect eigenvalues, since this matrix is poorly conditioned with respect to the problem of finding eigenvalues, and because of errors for the calculations get such a big mistake.
You can read more about the conditional number of an eigenvalue, for example, in the book of J. Demmel “Computational linear algebra”, I note only that this number is equal to the secant of the acute angle between the left and right eigenvectors of a given eigenvalue.
I took this example with a matrix from the presentation of S. K. Godunov “Paradoxes of Computational Linear Algebra and Spectral Portraits of Matrices”.


Therefore, the correct answer is: −1, 1, −2, 2, −4, 4, 0.
Numerical methods give incorrect eigenvalues, since this matrix is poorly conditioned with respect to the problem of finding eigenvalues, and because of errors for the calculations get such a big mistake.
You can read more about the conditional number of an eigenvalue, for example, in the book of J. Demmel “Computational linear algebra”, I note only that this number is equal to the secant of the acute angle between the left and right eigenvectors of a given eigenvalue.
I took this example with a matrix from the presentation of S. K. Godunov “Paradoxes of Computational Linear Algebra and Spectral Portraits of Matrices”.
8. Consider the equality that some consider the most beautiful in mathematics:
e i π + 1 = 0.
We rewrite it in the form
e i π = −1.
By squaring both sides of the equality, we get
e 2 i π = 1.
And now we raise both sides of the last equality to the power i :
(e 2 i π ) i = 1 i .
We know that 1 is equal to 1 to any degree, so
e 2 i 2 π = 1.
But we also know that i 2= −1, therefore,
e −2π = 1.
Here, just in case, you can take a calculator and make sure that e −2π is still approximately equal to 0.001867442731708, which certainly is not 1.
And this time, what's the catch?
In fact, the function of raising to a complex degree is multi-valued and, for example,
1 i = {e −2π k | k ∈ Z }.
And so the fourth transition is no longer true. If you consider only one of the branches, then some of the usual identities for degrees cease to hold, which is what happened here.
1 i = {e −2π k | k ∈ Z }.
And so the fourth transition is no longer true. If you consider only one of the branches, then some of the usual identities for degrees cease to hold, which is what happened here.

Consider a vessel consisting of cylinders. The height of the first cylinder is 1 cm, the radius is also 1 cm, the height of the second cylinder is 2 cm, the radius is 0.5 cm, and so on, each next cylinder is also twice as long as the previous one, and its radius is half as much.
Let us find the volume of this vessel: the volumes of the cylinders form a geometric progression: π, ½π, ¼π, ..., π / 2 k , ... Therefore, the total volume is finite and equal to 2π cubic centimeters.
Fill our vessel with paint. Let’s lower our plate into it and pull it out. It will be completely painted with a finite amount of paint from all sides!
WAT ?!
This is a famous painter paradox .
When we talked about the impossibility of painting the plate, we assumed that the plate was covered with a layer of paint of the same thickness.
When painting with the help of our vessel, each subsequent rectangle is covered with an increasingly thin layer of paint.
When we talked about the impossibility of painting the plate, we assumed that the plate was covered with a layer of paint of the same thickness.
When painting with the help of our vessel, each subsequent rectangle is covered with an increasingly thin layer of paint.
10. Well, finally, we prove the following statement:
All horses are white.
To prove this, we use induction.
Base induction. Obviously, there are white horses. Choose one of these horses.
Induction step. Let it be proved that any k horses are white. Consider the set of k + 1 horses. We remove one horse from this set. The remaining k horses will be white by induction. Now we will return the stowed horse and remove some other. The remaining k horses will again be white by induction. Therefore, all k + 1 horses will be white.
It follows that all the horses are white. Q.E.D.
But I saw black horses!
Everything is simple here : in the base of induction, instead of the universal quantifier, the existential quantifier is used.
If you still want to look for errors in reasoning, I recommend the book S. Klymchuk, S. Staples, “Paradoxes and Sophisms in Calculus”.