There are 3 foods with the following Protein/Fat/Carbs (grams/ounce): 2,3,4; 3,3,1; 3,3,2. We want a meal using the 3 foods that results in 24g of protein, 27g of fat, 20g of carbs. How much of each food is needed?

1 Answer

#(A,B,C)=(3,4,2)# ounces of food

Explanation:

I'm going to use the Food letters - A, B, C - to be the number of ounces of that food that should be used.

I'm going to put the chart here (numbers in grams/ounce):

#"Food"color(white)(0)"Protein"color(white)(0)"Fat"color(white)(0)"Carbs"#

#color(white)(00)"A"color(white)(00000)"2"color(white)(00000)"3"color(white)(000)"4"#

#color(white)(00)"B"color(white)(00000)"3"color(white)(00000)"3"color(white)(000)"1"#

#color(white)(00)"C"color(white)(00000)"3"color(white)(00000)"3"color(white)(000)"2"#

And we need 24g of Protein, 27g of Fat, 20g Carbs, so:

(P)rotein: #2A+3B+3C=24#
(F)at: #color(white)(000)3A+3B+3C=27#
(C)arbs: #color(white)(0)4A+1B+2C=20#

I'm first going to work on expressing the B values in terms of A and C. I'll do that by subtracting #3xxC# and first P and then F:

3C: #color(white)(0000)12A+3B+6C=60#
P: #color(white)(000000)2A+3B+3C=24#

#3C-P#: #10A+color(white)(00000)3C=36#

3C: #color(white)(0000)12A+3B+6C=60#
F: #color(white)(000000)3A+3B+3C=27#

#3C-F#: #9A+color(white)(000000)3C=33#

And I can now subtract #3C-F# from #3C-P# to get rid of C and solve for A:

#3C-P#: #10A+color(white)(00000)3C=36#
#3C-F#: #9A+color(white)(000000)3C=33#

#(3C-P)-(3C-F)#: #A=3#

And now we can substitute this back in to one of our equations (I'll do both to double check our answer this far - I'll use colours to help highlight what we're doing):

#color(blue)(3C-P#: #10A+3C=36#

#3C-P#: #10(3)+3C=36#

#3C-P#: #30+3C=36#

#3C-P#: #3C=6#

#color(blue)(3C-P#: #color(red)(C=2#

#color(green)(3C-F#: #9A+3C=33#

#3C-F#: #9(3)+3C=33#

#3C-F#: #27+3C=33#

#3C-F#: #3C=6#

#color(green)(3C-F#: #color(red)(C=2#

Ok - C checks out as equaling 2. Now let's substitute into one of the originals (and I'll do all 3 to show it works in all the original equations):

(P)rotein: #2A+3B+3C=24#

(P)rotein: #2(3)+3B+3(2)=24#

(P)rotein: #6+3B+6=24#

(P)rotein: #3B=12#

(P)rotein: #B=4#

(F)at: #3A+3B+3C=27#

(F)at: #3(3)+3B+3(2)=27#

(F)at: #9+3B+6=27#

(F)at: #3B=12#

(F)at: #B=4#

(C)arbs: #4A+1B+2C=20#

(C)arbs: #4(3)+1B+2(2)=20#

(C)arbs: #12+1B+4=20#

(C)arbs: #B=4#

Everything checks out!

#(A,B,C)=(3,4,2)# ounces of food