Computation of Square and Cube Roots of p-Adic Numbers via Newton-Raphson Method

The problem of finding square roots of p-adic integers in Zp, p 2, has been a classic application of Hensel’s lemma. A recent development on this problem is the application and analysis of convergence of numerical methods in approximating p-adic numbers. For a p-adic number a, Zerzaihi, Kecies, and Knapp (2010) introduced a fixedpoint method to find the square root of a in Qp. Zerzaihi and Kecies (2011) later extended this problem to finding the cube root of a using the secant method. In this paper, we compute for the square roots and cube roots of p-adic numbers in Qp, using the Newton-Raphson method. We present findings that confirm recent results on the square roots of p-adic numbers, and highlight the advantages of this method over the fixed point and secant methods. We also establish sufficient conditions for the convergence of this method, and determine the speed of its convergence. Finally, we detemine how many iterations are needed to obtain a specified number of correct digits in the approximate.


Introduction
Let p be a prime, Q p and Z p be the fields of p-adic numbers and p-adic integers respectively.The introduction of the p-adic norm in the field Q paves the way to the construction of Q p as the completion of Q so radically different from R. Hensel's lemma has had a significant impact in the study of these fields by providing sufficient conditions for the existence of roots in Z p of polynomials in Z p [x].A survey of some characterizations of mth roots of unity in Q p for any positive integer m appears in Koblitz (1984).A classic application of Hensel's lemma deals with the problem of finding the square roots of a p-adic number a in Q p , where p 2. A recent development on this problem is the application and analysis of convergence of numerical methods in approximating p-adic numbers.In fact, this recent development led to several related problems.Knapp and Xenophontos (2010) applied several rootfinding methods for computing the multiplicative inverses of integers modulo p n , n ∈ N. A similar problem was addressed by Dumas (2012) by using the Newton-Raphson iteration over Q p to compute for multiplicative inverses of p-adic numbers modulo p n .Zerzaihi, Kecies, and Knapp (2010) used a fixed point iteration to approximate the solutions of Zerzaihi and Kecies (2011) then extended the root finding problem to the cube roots in Q p of p-adic numbers by approximating the zeroes of g(x) = x 3 − a, a ∈ Q p , using the secant method.
In this paper, we compute for the square root and cube root of a p-adic number a in Q p , where p > 2 and p > 3 respectively, using the Newton-Raphson method.Given a root of order r, we determine the order of the approximate root after n iterations.The paper confirms earlier results on the square roots of p-adic numbers, and highlights the advantages of the Newton-Raphson method over the fixed point and the secant methods.We give conditions on r to ensure convergence and we determine the speed of convergence.Finally, we detemine how many iterations are needed to obtain a specified number of correct digits in the approximate.

Preliminaries
We shall begin our discussion by introducing the basic properties of Q p .For a much detailed presentation of this field, see Katok (2001).

The Field Q p of p-Adic Numbers
We begin by introducing a valuation on Q.
Definition 1 Let p ∈ N be a prime number, 0 x ∈ Q.The p-adic valuation v p (x) of x is defined as With this valuation, we can define a map | • | p : Q → R + as follows: Definition 2 Let p be a prime number, and x ∈ Q.We define the p-adic norm | • | p of x as where {a n } is a Cauchy sequence of rational numbers representing a ∈ Q p .
The following theorem provides a way to write any element of Q p in a unique representation.
Theorem 4 Let a ∈ Q p .Then a has unique p-adic expansion where a i ∈ Z and 0 ≤ a i ≤ p − 1 for i ≥ n.
Note that this representation of p-adic numbers is exactly the base p expansion of integers.A short notation for a p-adic number a = a n p n + a n+1 p n+1 + ...
.. where we only write the coefficients in the expansion.
Definition 5 The set Z × p of p-adic units is given by Since every p-adic number has its unique representation described by Theorem 4, the p-adic units offer an alternative way of writing them in terms of their p-adic valuation.
The following result will be central to our discussion.

Functions over Q p
In this section, we introduce fundamental concepts on the analysis of functions defined over Q p .We start by defining continuous functions.
We shall show in the next example that, as in the real case, polynomial functions with coefficients in Q p are continuous in any subset of Q p .
Example 10 Let a ∈ Q p , and Therefore, P(x) is continuous at a.
We define next the derivative of p-adic functions.
Definition 11 Let X ⊆ Q p , a ∈ X be an accumulation point of X.A function f : X → Q p is differentiable at a if the derivative of f at a, defined by With this definition of derivative, if P(x) = n i=0 a i x i where a i ∈ Q p , then P (x) = n i=1 ia i x i−1 .It may also be verified that polynomials in Q p have continuous derivatives.

p-Adic Roots
We shall now narrow our discussion of p-adic functions on p-adic polynomials.In particular, we are concerned with finding the solutions of these polynomials in Q p .The next lemma has been the basis for many existing results on p-adic roots.
Theorem 12 (Hensel's Lemma) If for some a 0 ∈ Z p we have F(a 0 ) ≡ 0(mod p) and F(a 0 ) 0(mod p).Then, there exists a unique a ∈ Z p such that F(a) = 0 and a ≡ a 0 (mod p).
Hensel's lemma paves the way for the study of roots of p-adic numbers.The following result provides the condition for the existence of roots in Z p .
Theorem 13 (Katok, 2007) A polynomial with integer coefficients has a root in Z p if and only if it has an integer root modulo p k for any k ≥ 1.
A natural consequence of the previous result are the following propositions with their corresponding corollaries.Corollary 17 (Zerzaihi and Kecies, 2011) Let p be a prime, then 1) If p 3, then a has a cube root in Q p if and only if v p (a) = 3m, m ∈ Z and u = v q for some v ∈ Z × p .2) If p = 3, then a has a cube root in Q 3 if and only if v p (a) = 3m, m ∈ Z and u ≡ 1(mod 9) or u ≡ 2(mod 3).
Note that Corollary 15 and Corollary 17 provide the condition for the existence of square roots and cube roots in Q p .

The Newton-Raphson Method
One common method of approximating roots of functions is the Newton-Raphson method.This method requires that functions, whose roots are to be approximated, be differentiable.For a function, say f (x) and its derivative f (x), the method makes use of the iterative function from which the recurrence relation will be obtained.The method is employed by first having an initial guess x 0 and then, using the formula x n+1 = g(x n ), obtain a recurrence relation which will be used for approximation.If the initial guess x 0 and the iterative function are suitably chosen, the sequence {x n } should converge to a root of f .The rate of convergence of the method gives the rate at which the number of correct digits in the approximation increases.For instance, if the rate of convergence is of order two (quadratic convergence), then the number of correct digits in the approximate doubles after each iteration.In Knapp and Xenophontos (2010), the authors used this method to find multiplicative inverses of p-adic units modulo p n .

Example 18
We have seen that p-adic polynomials have continuous derivatives.Hence, for a ∈ Q p , the function f (x) = x 2 − a satisfies the conditions of the Newton-Raphson method with recurrence relation

Results
The existence of the square and cube roots of p-adic numbers justifies our effort to approximate them.

The Square Roots of p-Adic Numbers
By Corollary 15, we limit our discussion to a ∈ Q p such that Proposition 19 Let {x n } be the sequence of p-adic numbers obtained from the Newton-Raphson iteration.If x 0 is a square root of a of order r, |x 0 | p = p −m , r > 2m, and p > 2, then Proof.We first prove (i) and (ii) by induction.Let n = 1, then by our assumption, we have where 0 < b < p.Using Equation ( 14), we have Also by Equation ( 14), we have Note also that Since x 0 is a square root of a of order r, we have and therefore By Lemma (8), x 2 1 − a ≡ 0( mod p 2r−2m ).( 23) Now, assume that our conclusions hold for n − 1.That is, Note that the equivalence in (25) implies that where 0 < b < p.Using Equation ( 14), we have Also, we have that Note now that by Equation ( 24) Hence we have By Lemma (8), we have x 2 n − a ≡ 0( mod p 2 n r−2m(2 n −1) ).
We now turn to the convergence of the method.
Proposition 20 Let {x n } be the sequence of approximates converging to the square root of a obtained from the Newton-Raphson method.If p > 2 (a) The speed of convergence of the sequence {x n } is of order λ n − m = 2 n r − m(2 n+1 − 1); (b) The number of iterations to obtain at least M correct digits is Proof.For the speed of convergence, we investigate two consecutive approximates x n+1 and x n .Note that Then, Hence, Note that if the order of the root x i is K (that is, x 2 i −a ≡ 0(mod p K )), the number of correct digits in the approximate is K − m since | √ a| p = p −m .Hence, to find the number of iterations n such that we have M correct digits in the approximate, we must set the order to M + m.That is, This n is a sufficient number of iterations to provide at least M correct digits in the approximate.
These results confirm the results of Zerzaihi, Kecies, and Knapp (2010) for the case when the square root of a is of multiplicity two.

The Cube Roots of p-Adic Numbers
We follow the method we used for the approximation of the square roots of p-adic numbers.We shall limit our discussion to a ∈ Q p such that |a| p = p −3m , m ∈ Z.

2
n r − 2m(2 n − 1) = M + m 2 n (r − 2m) = M − m 2 n = M − m r − 2m(38)Since {x n } converges to the square root of a, by Proposition 21, r − 2m > 0. Hence we take f (x) = x 3 − a. Employing the Newton-Raphson method, we obtain the new recurrence relation Proposition 21 Let {x n } be the sequence of p-adic numbers obtained from the Newton-Raphson iteration.If x 0 is a cube root of a of order r, |x 0 | p = p −m , r > 3m, and p > 3, then

)
With this definition of | • | p on Q, the p-adic norm takes only integral powers of p and zero, that is the range of this mapping is the set {p n |n ∈ Z} ∪ {0}.It may be verified that the p-adic norm | • | p satisfies the following properties 1) |xy| p = |x| p |y| p ; 2) |x + y| p ≤ max{|x| p , |y| p } where equality holds if |x| p |y| p ; An interesting consequence of the application of the p-adic norm to Q is the new formulation of distance in the metric space (Q, | • | p ).Note that for a, b ∈ Q, a and b are "close" if |a − b| p is close to zero.Hence, in the metric space (Q, | • | 3 ), 12 is actually closer to three than two is!We are now in the position to define formally the field Q p of p-adic numbers.
Definition 3 The field of p-adic numbers Q p is the completion of Q with respect to the p-adic norm | • | p .The elements of Q p are equivalence classes of Cauchy sequences in Q with respect to the extension of the p-adic norm defined as |a| p = lim n→∞ |a n | p (3) (Zerzaihi and Kecies, 2011prime.An element x ∈ Q p is a square if and only if it can be written x = p 2m y 2 with m ∈ Z and y ∈ Z × p a p-adic unit.Proposition 16(Zerzaihi and Kecies, 2011) A rational integer a not divisible by p has a cubical root in Z p (p 3) if and only if a is a cubic residue modulo p.
Proposition 14 A rational integer a not divisible by p has a square root in Z p , (p 2) if and only if a is a quadratic residue modulo p.