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 2006

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

Search the Archive

calling maximize recursively

  • To: mathgroup at
  • Subject: [mg67540] calling maximize recursively
  • From: garriott at
  • Date: Fri, 30 Jun 2006 04:14:22 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

Hello all.

I am trying to call an instance of Maximize[] within Maximize[].

Essentially I'm trying to perform a traditional Bellman's equation
optimization, where you maximize value[now] + value[later], and
value[later] is itself another maximization, and so on.

Here is a very simplified example of a recursive Maximize[] call. If
you can figure out a way to get this to work without deleting one of
the two Mazimize[]s then you'll save the day for me! (I am aware this
particular problem could be done far easier, but it's the setup here
that matters, not the particular problem.)

function1[x_] := x - x^2;

function2[bound_] := Maximize[ {function1[x], x<bound} , x ];

Maximize [ function2[bestbound] , bestbound ]

(if you import this in to mathematica it gives an error, because it
tries to pass bestbound as a pure variable to function2, rather than a
candidate value of bestbound to function2)

Please help,

  • Prev by Date: Re: repeated usage of packages
  • Next by Date: Re: NDolve + ParametricPlot
  • Previous by thread: SetOptions for Notebooks
  • Next by thread: Forcing a parameter to be integer when using 'Integrate'