Question 1102564
{{{x}}}= number of Maxivite pills to take
{{{y}}}= number of Healthovite pills to take
To get at least 2200 mg iron,
{{{red(40x+10y>=2200)}}} .
To get at least 2100 mg of vitamin B-1,
{{{green(12x+18y>=2100)}}} .
To get at least 1800 mg of vitamin B-2,
{{{blue(8x+18y>=1800)}}} .
Of course, {{{x>=0}}} and {{{y>=0}}} are also restrictions.
The boundary lines for those inequalities are
{{{red(40x+10y=2200)}}} --> {{{red(y=220-4x)}}} ,
{{{green(12x+18y=2100)}}} --> {{{green(y=(700-4x)/6)}}} or {{{green(y=166&2/3-(2/3)x)}}} ,
{{{blue(8x+18y=1800)}}} --> {{{blue(y=(900-4x)/9)}}} --> {{{blue(y=100-(4/9)x)}}}
{{{x=0}}} , the y-axis, and
{{{y=0}}}, the x-axis.
 
Graphing the 5 boundary lines above, we get
{{{drawing(300,330,-25,225,-25,250,grid(1),
red(line(0,220,55,0)),green(line(0,116.7,175,0)),
blue(line(0,100,225,0))
)}}}
We see that {{{x=y=75}}} would meet the requirements,
and so would any point in the upper right corner area bounded by
the axes, the red line, the blue line and the green line.
The blue and green lines intersect at 
However, we have to consider the cost.
The cost, in cents is
{{{cost=6x+8y}}} --> {{{y=(1/8)cost-(3/4)x}}} or  {{{y=0.125cost-0.75x}}} .
For $12 total cost, {{{cost=1200}}} ,
the line representing all the possible (x,y) combinations is
{{{y=150-0.75x}}} , represented by the bold black line segment below.
{{{drawing(300,330,-25,225,-25,250,grid(1),
red(line(0,220,55,0)),green(line(0,116.7,175,0)),
blue(line(0,100,225,0)),line(0,200,150,0)
)}}} So, $12 would buy a lot of different combinations exceeding all requirements,
represented by the (x,y) points that are above all 3 colored lines.
A lower cost would be represented by a parallel line closer to the origin.
So, we would like to move that line parallel to itself until it gives the least cost, while meeting the requirements.
From comparing the slopes of the lines
(on the graph or in the equations)
we realize that out best bet is aiming for
the point where green and red lines cross.
That is the solution to
{{{system(green(y=(700-4x)/6),red(y=220-4x))}}} --> {{{system(x=31,y=96)}}}
 
a) A combination of
{{{highlight(31)}}} Maxivite pills and {{{highlight(96)}}} Healthovite pills will meet Kim's requirement at lowest cost.
The lowest cost is {{{31*"$0.06"+968*"$0.08"="$9.54"}}}
The optimum point, (31,96) on the green and red lines,
and the cost line through that point are shown below.
{{{drawing(300,330,-25,225,-25,250,grid(1),
red(line(0,220,55,0)),green(line(0,116.7,175,0)),
blue(line(0,100,225,0)),line(0,119.25,147.33,0),
circle(31,96,5)
)}}}
 
b) Kim receives exactly the minimum amount she needs of iron (red line) and vitamin B1 (green line), but gets slightly more than she needs of vitamin {{{highlight(B2)}}} (blue line).