Skip to main content
Mathematics LibreTexts

24.3: Practice Nutrition

  • Page ID
    68247
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Big Annie’s Mac and Cheese fans want to improve the levels of protein and fiber for lunch by adding broccoli and canned chicken. The nutrition information for the foods in this problem are

    Nutrient Mac and Cheese Broccoli Chicken Shells and White Cheddar
    Calories 270 51 70 260
    Protein (g) 10 5.4 15 9
    Fiber (g) 2 5.2 0 5
    The Annie's logo.

    She wants to achieve the goals with exactly 400 calories, 30 g of protein, and 10 g of fiber by choosing the combination of these three or four serving. (Assume that we can have non-integer proportions for each serving.)

    Question (a)

    We consider all four choices of food together. Formulate the problem into a system of equations \(Ax=b\). Create your matrix \(A\) and the column vector \(b\) in np.matrix.

    import numpy as np
    #####Start your code here #####
    A = np.matrix()
    b = np.matrix()
    #####End of your code here#####
    Question (b)

    In this and next question, we only consider three out of the four choices. What proportions of these servings of the three food (Mac and Cheese, Broccoli, and Chicken) should be used to meet the goal? (Hint: formulate it as a system of equations and solve it).

    #Put your answer here
    Question (c)

    She found that there was too much broccoli in the proportions from part (b), so she decided to switch from classical Mac and Cheese to Annie’s Whole Wheat Shells and White Cheddar. What proportions of servings of the new three food should she use to meet the goals?

    #Put your answer here
    Question (d)

    Based on the solutions to parts (b) and (c), what are the possible proportions of serving for the four food that meet the goal.

    Question (e)

    Solve the system of equations from part (a). You need to first decide the three outcomes: One solution, None solution, Infinite many solutions. Then for One solution, write down the solution; for Infinite many solutions, write down all the solutions with free variables.

    #Put your answer here

    This page titled 24.3: Practice Nutrition is shared under a CC BY-NC 4.0 license and was authored, remixed, and/or curated by Dirk Colbry via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.