Message Boards Message Boards

Iterating tiltedsinewave discretizes vehemently

Posted 1 year ago

POSTED BY: Bill Gosper
2 Replies

Dear Dr. Gosper,

what a terrific idea rotating a sine wave! I imagine that more interesting functions can be constructed this way. Thanks for sharing!

Your post ended with a question:

We're (quadratically?) approaching the step function - Why?

Well (if I understand this question correctly), is iteration not basically equivalent to a search for attractive fixed points?

f = # + Sin[#] &;
g = InverseFunction[# - Sin[#] &];
tiltedSinwave = f@*g;

startx1 = 6.28;
startx2 = 6.4;
pts1 = Flatten[
   BlockMap[With[{x = First[#], y = Last[#]}, {{x, y}, {y, y}}] &, 
    NestList[tiltedSinwave, startx1, 3], 2, 1], 1];
pts2 = Flatten[
   BlockMap[With[{x = First[#], y = Last[#]}, {{x, y}, {y, y}}] &, 
    NestList[tiltedSinwave, startx2, 3], 2, 1], 1];
PrependTo[pts1, {startx1, 0}];
PrependTo[pts2, {startx2, 0}];

What I mean is of course the usual picture:

Plot[{x, tiltedSinwave[x]}, {x, 0, 10}, AspectRatio -> Automatic, ImageSize -> 400, 
 Epilog -> {{Thick, Red, Arrow[pts1]}, {Thick, Green, Arrow[pts2]}}, PlotStyle -> {Dashed, {Thick, Black}}]

enter image description here

The iteration actually reads: f @* g @* f @* g @* f @* g @* f @* g @* f @* g ...

But because of the above mentioned mechanism each single one of these functions after iteration will end up in a step function (albeit much slower):

Plot[{x, Nest[f, x, 3], Nest[g, x, 3]}, {x, -10, 10}, AspectRatio -> Automatic, ImageSize -> 400, 
 PlotStyle -> {Dashed, Thick, Thick}]

enter image description here

[All this is just meant as an additional demo!]

POSTED BY: Henrik Schachner

enter image description here -- you have earned Featured Contributor Badge enter image description here Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

POSTED BY: Moderation Team
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract