Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Simple Recursive Map

  • To: mathgroup at
  • Subject: [mg35437] Re: [mg35398] Simple Recursive Map
  • From: Tomas Garza <tgarza01 at>
  • Date: Fri, 12 Jul 2002 04:29:00 -0400 (EDT)
  • References: <>
  • Sender: owner-wri-mathgroup at

To start with, you must use the proper syntax, and then set up a recursion.
You have not given initial values, so I arbitrarily set x[1] = 1 and y[1] =
0. Then

x[n_] := y[n - 1] - a*x[n - 1]^2 - 1;
y[n_] := b + x[n - 1];
x[1] := 1;
y[1] := 0;

recursion limit (q.v.), usually equal to 256 by default. Bear in mind that
you are getting very complicated expressions as n grows larger, if a and b
remain in symbolic form, and the execution time may also be quite large.
Take, for example, n = 10:

Timing[Collect[y[10], {a, b}]; ]
{118.2 Second, Null}

I used Collect to obtain a neater result. Of course, I didn't display it.

Tomas Garza
Mexico City
----- Original Message -----
From: "Reuben" <reubengann at>
To: mathgroup at
Subject: [mg35437] [mg35398] Simple Recursive Map

> I have the map
> x_n+1=y_n-a*(x_n)^2 - 1
> y_n+1=b*x_n
> If I specify a,b, x_0 and y_0, how can I make Mathematica iterate
> through this numerically to give me x_50 and y_50?
> Thanks
> Reuben

  • Prev by Date: Re: White border in plots
  • Next by Date: Re: arguments of the function
  • Previous by thread: Simple Recursive Map
  • Next by thread: Re: Simple Recursive Map