Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #10136

Re: Maximisation question

From Bob Hanlon <hanlonr357@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Maximisation question
Date 2012-05-19 09:46 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jp7q5s$qfa$1@smc.vnet.net> (permalink)
References <201205180923.FAA17073@smc.vnet.net>

Show all headers | View raw


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@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 ?
> With thanks in advance.
>

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Maximisation question Bob Hanlon <hanlonr357@gmail.com> - 2012-05-19 09:46 +0000

csiph-web