MathGroup Archive 2009

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

Search the Archive

Re: iterative method?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg95739] Re: [mg95699] iterative method?
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Sun, 25 Jan 2009 21:50:51 -0500 (EST)
  • Reply-to: hanlonr at cox.net

a = .2; b = .1; c = .9; d = .49;

n=10; (* reduced from 50 for example *)

initial={2,5};

f[{x_, y_}] := {(a*x + b*y)/c*x,
  d*x*y}

data = NestList[f, initial, n];

ListLinePlot[Transpose[data]]


Bob Hanlon

---- matt <trex1704 at yahoo.com> wrote: 

=============
How to find x_(n+1)=(a*x_n+b*y_n)/c*x_n , y_(n+1)=d*x_n*y_n using mathematica?
I want to find a list of x and y when n=1,2,...,50
so I defined the function as f[{x_,y_}]:={a*x_n+b*y_n)/c*x_n,d*x_n*y_... }
and then use the function NestList[f,{2,5},50] with initial value of x is 2 and y is 5
with this, I got the list of 50 values of (x,y).
The problem is I want to plot graphs of x against n and y against n, n from 1 to 50 because I want to see what happened if n goes to infinity. But if use the method I just mentioned, I can only plot x against y.
So do anyone have a clever method??
Btw...a,b,c and d are constants and given and x_n is supposed to be x (subscript n)...same case with x_(n+1) and the others



  • Prev by Date: Re: NestList
  • Next by Date: Re: Re: Timing of N[ Factorial[4000000], 18]
  • Previous by thread: Re: iterative method?
  • Next by thread: Re: iterative method?