1

I am beginner with Mathematica and I am trying to find the limit of a recurrence series. This is my series: u[n+1] = 1/2*(u[n] + a / u[n]) with u[0] > 0 After a few experimentation I tried this :

u[x_] := 1/2*(u[n - 1] + 9/u[n - 1]); u[0] = 10;
lim = SequenceLimit[N[Table[u[n], {n, 1, 100}], 50]

But nothing's happen! I try to understand better this function I found on the internet, but I can't find in the actual Wolfram Documentation. The result should be: sqrt(a) (3 in the case where a = 9)

Every help and advice for a beginner like me will be helpful.

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
chtiprog
  • 11
  • 1

4 Answers4

2

Using RSolve for the case u0 > Sqrt[a] > 0

Assuming[{u0 > Sqrt[a] > 0},
 Limit[u[n] /. RSolve[
      {u[n] == 1/2*(u[n - 1] + a/u[n - 1]), u[0] == u0},
      u[n], n][[1]], n -> Infinity] // Quiet]

(*  Sqrt[a]  *)

For the specific case of of a=9 then the Limit is 3

Bob Hanlon
  • 157,611
  • 7
  • 77
  • 198
1
Use RSolve:
In[1]:= un=u[n]/.RSolve[{u[n]==1/2*(u[n-1]+9/u[n-1]),u[0]==10},u[n],n][[1]]
During evaluation of In[1]:= Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information.
Out[1]= 3 Coth[2^n ArcCoth[10/3]]
In[2]:= Limit[un,n->Infinity]
Out[2]= 3

The series can be solved symbolically, but for the limit we likely need a value for a:

In[3]:= un=u[n]/.RSolve[{u[n]==1/2*(u[n-1]+a/u[n-1]),u[0]==u0},u[n],n][[1]]
During evaluation of In[3]:= Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information.
Out[3]= Sqrt[a] Coth[2^n ArcCoth[u0/Sqrt[a]]]
David Keith
  • 4,340
  • 1
  • 12
  • 28
1

Any steady state solution (limiting value) to this problem will occur at a value ustar where ustar == 1/2*(ustar + a/ustar). This is easy to find:

Solve[ustar == 1/2*(ustar + a/ustar), ustar]
{{ustar -> -Sqrt[a]}, {ustar -> Sqrt[a]}}
bill s
  • 68,936
  • 4
  • 101
  • 191
1

For your particular example of a = 9 you could have written it like this:

s = RecurrenceTable[{u[n] == 1/2*(u[n - 1] + 9/u[n - 1]), u[0] == 10},u, {n, 0, 10}];

SequenceLimit[s]

(*3.000000000000000*)

Pretty suggestive!

bobbym
  • 2,628
  • 2
  • 15
  • 20
  • Thanks, it works. I would like to know more about this function and I don't find in the actual documentation... – chtiprog Apr 11 '17 at 14:02
  • First try ?SequenceLimit and then look here http://compgroups.net/comp.soft-sys.math.mathematica/limit-of-list/904787 – bobbym Apr 11 '17 at 19:37