MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: FixedPoint[Cos, 1.0]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg119558] Re: FixedPoint[Cos, 1.0]
  • From: Dana DeLouis <dana01 at me.com>
  • Date: Thu, 9 Jun 2011 05:46:22 -0400 (EDT)

> My numerical analysis students this past term

As a silly side note, the Newton version of the equation Cos[x]=x did a little better by getting to a number ending in 606.
We're looking for a number ending in 607.

Cos[.7390851332151607]
   0.7390851332151607`

Newton[Cos[x]-x, x]

(Cos[g]+g Sin[g])/(1+Sin[g])

fp[g_]=%;

FixedPointList[fp,1.0]
{
1.`,
0.7503638678402439`,
0.7391128909113617`,
0.7390851333852838`,
0.7390851332151607`,
0.7390851332151606`
}

= = = = = = = = = =
: >)
Dana DeLouis
$Version
8.0 for Mac OS X x86 (64-bit) (November 6, 2010)



On May 31, 7:49 am, J Siehler <jsieh... at gmail.com> wrote:
> My numerical analysis students this past term pointed out to me that
> the command
>
> FixedPoint[Cos, 1.0]
>
> which is the first example in the Information for FixedPoint doesn't
> ever finish running (or, not in any reasonable amount of time).  We
> tried this on serveral versions of Mathematica (6.x, 7.x, and 8.x),
> all on OS X, and got the same nonresult.
>
> It can be forced by specifying something like FixedPoint[Cos, 1.0,
> SameTest -> (Abs[#1 - #2] < 10^-10 &)] or FixedPoint[Cos, 1.0, 40],
> but it seems like that should be unnecessary, and the form given in
> the documentation should work.  Can anybody else confirm this
> behavior?  Am I missing something totally obvious here?




  • Prev by Date: Re: replace with closest value
  • Next by Date: Re: How show axes labels with AxesOrigin->{0,0,0} in 3D?
  • Previous by thread: Re: FixedPoint[Cos, 1.0]
  • Next by thread: Re: Evaluation control in Compile[]