Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Single Problem
Replies: 2   Last Post: Nov 26, 1996 3:42 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Harald Berndt

Posts: 22
Registered: 12/7/04
Re: Single Problem
Posted: Nov 26, 1996 3:30 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

In article <5764ab$28t@dragonfly.wolfram.com>, Redirley Matheus Santos
<yelride@ibm.net> wrote:

> Hi everybody,
>
> Who would like solve this problem ?
>
> X is a Integer number
> X = Sqr(6+(Sqr(6+(Sqr(6+Sqr(6+Sqr(...))))))) infinite Sqr of 6 inside
> X = ?


Do you really mean Sqr?

If I read your problem correctly, you want something like

In[17]:=
NestList[(6+#)^2&, x, 3]

Out[17]=
2 2 2 2 2 2
{x, (6 + x) , (6 + (6 + x) ) , (6 + (6 + (6 + x) ) ) }

... and that grows to infinity really fast:

In[20]:=
NestList[(6+#)^2&, 1, 3]
Out[20]=
{1, 49, 3025, 9186961}
In[21]:=
NestList[(6+#)^2&, .1, 3]
Out[21]=
6
{0.1, 37.21, 1867.1, 3.50852 10 }
Out[22]=
-16 6
{1. 10 , 36., 1764., 3.1329 10 }
In[24]:=
$MachineEpsilon
Out[24]=
-19
1.0842 10
In[25]:=
NestList[(6+#)^2&, $MachineEpsilon, 3]
Out[25]=
-19 6
{1.0842 10 , 36., 1764., 3.1329 10 }


It's quite different for the square root, as one can demonstrate with

In[31]:=
ListPlot[
NestList[Sqrt[6+#]&, 1., 30],
PlotRange -> All
];

To find that level off "limit", apply

In[32]:=
FixedPoint[Sqrt[6+#]&, 1.]
Out[32]=
3.
In[33]:=
FixedPoint[Sqrt[6+#]&, $MachineEpsilon]
Out[33]=
3.

Best,

--
Harald Berndt, Ph.D. Research Specialist,
Voice: 510-652-5974 Consultant
FAX: 510-215-4299







Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.