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 1995

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

Search the Archive

Re: question about nest

  • To: mathgroup at
  • Subject: [mg1942] Re: question about nest
  • From: Albright <albright at>
  • Date: Wed, 23 Aug 1995 22:33:38 -0400
  • Organization: UCLA Department of Physics and Astronomy

ORLANDO LUIS GOULART PERES <orlando at> wrote:
>Dear Wizards
>I have a function with two variables
>And I need the n-compose function
>But Mathematica look for a function f[x] and not f[x,a]
>Is this possible to use Nest with this two variable function?
>For example, I need
>f[x,a], f[f[x,a],a], f[f[f[x,a],a],a] .
>Later I will put many values for "a" .
>Orlando Peres


You might try something like:

	h[n_] := Nest[g,x,n] //. g[x_] -> f[x,a]

For example:

	In[1]:= h[n_] := Nest[g,x,n] //. g[x_] -> f[x,a]

	In[2]:= h[3]

	Out[2]:= f[f[f[x,a],a],a]



Brian J. Albright                            
Department of Physics and Astronomy, UCLA   
albright at         

  • Prev by Date: molecular structures
  • Next by Date: Plotting Piecewise Functions with Discontinuites
  • Previous by thread: question about nest
  • Next by thread: Re: question about nest