I'm trying to build a simple function that takes 2 arguments. Basically, I want it to do this:(adsbygoogle = window.adsbygoogle || []).push({});

x(n+1)=a*sin[x(n)]

and generate a list of x0,x1,x2 etc. up to x(n) like NestList does, starting from x0=1.0

So I want to make a list of these iterations, whereais a constant of my choice, and n is the number of iterations. My first guess was to try

iteration[a_,n_]:=NestList[a*Sin,1.0,n]

but of course it doesn't work as Mathematica doesnt recognize a*Sin as a function. So I tried defining a function acos[a_,x_]:=a*Sin[x] first but not only does it look inefficient to define 2 functions for something this simple, it also introduces another argument, and I still can't find a way to get it to work.

Thanks!

**Physics Forums - The Fusion of Science and Community**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Mathematica - Iterations with 2 arguments

Loading...

Similar Threads - Mathematica Iterations arguments | Date |
---|---|

Mathematica Cannot do the integral of the Hyper-geometric function? | Mar 11, 2018 |

Iteration in Mathematica | May 12, 2012 |

Mathematica - Showing iterations graphically | Jan 20, 2012 |

Iterative map in mathematica | Sep 28, 2011 |

Mathematica: Iterations | Feb 13, 2011 |

**Physics Forums - The Fusion of Science and Community**