Mathematical induction. Limits of sequences

L ATEST EDITION A PRIL 17, 2015
15:46
AT
Mathematical induction.
Limits of sequences
Proofreading of English by Laurence Weinstock
Table des matières
1 Mathematical induction
1.1 Domino effect or chain reaction . . . . . . . .
1.2 Significance of mathematical induction . . .
1.3 Axiom of induction . . . . . . . . . . . . . . .
1.4 Bernoulli’s inequality . . . . . . . . . . . . . .
1.5 Application to sequences . . . . . . . . . . . .
1.6 Situations leading to an erroneous conclusion
.
.
.
.
.
.
.
.
.
.
.
.
2
2
2
3
4
4
5
2 Limit of a sequence
2.1 Finite limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2 Infinite limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3 Limit by comparison and on an interval . . . . . . . . . . . . . . .
2.4 Operations on limits . . . . . . . . . . . . . . . . . . . . . . . . . .
2.4.1 Limit of a sum . . . . . . . . . . . . . . . . . . . . . . . . . .
2.4.2 Limit of a product . . . . . . . . . . . . . . . . . . . . . . .
2.4.3 Limit of a quotient . . . . . . . . . . . . . . . . . . . . . . .
2.5 Limit of a geometric sequence . . . . . . . . . . . . . . . . . . . . .
2.6 Convergence of a monotonic sequence . . . . . . . . . . . . . . . .
2.6.1 Upper-bounded, lower-bounded and bounded sequences
2.6.2 Convergence theorems . . . . . . . . . . . . . . . . . . . . .
2.7 The method of Heron of Alexandria (1st century) . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
6
6
6
7
8
8
8
9
10
11
11
11
13
PAUL MILAN
1
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
TERMINALE S
TABLE DES MATIÈRES
1 Mathematical induction
1.1 Domino effect or chain reaction
Mathematical induction is similar to the domino effect. It is analogous to a row
of dominoes spaced regularly :
?
d0
d1
The first
domino falls.
Primer
d2
d n d n +1
If the nth domino falls, it
knocks over the (n + 1)th.
Propagation
• The first domino d0 falls. This primes the reaction.
• The dominoes are close enough together so that if one domino dn falls the following dn+1 also falls. There is therefore propagation along of the row of dominoes.
So it can be concluded that all dominoes in the row fall one after the other.
Let’s transpose this domino effect into a mathematical property.
Let (un ) be the sequence defined by : u0 = 0, 3 and ∀n ∈ N, un+1 =
Consider the property (P) : ∀n ∈ N, 0 < un < 1
1
1
un +
2
2
• The first domino falls :
u0 = 0, 3 then 0 < u0 < 1. The property is primed.
• If a domino falls, the following also falls :
1
1
1
1
1
⇒
< un + < 1.
If 0 < un < 1 ⇒ 0 < un <
2
2
2
2
2
1
We then have 0 < < un+1 < 1. The property is hereditary.
2
As the first domino has fallen and the others fall by propagation, all the dominoes
fall and therefore the property is satisfied for any natural integer.
1.2 Significance of mathematical induction
Consider the sequence (un ) defined by : u0 = 0 and ∀n ∈ N, un+1 = 2un + 1
We would like to have a formula to explicitly compute un as a function of n. At
first, there is no obvious formula to be seen.
In such a situation, calculating the first terms of the sequence is interesting as it
often allows you to see a pattern emerge.
Let’s calculate the first few terms :
u1 = 2u0 + 1 = 1
(21 − 1)
u2 = 2u1 + 1 = 3
u3 = 2u2 + 1 = 7
u4 = 2u3 + 1 = 15
u5 = 2u4 + 1 = 31
PAUL MILAN
2
(22 − 1)
(23 − 1)
(24 − 1)
(25 − 1)
TERMINALE S
1. MATHEMATICAL INDUCTION
The terms of (un ) seem to follow a simple law : by adding 1 to each term, the
successive power of 2 is obtained.
From this observation, the following conjecture can be put forward : ∀n ∈ N, un =
2n − 1
B A conjecture is not a proof (i.e. not necessarily a true affirmation, some conjec-
tures sometimes prove to be false. . .). It is only the statement of a property resulting from a number of observations.
How can this conjecture be confirmed ?
Note (P) the property, defined by : ∀n ∈ N, un = 2n − 1
Let’s assume for any arbitrary n that the property (P) is true : un = 2n − 1
Then we have : un+1 = 2un + 1 = 2(2n − 1) + 1 = 2n+1 − 1
This is the property (P) for the index n + 1.
If the property is true for an arbitrary index n (induction hypothesis) then the
property is also true for the following index n + 1. This is called the induction
step.
We have checked that the property is true for the indices 0, 1, 2, 3, 4, 5. This is
called the basis step. But with the induction step, it will also be true for the index
n = 6, then for the index n = 7 etc. The property is therefore true for all n.
1.3 Axiom of induction
Definition 1 : Consider the property (Pn ) defined on N.
• If the property is satisfied for the first index 0 or n0 : basis step
• and if the induction step is true from index 0 or n0 , i.e. :
∀n > 0 or n > n0 then Pn ⇒ Pn+1
then the property is true for all n from index 0 or n0
Note : Mathematical induction is like the domino effect :
If a domino falls, then the next one falls.
If the first falls then the second falls, then the third, then the fourth. . .
Conclusion : if the first domino falls, then they all fall.
Mathematical induction has two steps :
• Prove the basis step
• Prove the induction step
If we can carry out these two steps then the property is proven for all natural
numbers.
B It must be ensured that the two conditions "basis step" and "induction step"
are proven. As a matter of fact, if one of the two conditions is not met, then an
erroneous conclusion is made, as shown by two examples in paragraph 1.6.
PAUL MILAN
3
TERMINALE S
TABLE DES MATIÈRES
1.4 Bernoulli’s inequality
Theorem 1 : Let a be a strictly positive real number. We then have
∀n ∈ N,
OPK
(1 + a)n > 1 + na
Organized Presentation of Knowledge
Prove this inequality by mathematical induction.
• Basis step :
(1 + a)0 = 1 and 1 + 0a = 1, then (1 + a)0 > 1 + 0 × a. The basis step is
established.
• Induction step :
Supposing that (1 + a)n > 1 + na, let’s show that (1 + a)n+1 > 1 + (n + 1) a
By hypothesis : (1 + a)n > 1 + na as 1 + a > 0 and as a result :
(1 + a)(1 + a)n > (1 + a)(1 + na)
(1 + a)n+1 > 1 + na + a + na2
> 1 + (n + 1) a + na2 > 1 + (n + 1) a
The induction step is established.
By reason of both the basis and induction steps : ∀n ∈ N,
(1 + a)n > 1 + na
Note : For the induction step, the inequality is proven by "transitivity" :
a > b and b > c so a > c
1.5 Application to sequences
Let (un ) be a sequence defined by : u0 = 1 and ∀n ∈ N, un+1 =
√
2 + un
a) Prove for all n, 0 < un < 2
b) Prove that the sequence is strictly increasing.
✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏
a) Let’s prove by mathematical induction that un is bounded.
Basis step : We know that u0 = 1 so 0 < u0 < 2. The basis step is established.
Induction step : Supposing that 0 < un < 2, show that 0 < un+1 < 2.
0 < un < 2 ⇒ 2 < un + 2 < 4
As the square root function is increasing on R + ,
√
√
√
2 < u n + 2 < 2 ⇒ 0 < 2 < u n +1 < 2
The induction step is established.
Therefore, by reason of both the basis and induction steps, we can conclude
that
:
∀n ∈ N, 0 < un < 2.
PAUL MILAN
4
TERMINALE S
1. MATHEMATICAL INDUCTION
b) Let’s show by mathematical induction that the sequence (un ) is increasing.
√
Basis step : we know that u1 = 3 so u1 > u0 . The basis step is established.
Induction step : Supposing un+1 > un , show that un+2 > un+1 .
u n +1 > u n ⇒ u n +1 + 2 < u n + 2
As the square root function is increasing on R + ,
p
u n +1 + 2 >
√
u n + 2 ⇒ u n +2 < u n +1
The induction step is established.
By reason of both the basis and induction steps, the sequence (un ) is increasing.
1.6 Situations leading to an erroneous conclusion
• Situation 1 : Only the induction step established.
Consider the property : ∀n ∈ N, 3 divides 2n
Induction step : Supposing that 3 divides 2n , show that 3 divides 2n+1 .
If 3 divides 2n , then there exists a natural number k such that : 2n = 3k
By multiplying by 2 : 2n+1 = 2 × 3k = 3(2k ). So therefore 3 divides 2n+1
Conclusion : The induction step is established but not the basis step, so it
cannot be concluded that the property is true. That is fortunate, because this
property is false !
• Situation 2 : The basis step is established up to a certain index.
Consider the following property : ∀n ∈ N, n2 − n + 41 is a prime number.
The basis step is established because for n = 0 we obtain 41 which is a prime
number.
But there is no mathematical induction even though P (n) is true up
to n = 40. This can be seen with
a table of prime numbers and a list
of the first terms of the sequence
(un ) defined by un = n2 − n + 41.
n
0
1
2
3
4
5
6
7
8
9
10
un
41
41
43
47
53
61
71
83
97
113
131
n
11
12
13
14
15
16
17
18
19
20
21
un
151
173
197
223
251
281
313
347
383
421
461
n
22
23
24
25
26
27
28
29
30
31
32
un
503
547
593
641
691
743
797
853
911
971
1033
n
33
34
35
36
37
38
39
40
un
1097
1163
1231
1301
1373
1447
1523
1601
For n = 41, we have : 412 − 41 + 41 = 412 which is not a prime number. The
property is false.
Conclusion : The truth of a proposition for the first set of values does not
make a general rule !
PAUL MILAN
5
TERMINALE S
TABLE DES MATIÈRES
2 Limit of a sequence
2.1 Finite limit
Definition 2 : The sequence (un ) is said to have a limit ℓ if, and only if, all
open intervals containing ℓ contain all the terms of the sequence from a certain
index onwards.
The limit is denoted : lim un = ℓ and the sequence (un ) is said to converge to ℓ
n→+∞
Note : If the limit exists, it is unique (This is easily proven by contradiction).
This definition conveys the idea of the accumulation of terms un around ℓ
b
b
b
1.0
]
b
b
b
b b b b b b b
|
ℓ
b
b
b
b
1.5
[
b
2.0
Consequently The sequences defined for all natural numbers n 6= 0 by :
un =
1
,
n
vn =
1
,
n2
wn =
1
,
n3
1
tn = √ ,
n
have a limit of 0
Algorithm : Determine the integer N from which un is in an interval containing
ℓ.
Consider (un ) defined by :
(
u0 = 0, 1
Variables: N : integer U : real
number
Inputs and initialization
0, 1 → U
0→N
Processing
while |U − 0, 5| > 10−3 do
2U (1 − U ) → U
N+1 → N
end
Output : Print N, |U − 0, 5|
un+1 = 2un (1 − un )
This sequence converges to ℓ = 0, 5. We want to
find the integer N from which the terms of the
sequence are in the open interval centered at 0,5
and with a radius of 10−3 .
The following program will display N, with a
"while" loop. We then obtain :
N = 5 and |u5 − 0, 5| = 3, 96 10−4
2.2 Infinite limit
Definition 3 : The sequence (un ) is said to have a limit +∞ (resp. −∞) if, and
only if, every interval ] A; +∞[ (resp. ] − ∞; B[) contains all terms of the sequence
from a certain index.
The limit is denoted : lim un = +∞
resp.
n→+∞
lim un = −∞
n→+∞
The sequence is said to diverge to +∞ (resp. −∞)
Note : This definition conveys the idea that the terms of the sequence will
always exceed the number A, no matter how large.
PAUL MILAN
6
TERMINALE S
2. LIMIT OF A SEQUENCE
A sequence can have no limit. For example : un = (−2)n . It is said that the sequence diverges.
Consequently The sequences defined for all natural numbers by :
√
un = n, vn = n2 , wn = n3 , tn = n, have a limit of +∞
Algorithm : Determine the number N from which un is greater than a given
number A (increasing sequence).
Consider the sequence (un ) defined by :

 u0 = −2
 u n +1 = 4 u n + 1
3
We can show that this sequence is increasing
and diverges to +∞. We want find the integer
N from which un is greater than 103
Variables: N : integer
U : real number
Inputs and initialization
−2 → U
0→N
Processing
while U 6 103 do
4
U+1 → U
3
N+1 → N
end
Output : Print N, U
The following program allows you to find N,
by means of a "while loop".
We find that :
N = 25 and U = 1325, 83
2.3 Limit by comparison and on an interval
Theorem 2 :
Let (un ), (vn ) and (wn ) be three sequences. If, from a certain
index :
1) "Squeeze" theorem
vn 6 un 6 wn and if
lim vn = ℓ and
n→+∞
lim wn = ℓ
n→+∞
then
lim un = ℓ
n→+∞
2) Comparison theorem
• un > vn and if
• un 6 wn and if
OPK
lim vn = +∞
then
n→+∞
lim wn = −∞
n→+∞
then
lim un = +∞
n→+∞
lim un = −∞
n→+∞
Proof : Only the proof of the comparison theorem is on the syllabus.
We know that :
lim vn = +∞, so for any real number A, there is an integer N
n→+∞
such that if n > N then vn ∈] A; +∞[
As un > vn from the index p so if n > max( N, p) then un ∈ ] A; +∞[
Hence we have :
Examples :
lim un = +∞
n→+∞
sin n
converges.
n+1
1
sin n
1
−
6
6
n+1
n+1
n+1
• Prove that the sequence (un ) defined by : un =
∀n ∈ N,
however
PAUL MILAN
lim −
n→+∞
1
1
= lim
=0
n→+∞ n + 1
n+1
7
TERMINALE S
TABLE DES MATIÈRES
So, according to the squeeze theorem :
lim un = 0
n→+∞
• Show that the sequence (vn ) defined by : vn = n + sin n diverges to +∞
∀n ∈ N n + sin n > n − 1
however
lim n − 1 = +∞
n→+∞
so according to the comparison theorem : lim vn = +∞
n→+∞
2.4 Operations on limits
You are not required to prove the following theorems. It is fairly intuitive that
the limit of the sum is the sum of the limits, and likewise that the limit of the
product (or quotient) is the product (or quotient) of the limits. Only 4 cases have
indeterminate forms. When faced with an indeterminate form, the best approach
is to try to change the form of the sequence, or use the comparison or squeeze
theorems or the theorem on monotonic sequences (see further on) in order to
reach a conclusion.
2.4.1
Limit of a sum
If (un ) has a limit
ℓ
ℓ
ℓ
+∞
+∞
If (vn ) has a limit
ℓ′
−∞
+∞
+∞
then (un + vn ) has a limit
ℓ + ℓ′
−∞
−∞
−∞
+∞
−∞
+∞
−∞
I.F.
Note : I.F. = Indeterminate form
Examples : Determine the limits of the following sequences :
• ∀n ∈
N∗ ,
2
un = 3n + 1 +
n
• ∀n ∈
N∗ ,
n
1
1
vn =
+5−
3
n

lim 3n + 1 = +∞
 The sum is
n→+∞
2
lim un = +∞

 n→+
=0
lim
∞
n→+∞ n

n
1

lim
= 0
 The sum is
n→+∞ 3
lim vn = 5
 n→+
1
∞

lim 5 − = 5 
n→+∞
n

 I.F.
n→+∞
Another method
lim −n + 2 = −∞
n→+∞
must be used
• ∀n ∈ N, wn = n2 − n + 2
2.4.2
lim n2 = +∞
Limit of a product
If (un ) has a limit
ℓ
If (vn ) has a limit
ℓ′
then (un × vn ) has a limit
ℓ × ℓ′
ℓ 6= 0
0
∞
∞
∞
∞
∞*
I.F.
∞*
*Follow the usual rules on multiplying unlike or like signs
PAUL MILAN
8
TERMINALE S
2. LIMIT OF A SEQUENCE
Examples : Determine the limits of the following sequences :
lim n2 = +∞
a) ∀n ∈ N ∗ , un = n2 − n + 2
2
1
= n2 1 − + 2
n n
n→+∞
1 2
lim 1 − + 2 = 1
n→+∞
n n


 The product is

 lim un = +∞
n→+∞

 The product is
n→+∞
lim vn = −∞
lim 2 − n = −∞ n→+
∞
lim 3n = +∞
∀n ∈ N, vn = (2 − n) × 3n
n→+∞

1
 I.F.
lim
=0 
n→+∞ n + 1
Expressed in
 this form
lim n2 + 3 = +∞
n→+∞
1
∀n ∈ N, wn =
× ( n2 + 3)
n+1
2.4.3
Limit of a quotient
If (un ) has a limit
ℓ
If (vn ) has a limit
un
then
has a limit
vn
ℓ′ 6= 0
ℓ 6= 0
0
ℓ
∞
∞
(1)
0
∞
ℓ′
∞
I.F.
0
∞*
I.F.
0
ℓ
ℓ′
∞*
*Follow the usual rules on dividing like or unlike signs
(1) 0 without changing sign
Examples : Determine the limits of the following sequences :

 The quotient is
n→+∞
lim un = 0
lim 2n2 + 3 = +∞ n→+
∞
5
a) ∀n ∈ N, un = 2
2n + 1
lim 5 = 5
n→+∞

lim 1 − n = −∞ The quotient is
n→+∞
lim 0, 5n = 0+  lim vn = −∞
1−n
b) ∀n ∈ N, vn =
0, 5n
n→+∞

3

lim n + = +∞
 The quotient is
n→+∞
n
lim wn = +∞
1
 n→+
∞

lim 1 + = 1 
n→+∞
n
3
n+
2+3
n
n
c) ∀n ∈ N ∗ , wn =
=
1
n+1
1+
n
Factoring out n
PAUL MILAN
n→+∞
9
TERMINALE S
TABLE DES MATIÈRES
2.5 Limit of a geometric sequence
Theorem 3 : Let q be a real number. Consider the following sequences :
• If q > 1
then
• If q = 1
then
lim qn = +∞
n→+∞
lim qn = 1
n→+∞
• If −1 < q < 1 then
• If q 6 −1
OPK
then
lim qn = 0
n→+∞
lim qn
n→+∞
does not exist
Proof : Only the proof of the first limit is on the syllabus.
Bernoulli’s inequality is proven by mathematical induction. Therefore for all a > 0
(1 + a)n > 1 + na
∀n ∈ N,
Let q = 1 + a so if a > 0 then q > 1. The inequality becomes :
qn > 1 + na
Seeing as a > 0 we have :
lim 1 + na = +∞
n→+∞
lim qn = +∞
According to the comparison theorem :
n→+∞
1
, with 0 < |q| < 1 therefore Q > 1 .
|q|
By taking the limit on each side of the equality we can conclude with the quotient
of the limits.
(
u0 = 2
Example : Consider the sequence (un ) defined by :
un+1 = 2un + 5
Note : To prove the third limit, let Q =
Let us define the sequence (vn ) such that vn = un + 5
1) Show that the sequence (vn ) is geometric
2) Express vn then un in terms of n
3) Deduce the limit of (un )
✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏
1) We have to show that ∀ x ∈ N
vn+1 = qvn
vn+1 = un+1 + 5 = (2un + 5) + 5 = 2(un + 5) = 2vn
Therefore (vn ) is a geometric sequence with a common ratio of q = 2 and a
1st term of v0 = u0 + 5 = 7
2) It can therefore be deduced that : vn = v0 qn = 7 × 2n
7 × 2n − 5
3) According to the aforementioned theorem , 2 > 1, so
so un = vn − 5 =
lim 2n = +∞
n→+∞
Using the sum and product of limits, we can conclude that :
PAUL MILAN
10
lim un = +∞
n→+∞
TERMINALE S
2. LIMIT OF A SEQUENCE
2.6 Convergence of a monotonic sequence
2.6.1
Upper-bounded, lower-bounded and bounded sequences
Definition 4 : The sequence (un ) is said to be bounded above if, and only if,
there is a real number M such that :
∀n ∈ N un 6 M
The sequence (un ) is said to be bounded below if, and only if, there is a real
number m such that :
∀n ∈ N un > m
The sequence (un ) is said to be is bounded if it has an upper bound and a lower
bound.
Example : Show that the sequence (un ) defined on N ∗ by :
1
1
1
+
+···+
un =
n+1 n+2
2n
1
is bounded on the interval
;1
2
n terms
z
}|
{
1
1
1
1
1
1
+
+···+
6 + +···+
n+1 n+2
2n
n n
n
1
1
1
1
+
+···+
6 n×
n+1 n+2
2n
n
1
1
1
+
+···+
61
n+1 n+2
2n
n terms
z
}|
{
1
1
1
1
1
1
+
+···+
>
+
+···+
n+1 n+2
2n
2n 2n
2n
1
1
1
1
+
+···+
> n×
n+1 n+2
2n
2n
1
1
1
1
+
+···+
>
n+1 n+2
2n
2
So therefore :
2.6.2
1
6 un 6 1
2
Convergence theorems
Theorem 4 : Divergence
• If a sequence (un ) is increasing and not bounded above then the sequence
(un ) diverges to +∞.
• If a sequence (un ) is decreasing and not bounded below then the sequence
(un ) diverges to −∞.
PAUL MILAN
11
TERMINALE S
TABLE DES MATIÈRES
OPK
Proof : Let (un ) be an increasing sequence with no upper bound.
(un ) is not bounded above, so for all intervals ] A; +∞[,
∃ N ∈ N such that : u N ∈] A; +∞[
Seeing as (un ) is increasing : ∀n > N
Hence : ∀n > N
and therefore
so
un > u N
un ∈] A; +∞[
So from a certain index, all the terms of the sequence are in the interval ] A; +∞[.
The sequence (un ) diverges to +∞.
Example : : Consider (un ) defined by : u0 = 1 and
un+1 = un + 2n + 3.
It can easily be shown that the sequence (un ) is increasing and by induction that
un > n2 (see exercise). So this sequence diverges to +∞
B The converse of this theorem is false, if a sequence diverges to +∞,it is not
necessarily increasing. To prove this, let us consider two sequences that diverge
to +∞ and that are not monotonic :
(
vn = n if n is even
un = n + (−1)n
and
vn = 2n if n is odd
Theorem 5 : Convergence
• If a sequence (un ) is increasing and bounded above then the sequence (un )
converges.
• If a sequence (un ) is decreasing and bounded below then the sequence (un )
converges.
Note : The proof of this theorem is not on the syllabus.
B This theorem allows us to show that a sequence converges to a limit but does
not give the value of this limit.
We can only say that if (un ) is increasing and bounded above by M then ℓ 6 M
and if (un ) is decreasing and bounded below by m then ℓ > m
Example : Consider (un ) defined by :
(
u0 = 0
u n +1 =
p
3un + 4
1) Show that the sequence (un ) is increasing and bounded above by 4.
2) Deduce that the sequence (un ) converges. By using an algorithm we can conjecture that (un ) converges to 4 and determine the integer N from which un >
3, 99.
✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏✏
PAUL MILAN
12
TERMINALE S
2. LIMIT OF A SEQUENCE
1) Show by mathematical induction that the sequence (un ) is increasing and
bounded above by 4, i.e. :
∀n ∈ N, 0 6 un 6 un+1 6 4
Basis step : u0 = 0 and u1 =
√
4 = 2, we therefore find that : 0 6 u0 6 u1 6 4
The basis step is established.
Induction step : : Supposing that 0 6 un 6 un+1 6 4, show that
0 6 un+1 6 un+2 6 4.
0 6 u n 6 u n +1 6 4
0 6 3un 6 3un+1 6 12
4 6 3un + 4 6 3un+1 + 4 6 16
As the square root function is increasing on R +
p
p
2 6 3un + 4 6 3un+1 + 4 6 4
0 6 2 6 u n +1 6 u n +2 6 4
The induction step is established.
By reason of the basis and induction steps, the sequence (un ) is increasing and
bounded above by 4.
2) (un ) is increasing and bounded above by 4, according to the theorem of monotonic sequences, (un ) is convergent.
The algorithm shown opposite relates to the
exercise in paragraph 2.1.
We want to find the index N from which
un > 3, 99, then |un − 4| < 10−2
We find that : N = 7 and |u7 − 4| ≃ 0, 007 thus
u7 ≃ 3, 993
Variables: N : integer U : real
number
Inputs and initialization
0→U
0→N
Processing
while |U − 4| > 10−2 do
√
3U + 4 → U
N+1 → N
end
Output : Print N, |U − 4|
2.7 The method of Heron of Alexandria (1st century)
This is a method of calculating an approximation of a square root.
√
It depends on having a first approximate value of A written a.
Si
So : a <
√
a<
A<
√
A
⇒
1
1
>√
a
A
A
A
>√
a
A
⇒
√
A
> A
a
A
a
Similarly, we can show that if a >
PAUL MILAN
⇒
√
A then
13
√
A
< A<a
a
TERMINALE S
TABLE DES MATIÈRES
Algorithm : Knowing the value of a, we can determine an bounded interval
√
containing A. The interval is then reduced by taking the average m of the values
A
a and . We then have :
a
1
A
m=
a+
2
a
The value of a is then replaced by the value of m and the process is repeated.

 u0 = a
Let us construct a sequence (un ) defined on N by :
1
A
 u n +1 =
un +
2
un
The sequence converges very quickly : after each iteration, the number of correct
decimals is doubled !
However, in the first century, nobody had ever heard of the decimal system or
even the number zero. Calculating these fractions was certainly complicated !
The process can be simplified with the following program :
The first term is determined by searching for
the nearest square A with a "while loop", that
value is assigned to U, it takes N iterations to
find u N .
√
The approximate value of 431 with 2 iterations is :
A = 431,
N=2
We then find :
1 380 161
≃ 20,760 544
66 480
√
The absolute error is : |U − 431| ≃ 5 10−6
U=
PAUL MILAN
14
Variables: A, N, I integers
U : real number
Inputs and initialization
Input A, N
0→I
while A > I 2 do
I+1 → I
end
I−1 → U
Processing
for I from 1 to N do
A
1
U+
→U
2
U
end
√
Output : Print U, |U − A|
TERMINALE S