Given a complex number $z$, consider the sequence

\begin{align*} a_0 & = 1\\ a_1 & = (cos(1))^z\\ a_n & = (cos(a_{n-1}))^z \end{align*}

This question is about trying to understand periodicity in such sequences. For real $z < 2$, the sequence converges to a fixed point. For larger real $z$, the sequence oscillates between two distinct limit points. This behavior can be explained by elementary dynamics, and one can find that the transition point is around $2.188$.

I was surprised to find that the behavior for general complex $z$ is, well, complex! Define a function $P$ from the complex plane to $\mathbb{N}$ as follows:

$$P(z) = \mathrm{number\ of\ limit\ points\ of\ the\ sequence}\ \{1, cos(1)^z, cos(cos(1)^z)^z, \ldots\}$$

Here is a picture of $P$: this is the region $[-8,8] \times [-8,8]$ and the pixel at $z$ is given color $n$ by some software that estimates $P(z)$.

Number of limit points in iterates of powers of cos

Black pixels are points where the software cannot detect periodicity. The correspondence between colors and numbers is as follows, where 'Unk' means 'Unknown':

enter image description here

In particular, one can see the behavior along the positive real axis matches the description above. (Although there are no axes in this picture, I have verified separately that the transition point in the picture is correct.) Unfortunately, I have no idea how to explain the rest of the picture! Although I have been careful writing the software, I can't say with certainty that the picture is correct anywhere other than the positive real axis.

This question is in danger of being too general, so here is one specific question to answer: Is the cardoid-shaped region colored 1 correct?

I would, of course, also be happy to hear any other verifications of features in this picture, or other behavior of $P(z)$ not depicted.

Sin and exp

At the risk of going on too long, I think it's natural to also address a similar question for the sine and exponential functions. Here is the picture for exp:

Number of limit points in iterates of powers of exp

And the picture for sin is below:

Number of limit points in iterates of powers of sin

This last one, for the sine function, is even more bewildering to me. There is something that looks very much like a Mandelbrot set there. Why?


Two of my colleagues were discussing the behavior of cos along the positive real axis on our department mailing list. I was curious about the complex behavior, but this is outside my field, so started making pictures like the ones shown here. I've been thinking about these off and on for a little over a year, but not really made any progress or had anyone give me a useful reference. So I wanted to see what the wider MO community has to say.

If you want some higher-resolution pictures for cos, see this G+ post:


Notes on the software

The software computes 500 iterates, and then looks at the next 30 iterates. It returns the minimum $n$ such that there are two successive subsequences of length $n$ whose corresponding terms are within $\varepsilon = .001$. If no such $n$ is found, it computes 500 more iterates and tries again. This is repeated 6 times. If no such $n$ is found, the pixel is colored black.

Decreasing $\varepsilon$ by a factor of $10^4$ or so takes longer but does not result in a substantially different picture.

  • 4
    $\begingroup$ What method does the software use when choosing a branch of the $z$-power function? $\endgroup$ Dec 27, 2015 at 14:46
  • $\begingroup$ Hmmm, I don't know for sure. I'm using Sage for this, so probably whatever the default there is. Maybe the pictures are artifacts of the branch choices? $\endgroup$
    – Niles
    Dec 27, 2015 at 14:48
  • 6
    $\begingroup$ Yes, since most the the boundaries between colors in the picture are when you go from one branch to another, one would think that in order to explain them, you should first investigate the branches used by the software... $\endgroup$ Dec 27, 2015 at 14:51
  • $\begingroup$ Thanks! I don't think I really understand this comment, so I'll think about it and let you know. If you care to say more, that would be great. $\endgroup$
    – Niles
    Dec 27, 2015 at 14:54

2 Answers 2


In spite of the potential issues arising from the fact that this function is not entire, there is a standard way to describe the components that you see in these types of pictures. Suppose that we are studying the iteration of a function $f_p(z)$ where $z$ is a complex variable and $p$ is a complex parameter. The cardioid-like figure that you see arises as the boundary of the set of $p$ parameters such that the corresponding function $f_p$ has an attractive fixed point. Symbolically:

\begin{align} f_p(z) &= z \\ \left|\ f_p'(z)\right| &< 1 \end{align}

The equation $f_p(z)=z$ says that $z$ is a fixed point and the inequality $\left|\ f_p'(z)\right|<1$ says that the fixed point is attractive. On the boundary, we expect that $\left|\ f_p'(z)\right|=1$. Thus, the boundary may be described as

\begin{align} f_p(z) &= z \\ \ f_p'(z) &= e^{it}, \end{align}

for some $t\in[0,2\pi)$. If we can solve the equations for $z$ and (more importantly) $p$ in terms of $t$, we have an explicit description of the boundary. In the case of the Mandelbrot set, $f_p(z)=z^2+p$ and this pair of equations can be solved in closed form so we have a proof that the main cardioid is, in fact, a cardioid. This is a bit much to expect in the current case. Nonetheless, we can make some progress and finish it off numerically. To do so, write $f_p(z)=\cos^p(z)$. The equations of interest are then

\begin{align} \cos^p(z) &= z \\ -p \sin (z) \cos ^{p-1}(z) &= e^{i t} \end{align}

This second equation can be solved for $p$ in terms of $z$ and $t$ using Lambert's W function:

$$p(z,t) = \frac{W\left(-e^{i t} \cot (z) \log (\cos (z))\right)}{\log (\cos (z))}.$$

Note: there is certainly a potential branch cut issue here! Nonetheless, plugging that back into the first equation we get

$$\cos^{p(z,t)}(z) = z.$$

For a given $t$, this equation can be solved numerically to determine a specific $z$ value that is a neutral fixed point of $\cos^{p(z,t)}$. If we then plug that $z$ and $t$ value into $p(z,t)$ we get a point on the boundary of your cardioid-like domain.

Again, this procedure is certainly fraught with branch cut and numerical issues. proceeding undaunted, I implemented this in Mathematica together with the iteration scheme itself and came up with the following:

enter image description here

  • $\begingroup$ Thanks! This is great. I was wondering if Taylor expansion would explain why it looks like there is a Mandelbrot set for the sine function. Your explanation for the cardioid regions might lead to a way to do this. $\endgroup$
    – Niles
    Dec 27, 2015 at 22:58
  • 1
    $\begingroup$ @Niles I'm glad you like it! It is pretty amazing stuff. The appearance of the mini-mandelbrot set is not so surprising, after you've seen it occur enough times. You are certainly correct though, that a polynomial approximation to the transcendental function is the way to understand it - together with the fact that McMullen has proven that the Mandelbrot set is universal in rational families. $\endgroup$ Dec 27, 2015 at 23:15
  • 1
    $\begingroup$ I think the fact that the sine version is so much nicer arises from the fact that the period one cardioid and it's surrounding environment somehow misses the branch cuts. Might be worth thinking about a bit this week. :) $\endgroup$ Dec 27, 2015 at 23:16

You iterate the function $a\mapsto (\cos a)^z$ which is ill defined for complex $a$ and $z$; you need a branch cut, which is visible on some of your pictures. In holomorphic dynamics, usually entire functions are studied, like $a\mapsto z\exp(a)$, $a\mapsto z\cos(a)$ etc., and the pictures obtained for them look very similar to your pictures. There are plenty of them on the internet. So this complex behavior in the complex plane is not surprising at all.

Concerning periodic orbits of the critical point, a similar question was recently solved for the exponential family in Hubbard, John, Schleicher, Dierk; Shishikura, Mitsuhiro Exponential Thurston maps and limits of quadratic differentials. Zbl 1206.37026 J. Am. Math. Soc. 22, No. 1, 77-117 (2009).


Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.