       Re: question about maximization with mathematica tool

• To: mathgroup at smc.vnet.net
• Subject: [mg109412] Re: question about maximization with mathematica tool
• From: Bob Hanlon <hanlonr at cox.net>
• Date: Mon, 26 Apr 2010 04:50:17 -0400 (EDT)

```You need to include at least the lower boundary for x

expr = FullSimplify[Rationalize[
12 La*T + (0.12 x + 5 y)*((2 (42 x + 4018 y - 7 x y))/
(9 x y) - (6 x + 574 y - x*y)^2/(2025 x^2 y^2))]];

(Maximize[{expr /. y -> 7/2, 80 <= x < 250}, x] //
Simplify) /.
r_Rational :> N[r]

{12 La T+331.744,{x->80}}

(Maximize[{expr /. y -> 2, 80 <= x < 250}, x] //
Simplify) /.
r_Rational :> N[r]

{12 La T+278.921,{x->80}}

(Simplify[
Maximize[{expr,
80 <= x < 250, y == 7/2 || y == 2}, x],
y == 7/2 || y == 2]) /. r_Rational :> N[r]

{Piecewise[
{{12*La*T + 278.9207702469136,
y == 2}}, 12*La*T +
331.74427087994457], {x -> 80}}

Bob Hanlon

---- MANOLIS <voskakis86 at gmail.com> wrote:

=============
i want to maximize the equation below:

12La*T + (0.12x + 5 y)*((2 (42 x + 4018 y - 7 x y))/(
9 x y) - (6 x + 574 y - x y)^2/(2025 x^2 y^2))

it has 4 variables x, y, La, T. I want the maximization for the x
variable only. In other words i want to find a relation between x and
the other variables that maximizes the whole equation. the
restrictions are that 80<x<250 and y==3.5 || y==2

i wrote the command below  in mathematica but nothing:

Maximize[{12La*T + (0.12x + 5y)*((2 (42 x + 4018 y - 7 x y))/(
9xy) - (6x + 574y - x*y)^2/(2025 x^2 y^2)),
x < 250 && x > 80, y == 3.5 || y == 2}, {x}]

i dont know why. i dont think that it is the number of variables that
causes the problem...

thank you very much
Manolis

```

• Prev by Date: Re: problems with NMinimize
• Next by Date: Re: Function to detect presence of a variable in