# How to find the limit of this recursive sequence

I want to find the limit of the following recursive sequence when n tends to ∞:

a = 2;
a[n_] := a[n] = 1/2 (a[n - 1] + 1/a[n - 1])
Limit[a[n], n -> Infinity]


I don't want to use RSolve[{a[n + 1] == 1/2 (a[n] + 1/a[n]), a == 2}, a[n], n] to find its expression and then find the limit, because some nonlinear recursive formulas can't find the general term expression. I want to use a more general method to find the limit of this recursive sequence.

AsymptoticRSolveValue[{{a[n] == (a[n - 1] + 1/a[n - 1])/2},
a == 2}, a[n], n -> Infinity]


Convergence occurs when a[n] is equal to a[n-1]. Call the unknown convergent value x, then you are looking for the value x such that x == 1/2 (x + 1/x). This can be found easily:

Solve[x == 1/2 (x + 1/x), x]
{{x -> -1}, {x -> 1}}


So there are two possible convergent values for your sequence. With a=2, the values will all be positive so you can choose the x->1.

Using RSolve

Clear[a, n]


The general solution is

sol = RSolve[{a == 2, a[n] == 1/2 (a[n - 1] + 1/a[n - 1])}, a[n], n][] //
Quiet

(* {a[n] -> Coth[2^(-1 + n) ArcCoth]} *)


The limit is then

Limit[a[n] /. sol, n -> Infinity]

(* 1 *)


EDIT: Generalizing the problem

Clear[a, n, sol]

sol[x_] = RSolve[{a == 2, a[n] == 1/2 (a[n - 1] + x/a[n - 1])}, a[n],
n][] // Quiet

(* {a[n] -> Sqrt[x] Coth[2^(-1 + n) ArcCoth[2/Sqrt[x]]]} *)

lim[x_] = Limit[a[n] /. sol[x], n -> Infinity]

(* ConditionalExpression[Sqrt[x],
Sqrt[x] ∈ Reals && ArcCoth[2/Sqrt[x]] > 0] *)


For the original problem

lim

(* 1 *)