I want to find limit of infinite nested radical
$\quad \quad \sqrt{1+\sqrt[2!]{2^2+\sqrt[3!]{3^3+...}}}$
but I don't know how to define this expression in Mathematica. How can I define it and find the limit:
$\quad \quad \lim_{n \to\infty} \sqrt{1+\sqrt[2!]{2^2+\sqrt[3!]{3^3+...+\sqrt[n!]{n^n}}}}$
Answer
Here is an approach using FixedPoint
, where I keep the output in exact form to see how many terms are needed to satisfy a given tolerance:
Clear[x];
step[{n_, f_}] := {n + 1, f /. x -> (n^n + x)^(1/n!)};
tolerance = $MachineEpsilon;
sum =
Last@FixedPoint[step, {2, Sqrt[1 + x]},
SameTest -> (tolerance > Abs[Last[#1] - Last[#2]] /.
x -> 0 &)] /. x -> 0
$$\sqrt{1+\sqrt{4+\sqrt[6]{27+\sqrt[24]{256+\sqrt[120]{31 25+\sqrt[720]{46656+\sqrt[720]{7}}}}}}}$$
N[sum, 16]
$1.843075984668544$
tolerance = 10^-40;
sum =
Last@FixedPoint[step, {2, Sqrt[1 + x]},
SameTest -> (tolerance > Abs[Last[#1] - Last[#2]] /.
x -> 0 &)] /. x -> 0
In FixedPoint
, the function step
handles both the index n
and the iterated root f
. The dummy variable x
is used to insert the next root.
Comments
Post a Comment