       Re: FindMaximum/NMaximize vs. Excel Solver

• To: mathgroup at smc.vnet.net
• Subject: [mg106748] Re: FindMaximum/NMaximize vs. Excel Solver
• From: Bill Rowe <readnews at sbcglobal.net>
• Date: Fri, 22 Jan 2010 05:40:38 -0500 (EST)

On 1/21/10 at 4:57 AM, jhurley13 at gmail.com (John) wrote:

>I am looking at a simple model that calculates the best wagers to
>place on a set of 20 horses, where the goal is to maximize reward
>vs. risk. Since the bets need to be constrained, I can't use
>NMaximize.

NMaximize allows constraints. For example consider the function
x + 5 Sin[x] which has no global maximum and an infinite number
of local maxima. To obtain a maximum for x between say 5 and 10

In:= NMaximize[{x + 5 Sin[x], 5 < x < 10}, x]

Out= {12.9543,{x->8.05534}}

Or for x between 20 and 25

In:= NMaximize[{x + 5 Sin[x], 20 < x < 25}, x]

Out= {25.5207,{x->20.6217}}

No constraints on x results in the following

In:= NMaximize[x + 5 Sin[x], x]

Out= {6.67113,{x->1.77215}}

• Prev by Date: Re: How To invert ColorFunction
• Next by Date: Mathematica gets stuck, only thing I can do is quit kernel
• Previous by thread: FindMaximum/NMaximize vs. Excel Solver
• Next by thread: Re: FindMaximum/NMaximize vs. Excel Solver