# Thread: Solving 2 variables for optimal numbers

1. ## Solving 2 variables for optimal numbers

Okay say I have 5,000 white cubes, and I want to paint them either red or blue, but the paints cost differently: red paint costs $200, and blue paint costs$600. I want as many blue colored cubes as possible while still having enough money left over for red cubes, and all 5,000 cubes must be either red or blue by the time I have no money left over. I have $2,000,000. What is the optimal number of red/blue cubes if I want as many blue cubes as possible? This is what I have so far: (#red cubes*$200) + (#blue cubes*$600) =$2,000,000
#red cubes + #blue cubes = 5,000

How would I go about solving this

2. you must solve for either red or blue in one equation and substitute it into the other equation.
R = #of red
B = #ofblue
$\displaystyle R = 5000 - B$
put that in for R in the first equation, solve for B.

3. Originally Posted by daigo
Okay say I have 5,000 white cubes, and I want to paint them either red or blue, but the paints cost differently: red paint costs $200, and blue paint costs$600. I want as many blue colored cubes as possible while still having enough money left over for red cubes, and all 5,000 cubes must be either red or blue by the time I have no money left over. I have $2,000,000. What is the optimal number of red/blue cubes if I want as many blue cubes as possible? This is what I have so far: (#red cubes*$200) + (#blue cubes*$600) =$2,000,000
#red cubes + #blue cubes = 5,000

How would I go about solving this
200R + 600B = 2000000 simplifies to R + 3B = 10000

second equation is R + B = 5000

solve the system of equations by one of the methods you learned in class (I recommend either substitution or elimination)