Re: Maximisation question

• To: mathgroup at smc.vnet.net
• Subject: [mg126560] Re: Maximisation question
• From: Bob Hanlon <hanlonr357 at gmail.com>
• Date: Sat, 19 May 2012 05:44:32 -0400 (EDT)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• References: <201205180923.FAA17073@smc.vnet.net>

```I'm guessing that you meant 100 <= i < 0 rather than 100 <= f(i) < 0

f[n_] := PDF[BinomialDistribution[100, .1], n]

Maximize[{f[j], 0 < j <= 100}, j, Integers]

{0.131865, {j -> 10}}

Maximize[{f[j], 0 < j <= 100, Element[j, Integers]}, j]

{0.131865, {j -> 10}}

If f and cons are linear or polynomial, Maximize will always find a
global maximum.  In cases where Maximize only finds a local maxima,
you can use an exhaustive search.

data = Table[{n, f[n]}, {n, 0, 100}];

Select[data, #[[2]] == Max[data[[All, 2]]] &]

{{10, 0.131865}}

Bob Hanlon

On Fri, May 18, 2012 at 5:23 AM, J.Jack.J. <jack.j.jepper at googlemail.com> wrote:
> For any integer j, suppose we have a function f(j). Then how would I
> find the highest f(i) such that 100 <= f(i) <0 ?