Ex Equations likey2 =x3+ 7 are called “elliptic curves”. They arise in solving integrals for, say, the period of a body in a planetary orbit.
(Lebesgue, 1869) The equation y2 =x3+ 7 is insoluble over Z.
Proof. If x is even, x = 2α ⇒ RHS = 8α3 + 7 = 8β + 7, where β = α3. But 02 ≡0, 12 ≡ 1, 22 ≡4, 32 ≡ 1, 42 ≡ 0, 52 ≡1, 62 ≡ 4 and 72 ≡ 1 (mod 8) so y2 ≡ 7 (mod 8) has no solution. Hence x is odd. Write
y2+ 1 = x3+ 8
= (x+ 2)(x2−2x+ 4)
= (x+ 2)((x−1)2+ 3)
If x= 2n+ 1 (odd) then (x−1)2+ 3 = 4n2 + 3 = 4m+ 3, m =n2 so (see back) must have a prime factor of the form p = 4` + 3. But then y2 + 1 ≡ qp ≡ 0 (mod p) But (lemma later) p≡3 (mod 4) ⇒ y2 ≡ −1 (mod p) has no solution.
We frequently need to know the answer to the following: When does x2 ≡ r (mod p) have a solution x? Or, more generally, x2 ≡ α (mod m). The answer is given by the theory of quadratic reciprocity due to Gauss. This will be developed later.
8 Pell’s Equation
x2−N y2 = 1 Trivial solution x= 1, y = 0, x, y>0.
N =−1 ⇒ (x, y) = (1, 0) or (0, 1) are trivial solutions only.
N 6−2 ⇒ (x, y) = (1, 0).
Let N > 0 and not a square: If N = M2, M ≥ 1, x2 −N y2 = x2 −(M y)2 = (x− M y)(x+M y) = 1 ⇒ x−M y = 1 and x+M y = 1 so we can get all solutions. Indeed (x, y) = (1, 0) for x, y >0. So we always assume N ≥2.
Note: Solutions to Pell’s equation provide goodrational approximations for square roots, since x2 =N y2+ 1
⇒
x
y 2
=N + 1 y2
⇒ xy ≈√
N if y is large.
Note: This type of equation has a long and interesting history, and has lots of applica- tions, especially to fieldsF =Q(√
N).
Ex (Euler, 1770) A triangular number has the form n(n+1)2 . Which numbers are both triangular and square?
m2 =n(n+ 1)/2
⇒ 8m2+ 1 = 4n2+ 4n+ 1 = (2n+ 1)2
⇒ x2−2y2 = 1 where x= 2n+ 1, y = 2m.
So solutions to this Pellian equation produce (all) square triangular numbers.
Definition Afundamental solutiontox2−dy2 = 1 is (r, s) where any other positive solution satisfies r < x and s < y.
Theorem 25 (Lagrange) Let (r, s) be the least positive (or fundamental) solution to x2−dy2 = 1, where d is not a square. Then every solution to this equation is given by (xn, yn) where
xn+
√
dyn= (r+s
√ d)n for n= 1,2,3, . . .
Proof.
x2n−dy2n = (xn+yn
√
d)(xn−yn
√ d)
= (r+s√
d)n(r−s√ d)n
= (r2−s2d)n = 1n= 1
Hence (xn, yn) is a solution.
Let (a, b) be a solution. Suppose ∀n = 1,2,3, . . . , (a, b) 6= (xn, yn). Then there is a positive integer m with
(r+s√
d)m < a+b√
d <(r+s√
d)m+1 (21)
But (r+s√
d)−m = (r−s√
d)m so (21)⇒ 1<(a+b√
d)(r−s√
d)m <(r+s√
d) (22)
Letu+v√
d= (a+b√
d)(r−s√ d)m so u2−v2d = (u+v√
d)(u−v√ d)
= (a+b√
d)(r−s√
d)m(a−b√
d)(r+s√ d)m
= (a2−b2d)(r2−s2d)m = 1·1m = 1 Thus (u, v) is a solution.
But 1< u+v√
d ⇒ 0< u−v√
d <1 so 2u= (u+v√
d) + (u−v√
d)>1 + 0>0 And 2v√
d= (u+v√
d)−(u−v√
d)>1−1 = 0 sou >0, v >0 and u+v√
d < r+s√ d by (22), contradiction the assumption that (r, s) is the fundamental solution. Hence (a, b) = (xn, yn) for somen.
Finding the least positive solution isnot easy however and requires the theory ofcontinued fractions of J. L. Lagrange. Frenicle’s table for non-square d up to 50 is given below.
Pell's equation
"f,,'
~l:lPuler, after a cursory reading of Wallis's Opera Mathematica, mistakenly
r~buted the first serious study of nontrivial solutions to equations of the '~J;f°!In x2
-
dy2 = 1, where x~
1 and y~
0, to Cromwell's mathematician~a,.John Fell. However, there is no evidence that Fell, who taught at the '~;~niversity of Amsterdam, had ever considered solving such equations.
~t[;rhey :would be more aptly called Fermat's equations, since Fermat first
~~(tlvestigated properties of nontrivial solutions of each equations. Neverthe- ,~\(tess, Pellian equations have a long history and can be traced back to the .;ff,.Greeks. Theon of Smyrna used x/y to approximate ~, where x and y
~'\gY(ere integral solutions to x2 - 2y2 = 1. In general, if x2 = dy2 + 1, then
;~~2/y =d+ 1/y2. Hence, for y large, x/y is a good approximation of
~'Yd, a fact well known to Archimedes.
JI(Archimedes's problema bovinum took two thousand years to solve.
itccording to a manuscript discovered in the Wolfenbiittel library in 1773 ,tRY Gotthold Ephraim Lessing, the German critic and dramatist, Archi-
~~edes became upset with Apollonius of Perga for criticizing one of his t~orks. He divised a cattle problem that would involve immense calculation j~?i solve and sent it off to Apollonius. In the accompanying correspon- r!~ence, A.rchimedes asked Apollonius to compute, if he thought he was
,ii' .
~ - -~
smart enough, the number of the oxen of the sun that grazed once upon the plains of the Sicilian isle Trinacria and that were divided according to color into four herds, one milk white, one black, one yellow and one dappled, with the following constraints:
white bull~ ~ yellow bulls + (~+ ~) black bulls,
(
1 1)
black bulls = yellow bulls + 4 + :5 dappled bulls,
i
(
1 1)
f\dappled bulls = yellow bulls + "6 + '7 white bulls,
white cows = (~+~) black herd,
black cows = (~+~) dappled herd,
dappled cows = (~+~) yellow herd, and yellow cows = (~+ ~) white herd.
Archimedes added, if you find this number, you are pretty good at numbers, but do not pat yourself on the back too quickly for there are two more conditions, namely:
white bulls plus black bulls is square and dappled bulls plus yellow bulls is triangular.
Archimedes concluded, if you solve the whole problem then you may 'go forth as conqueror and rest assured that thou art proved most skillful in the science of numbers'.
The smallest herd satisfying the first seven conditions in eight unknowns, after some simplifications, lead to the Pellian equation x2- 4729494 y2 = 1. The least positive solution, for which y has 41 digits, was discovered by Carl Amthov in 1880. His solution implies that the number of white bulls has over 2 X 105 digits. The problem becomes much more difficult when the eighth and ninth conditions are added and the first complete solution was given in 1965 by H.C. Williams, R.A. German, and C.R. Zarnke of the University of Waterloo.
In Arithmetica, Diophantus asks for rational solutions to equations of the type x2 - dy2 = 1. In the case where d = m2 + 1, Diophantus offered the integral solution x = 2m2 + 1 and y = 2m. Pellian equations are found in Hindu mathematics. In the fourth century, the Indian mathematican
--
9 Continued Fractions
Ex
1 + 1
2 + 3+11 4
= 1 + 1
2 + 13/41
= 1 + 1 2 + 134
= 1 + 1 30/13
= 1 +13 30
= 43 30
looks silly until we consider some interesting continued fraction expansions π : [3, 7,15, 1,292,1,1,1, . . .] i.e.
3 + 1
7 + 15+11 293+···
e: [2, 1, 2, 1, 1, 4, 1, 1, 6,1, 1, . . .]
√2 : [1, 2, 2, 2, 2, . . .]
√3 : [1, 1, 2, 1, 2,1, 2, 1,2, . . .]
√5 : [2, 4, 4, 4, . . .]
√n2 + 1 : [n, 2n, 2n, . . .] (Euler)
Definition By a simple continued fraction (or C.F.) we mean an expression
a0+ 1
a1+ a 1
2+···
= [a0, a1, a2, . . .]
where a0 ∈Z and ai ∈N for i>1.
Note: [a0] = a10, [a0, a1] = a0aa1+1
1 , [a0, a1, a2] = a2a1aa0+a2+a0
2a1+1
Generally, [a0, . . . , an] = pqn
n wherepnandqnare polynomials in theai, linear in any given aj, anda0 doesnot occur in the denominatorqn. (pn, qn) are called thenth convergents.
Note: [a0, . . . , an] = [a0, . . . , an−1+a1
n]
Proposition If [a0, . . . , am] = [b0, . . . , bn], ai, bi ∈ N, am, bn > 1 then m = n and ai =bi ∀i.
Proof. This follows by induction from
[a0, . . . , am] =a0+ 1
[a1, . . . , am] =b0+ 1 [b1, . . . , bn]
if we can show [a1, . . . , am]>1 when a1, . . . , am >1. But this is so since [a1, . . . , am] = a1+ a 1
2+···.
Let ai > 0 and ∀n let τn = [a0, . . . , an] then τn can be computed using the recursive formulas, for n≥2:
p0 =a0 p1 =a0a1+ 1 pn=anpn−1+pn−2
q0 = 1 q1 =a1 qn=anqn−1+qn−2
so τ0 = pq0
0, τ1 = pq1
1 and τn= pqn
n
Proof.
τn = [a0, . . . , an] = [a0, . . . , an−1+ 1 an
] = p0n−1 qn−10 where these belong to a0, . . . , an−2, an−1 +a1
n i.e. (induction) p0n−1
q0n−1 =
an−1 +a1
n
pn−2+pn−3
an−1 +a1
n
qn−2+qn−3
= an(an−1pn−2+pn−3) +pn−2 an(an−1qn−2+qn−3) +qn−2
= anpn−1+pn−2
anqn−1+qn−2
(induction again!) Hence pn=anpn−1+pn−2 and qn =anqn−1+qn−2
(pn, qn) are called the nth convergents of the C.F.
Let θ ∈ R\Z, θ > 1. a0 = bθc so θ = a0 + θ1
1, θ1 > 1 defines θ1. Continue with θ1 = a1+ θ1
2 so a1 =bθ1c, θ2 > 1 if θ1 6∈ Z etc θn = an+ θ1
n+1, an =bθnc, θn=1 >1 if θn 6∈Z. We get
θ =a0+ 1
a1+ a 1
2+ 1
...+ 1 an+ 1
θn+1
so θ= [a0, a1, . . . , an+ θ1
n+1]
Proposition The expansion stops if θn =an is in N and then θ∈Q+ i.e. is a positive rational number. Conversely, if θ∈Q+, the C.F. expansion is finite.
Proof. Let θ = uv ∈Q+, u, v∈N. Use division
u = a0v+r1 0< r1 < v v = a1r1+r2 0< r2 < r1 r1 = a2r2+r3 0< r3 < r2
...
rn−1 = anrn+ 0
as if we were doing the Euclidean algorithm. These equations give θ=θ0 = u
v =a0+ r1
v =a0 + 1
v/r1 =a0+ 1 θ1 θ1 = a1+ r2
r1 =a1+ 1
r1/r2 =a1+ 1 θ2 ...
θn = rn−1
rn ∈N so the C.F. expansion is finite.
Proposition ∀n>2
θ = θnpn−1+pn−2 θnqn−1+qn−2
Proof. The definition ofθn is θ= [a0, . . . , an−1, θn] so θ =τn= pqn
n = θθnpn−1+pn−2
nqn−1+qn−2 using an and θn for this particular C.F.
Ex √
2 = [1,2, 2, . . .]
(√
2−1)(√
2 + 1) = 2−1 = 1 ⇒√
2−1 = 1
1+√ 2 so√
2 = 1 + 1
1+√ 2. We now copy the expression for √
2 in the RHS into the √
2 on the RHS successively (photocopy model for recursion).
√
2 = 1 + 1
1 + 1 +1+1√2
= 1 + 1
2 + 1
1+√ 2
= 1 + 1
2 + 2+11 1+√
2
etc. leading to √
2 = [1, 2, 2, 2, 2, . . . , 2, 1 +√
2]. If we continue indefinitely we obtain
√2 = [1, 2,2, . . .] = [1, 2 ].
Every quadratic irrational has a periodic continued fraction—this characterises quadratic irrationals.
Ex √
2 = [1,2, . . . ,2,1 +√
2] so a0 = 1, a1 = 2, . . . p0 =a0 = 1
q0 = 1
τ0 = p0 q0 = 1
1 = 1
p1 =a0a1+ 1 = 3 q1 =a1 = 2
τ1 = p1 q1 = 3
2 = 1.5 p2 =a2p1+p0 = 7
q2 =a2q1+q0 = 5
τ2 = p2 q2 = 7
5 = 1.4 and the approximationτn ≈√
2 gets better.
Theorem 26 Let a0 ∈Z, ai ∈ N, i > 1. Then (τn) converges to an irrational number θ. The ai are uniquely determined by the C.F. expansion of θ. Conversely, if θ is an irrational number, and τn= [a0, . . . , an] are obtained by expanding θ as a C.F. then
θ= lim
n→∞τn.
Proof. The sequences (pn) and (qn) are both strictly monotonically increasing sequences of natural numbers.
Claim:
pnqn−1−pn−1qn = (−1)n−1 (23)
∀n > 1. If n = 1 this is p1q0−p0q1 = (a0a1+ 1)1−a0a1 = 1 = (−1)1−1 which is true.
Assume it is true for n =m. Then
pm+1qm−pmqm+1 = (am+1pm+pm−1)qm−pm(am+1qm+qm−1)
= pm−1qm−pmqm−1
= −(pmqm−1−pm−1qm)
= −(−1)m−1
= (−1)m Hence, by induction, the claim is true ∀n >1.
Divide (23) by qnqn−1 to obtain pn
qn − pn−1
qn−1
= (−1)n−1 qnqn−1
or
τn−τn−1 = (−1)n−1 qnqn−1
(24) Apply this toθ = [a0, . . . , an−1, θn] to get
θ−τn−1 = (−1)n−1
qn−1(θnqn−1+qn−2) (25)
But θi >0 and qi → ∞
∴ lim
n→∞τn =θ
since RHS of (25) → 0. The proof of uniqueness is similar to that given above when θ ∈Q+.
Aside Numbers of the form α+β√
d, d ∈ N, d 6= m2 are a field, F = Q(√
d), the
“extension” of Q by√ d:
1 α+β√
d = α−β√ d α2 −β2d =
α
α2−β2d
−
β
α2−β2d
√
d∈ {α1+β1√ d}
Diophantine Approximation
Equation (25) implies
θ− pn
qn
= 1
qn(θn+1qn+qn−1)
< 1
qnqn+1 (26)
The numbers q0, q1, . . . are strictly increasing in N. The continued fraction process pro- vides us with aninfinite sequence ofrational approximations to an irrational number,θ, namely the convergents pqn
n ∈Q. How rapidly do they approach θ?
By (26), if xy is a convergent,
θ− x y
< 1 y2
It is possible to prove that (Hurwitz, 1891] any irrational numberθhas an infinite number of rational approximations which satisfy
θ− x y
< 1
√5y2 (27)
This is the best possible: If we choose β > √
5 then there are numbers η ∈ R\Q for which there are only a finite number of rationals xy with
η− xy
< βy12. e.g. the golden ratio
g = 1 + 1 1 + 1
1+1+...1
= 1 + 1 g so g2−g−1 = 0 ⇒ g = 1+
√ 5 2 .
Inequalities of the form (27) will be very important later when we study rational, alge- braic, irrational and transcendental numbers such as 401403, 1+
√5
2 and e orπ.
Quadratic Irrationals
• solutions to quadratic equations with Z coefficients e.g. x2−2 = 0 ⇒ x=√ 2.
• simplest type of irrational e.g. (√
4 + 71/3)1/5 is ‘more’ irrational as isπ (see later)
Ex θ= 24−
√15
17 : 3<√
15<4 ⇒ bθc= 1 and θ= 1 + 1
θ1
θ1 = 1
θ−1 = 17 7−√
15 = 7 +√ 15 2 bθ1c = 5
⇒ θ1 = 5 + 1 θ2
θ2 = 1
θ1−5 = 2
√15−3 =
√15 + 3 3 bθ2c = 2
⇒ θ2 = 2 + 1 θ3
θ3 = 1
θ2−2 = 3
√15−3 =
√15 + 3 2 bθ3c = 3
⇒ θ3 = 3 + 1 θ4
θ4 = 1
θ3−3 = 2
√15−3 =
√15 + 3
3 so θ4 =θ2
⇒ 25−√ 15
17 = 1 + 1
5 + 2+ 11 3+ 1
2+ 13
Ex
√
2 = [1, 2 ]
√
3 = [1, 1,2 ]
√
5 = [2, 4 ]
√6 = [2, 2,4 ]
H. Davenport, The Higher Arithmetic
Ex √
50 = [ 7,14 ]
Purely periodic fractions
Ex
√
2 + 1 = 2 + 1 2 + 2+11
√ ···
6 + 2 = [ 4,2 ]
These numbers are easier to deal with than those with a ‘preperiod’.
Ex
α = 4 + 1
1 + 3+ 11 4+ 1
1+ 1 3+···
= [4,1,3, α]
using the recursive equations we get convergents 4
1,51,194,51, . . . . α= 19α+ 5
4α+ 1 ⇐ α= αpn−1+pn−2
αqn−1+qn−2
Hence 4α2−18α−5 = 0 and α is a quadratic irrational.
Now consider the number β which has the period of α reversed: β = [ 3,1,4 ] ⇒ β = 19β+ 4
5β+ 1
⇒ 5β2−18β−4 = 0
The equations are the same if −β1 =α ⇒ −1β is the second root of the equation for α called the (algebraic) conjugateof α orα.
In general letα= [a0, . . . , an, α] be purely periodic, then α = pnα+pn−1
qnα+qn−1
Letβ = [an, . . . , a0] = [an, . . . , a0, β] then (Ex) β = pnβ+qn
pn−1β+qn−1
As before −β1 is the conjugate of the root α.
Note: If β >1 then−1<−β1 <0.
Theorem 27 Any purely periodic continued fraction represents a quadratic irrational number α > 1 with a conjugate α satisfying −1 < α < 0. This conjugate is α = −β1 where β is defined by the C.F. of α with the period reversed.
Remark (Galois, 1828) This property characterises numbers with purely periodic con- tinued fractions.
Definition A quadratic irrational α is reduced if α >1 and−1< α <0.
Theorem 28 If α is reduced, its C.F. expansion is purely periodic.
Proof. There are integersa, b, c such that a α2 +b α+c= 0. Solving for α:
α= −b±√
b2−4ac
2a = P ±√
D Q
where P, Q∈Z, D ∈N, D 6=m2. Assume the sign is positive, else multiply by −1−1 so α= P +√
D Q so α, the other root, is
α= P −√ D
Q .
Note that
P2 −D
Q = b2−(b2−4ac)
2a = 2c ⇒ Q|P2−D But 1< αand −1< α <0 so
(i) α−α >0 ⇒
√D
Q >0 ⇒ Q >0 (ii) α+α >0 ⇒ PQ >0 ⇒ P >0 (iii) α <0 ⇒ P < √
D (iv) 1< α ⇒ Q < P +√
D <2√ D
⇒ P, Q∈N, P <√
D, Q <2√
D and Q|P2 −D. (28)
Now expand α as a C.F.
α = a0 = 1
α1, a0 =bαc, α1 >1
⇒ α = a0+ 1 α1
⇒ α1 = − 1
a0−α ⇒ −1< α1 <0
Hence α1 is reduced also. Similarly α2, α3, . . . are reduced.
Now
1 α1
=α−a0 = P +√ D
Q −a0 = P −Qa0+√ D Q
so let P1 =−P +Qa0 so
α1 = Q
−P1+√
D = P1+√ D
Q1 (29)
where Q1Q=D−P12 and Q1 ∈Z since Q|D−P2 and P1 ≡ −P (mod Q).
Then
α1 = P1+√ D Q1
and since α1 is reduced, P1 > 0, Q1 > 0 and get the conditions (28) above using (29).
We carry on with the C.F. process, using α1 instead of α, . . .. Each complete quotient
pn
qn has the form
αn= Pn+√ D Qn
wherePn, Qn satisfy (28)There are only afinite set of possibilities for the pairs (Pn, Qn) so eventually we come to a pair (Pm, Qm) = (Pn, Qn), m > n so αm = αn and so the C.F. isperiodic from this point on.
Claim: The C.F. is purely periodic.
Subclaim: αn−1 =αm−1. If this were so we would be able to work back to get, eventually, α0 =αm−nproving pure periodicity. Proof of the subclaim: αn=an+α1
n−1 ⇒ αn =an+
1
αn+1. Letβn =−α1
n then−1< αn<0 ⇒ 1< βnand−β1
n =an−βn+1orβn+1 =an+β1
n
so an = bαnc = bβn+1c. Now let n < m and αn = αm so αn = αm ⇒ βn = βm and an−1 =bβnc=bβmc=am−1. Butαn−1 =an−1+α1
n, αm−1 =am−1+α1
m ⇒ αn−1 =αm−1. Applying this again successively α=α0 =αm−n=αr say, and
α = [a0, a1, . . . , ar−1, αr]
= [a0, a1, . . . , ar−1, α]
= [a0, a1, . . . , ar−1] pure periodic with period length r.