0

I need to find fixed points of iterative map x[n] == 1/2 x[n-1]^2 - Mu.
My approach:

Subscript[g, n_ ][Mu_, x_] :=  Nest[0.5 * x^2 - Mu, x, n]

fixedPoints[n_] := Solve[Subscript[g, n][Mu, x] == x, x]

Plot[
  Evaluate[{x, 
   Table[Subscript[g, 1][Mu, x], {Mu, 0.5, 4, 0.5}]}
  ], {x, 0, 0.5}, Frame -> True]
2
  • 1
    I don't have time to write up an answer right now - but have a look at this old physicsforums thread. Commented Apr 5, 2011 at 3:35
  • 4
    please learn to use Markdown, the input language used to format questions and answers here. Also, when giving a code example, try to remove any unnecessary pieces, like the FrameLabels in this case, as it tends to hide what you're asking for. Lastly, what exactly are you looking for here? Does your code work, or not? Is it to slow? What else have you tried? Please be specific. Commented Apr 5, 2011 at 3:36

3 Answers 3

4

I'll change notation slightly (mostly so I myself can understand it). You might want something like this.

y[n_, mu_, x_] := Nest[#^2/2 - mu &, x, n]
fixedPoints[n_] := Solve[y[n, mu, x] == x, x]

The salient feature is that the "function" being nested now really is a function, in correct format.

Example:

fixedPoints[2]

Out[18]= {{x -> -1 - Sqrt[-3 + 2*mu]}, 
          {x -> -1 + Sqrt[-3 + 2*mu]}, 
          {x ->  1 - Sqrt[ 1 + 2*mu]}, 
          {x ->  1 + Sqrt[ 1 + 2*mu]}}

Daniel Lichtblau

Sign up to request clarification or add additional context in comments.

1 Comment

@Mr. Nahh. I'm just short sighted. I can't read code in the default SO text font.
3

First of all, there is an error in your approach. Nest takes a pure function. Also I would use exact input, i.e. 1/2 instead of 0.5 since Solve is a symbolic rather than numeric solver.

Subscript[g, n_Integer][Mu_, x_] := Nest[Function[z, 1/2 z^2 - Mu], x, n]

Then

In[17]:= fixedPoints[1]

Out[17]= {{x -> 1 - Sqrt[1 + 2 Mu]}, {x -> 1 + Sqrt[1 + 2 Mu]}}

Comments

0

A side note:

Look what happens when you start very near to a fixed point (weird :) :

f[z_, Mu_, n_] := Abs[N@Nest[1/2 #^2 - Mu &, z, n] - z]

g[mu_] := f[1 + Sqrt[1 + 2*mu] - mu 10^-8, mu, 10^4]

Plot[g[mu], {mu, 0, 3}, PlotRange -> {0, 7}]  

enter image description here

Edit

In fact, it seems you have an autosimilar structure there:

enter image description here

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.