-2
$\begingroup$

I'm new to mathematica and was wondering how to plot an iterative graph for power towers. If there is a power tower y= x^x^x^x^x^x^... we can rewrite it as an iterative equation in the following way: enter image description here

Then according to 'The Fractal Boundary of the Power Tower Function Peter Lynch, School of Mathematics & Statistics University College Dublin':

enter image description here

I want to plot y(n+1) against y(n) using mathematica as they have done in this paper to get graphs like this:

enter image description here

The strange properties of the infinite power tower
by Luca Moroni

How exactly do I plot these graphs using mathematica and get the cobwebs to show up?

$\endgroup$
5
  • $\begingroup$ Hi searching cobweb in the search box here I found 12 results. The one with the highest score seems to be this one: mathematica.stackexchange.com/q/61323/86543 $\endgroup$ Dec 28, 2022 at 12:12
  • $\begingroup$ There is also a resource function here: resources.wolframcloud.com/FunctionRepository/resources/… but I have not used it myself. Note that resource functions are made by community members so consider testing it first. $\endgroup$ Dec 28, 2022 at 12:15
  • 1
    $\begingroup$ Typing cobweb mathematica on google you can find other links such as demonstrations.wolfram.com/CobwebModel or community.wolfram.com/groups/-/m/t/153946 $\endgroup$ Dec 28, 2022 at 12:27
  • $\begingroup$ You write: "I want to plot y(n+1) against y(n)". y(n) is a function of x. y(n)(x). What exactly do you want? $\endgroup$ Dec 28, 2022 at 13:31
  • $\begingroup$ The block of 4 plots above are just plots of $y(x)=e^{\xi x}$ and $y(x)=x$. You can start by simply plotting these for example code Plot[{x,Exp[-0.25 x]},{x,0,6},PlotRange->6]. Next enter Plot[{x, Exp[0.23 x]}, {x, 0, 15}, PlotRange -> {{0, 15}, {0, 15}}, AspectRatio -> 1' and then start to create the stair steps. $\endgroup$
    – josh
    Dec 28, 2022 at 16:38

1 Answer 1

1
$\begingroup$

This should get you started.

(* function to plot: *)
f = Exp[0.33 #] &  
(* describe arrows: *)
nsteps = 5
xs = NestList[f, 4, nsteps]
pts = Partition[Riffle[xs, xs], 2, 1]
arrows = Arrow /@ Partition[pts, 2, 1]
Length@arrows
g = Graphics[{
    {Darker[Green, 0.7], Arrowheads[0.02], arrows},
    HalfLine[{0, 0}, {1, 1}]
    }];
(* create function plot: *)
plt = Plot[f[x], {x, 0, 5},
  Axes -> True, AxesOrigin -> {0, 0}, AspectRatio -> 1]
(* combine function plot and arrows *)
Show[plt, g]

enter image description here

$\endgroup$

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