Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Maximize a single variable and solve for the rest
Replies: 5   Last Post: May 24, 2011 5:18 AM

 Messages: [ Previous | Next ]
 Ramiro Posts: 26 Registered: 9/18/07
Maximize a single variable and solve for the rest
Posted: May 20, 2011 5:45 AM

Hello,

I have a problem where I would like to solve an equation (namely (h+s+b
+d==1) with some constraints, while maximizing for a related variable
"c" (c<=9). Please see below, any suggestions?

r1 = 3/4;
r2 = 1;
Block[{h, s, b, d, c},
NMaximize[{h + s + b + d,
b == c*r1 && h + s + b + d == 1 && d == c*r2 && h == s &&
b + d <= 0.9}, {h, s, b, d, c}]]

{1., {h -> 0.5, s -> 0.5, (3 c)/4 -> 0., c -> 0., c -> 0.}}

Should I be using NSolve?

Ramiro

Date Subject Author
5/20/11 Ramiro
5/21/11 Ramiro Barrantes-Reynolds
5/21/11 Peter Pein
5/21/11 Bob Hanlon
5/23/11 FranD
5/24/11 FranD