# Question:Maple assignment

## Question:Maple assignment

Maple

Could I please get help with this maple assignment? No idea where to even begin!!

# Diet Problems
# Text Reference: Section 1.10, p. 93
# The purpose of this set of exercises is to provide examples of vector
# equations which result from balancing nutrients in a diet.
# Section 1.10 shows how use a vector equation
#
> x[1]#  a
> ``[1]#  +
> x[2]#  a
> ``[2]#  + ... +
> x[n]#  a
> ``[n]#  = b
# to model a diet with a specified nutritional intake.  Each vector a
> ``[i]#  lists the nutrient composition of one unit (usually 100 grams)
# of foodstuff, and the corresponding weight
> x[i]#  is the variable that represents the amount (number of units) of
# that foodstuff to be used in the diet.  The vector b lists the amount
# of each nutrient that must be in the diet.
# Table 2 below is a listing of the nutritional value of many foods
# found in a typical kitchen.  The nutrients are given per 100 grams of
# foodstuff.  This data is taken from the USDA Nutrient Database for
# Standard Reference available at the United States Department of
# Agriculture website, whose web address is
# http://www.nal.usda.gov/fnic/foodcomp.  The columns represent
# respectively the following foodstuffs: beef, brussels sprouts,
# carrots, chicken soup, egg, feta cheese, grapefruit, lentils, lettuce,
# milk, mushrooms, oil, onion, rice, salad dressing, salmon, soy sauce,
# spinach, tomato, and vanilla ice cream. Table 1 gives the standard
# serving size for each of these foodstuffs, and also gives a key to the
# columns in Table 2.
> T1 := matrix(
>      [[`Key Number`, `Foodstuff`, `Serving Size`],
>       [ 1, `Beef`, `6  oz. = 170  g`],
>       [ 2, `Brussels Sprouts`, `1/2 cup = 78 g`],
>       [ 3, `Carrots`, `1\ carrot = 61 g`],
>       [ 4, `Chicken Soup`, `1 cup = 240 g`],
>       [ 5, `Egg`, `1 egg  = 61 g`],
>       [ 6, `Feta Cheese`, `1/4 cup = 38 g`],
>       [ 7, `Grapefruit`, `1/2 fruit = 123 g`],
>       [ 8, `Lentils`, `1 cup = 198 g`],
>       [ 9, `Lettuce`, `1/2 cup = 28 g`],
>       [10, `Milk`, `1 cup = 244 g`],
>       [11, `Mushrooms`, `1/2 cup = 35 g`],
>       [12, `Oil`, `1 Tbsp. = 13.5 g`],
>       [13, `Onion`, `1 onion = 110 g`],
>       [14, `Rice`, `1 cup = 158 g`],
>       [15, `Salad Dressing`, `1 cup = 250 g`],
>       [16, `Salmon`, `1/2 fillet = 124 g`],
>       [17, `Soy Sauce`, `1 Tbsp. = 18 g`],
>       [18, `Spinach`, `1 cup = 180\ g`],
>       [19, `Tomato`, `1 tomato = 123 g`],
>       [20, `Vanilla Ice Cream`, `1/2 cup = 66 g`] ] ):
> evalm( T1 );

[Key Number        Foodstuff           Serving Size   ]
[                                                     ]
[    1               Beef            6  oz. = 170  g  ]
[                                                     ]
[    2         Brussels Sprouts       1/2 cup = 78 g  ]
[                                                     ]
[    3              Carrots           1carrot = 61 g  ]
[                                                     ]
[    4           Chicken Soup         1 cup = 240 g   ]
[                                                     ]
[    5                Egg             1 egg  = 61 g   ]
[                                                     ]
[    6            Feta Cheese         1/4 cup = 38 g  ]
[                                                     ]
[    7            Grapefruit        1/2 fruit = 123 g ]
[                                                     ]
[    8              Lentils           1 cup = 198 g   ]
[                                                     ]
[    9              Lettuce           1/2 cup = 28 g  ]
[                                                     ]
[    10              Milk             1 cup = 244 g   ]
[                                                     ]
[    11            Mushrooms          1/2 cup = 35 g  ]
[                                                     ]
[    12               Oil            1 Tbsp. = 13.5 g ]
[                                                     ]
[    13              Onion           1 onion = 110 g  ]
[                                                     ]
[    14              Rice             1 cup = 158 g   ]
[                                                     ]
[    15         Salad Dressing        1 cup = 250 g   ]
[                                                     ]
[    16             Salmon          1/2 fillet = 124 g]
[                                                     ]
[    17            Soy Sauce          1 Tbsp. = 18 g  ]
[                                                     ]
[    18             Spinach            1 cup = 180g   ]
[                                                     ]
[    19             Tomato           1 tomato = 123 g ]
[                                                     ]
[    20        Vanilla Ice Cream      1/2 cup = 66 g  ]

# Table 1: Serving Sizes of Various Foodstuffs
> C := vector( [`Nutrient`] ):
> N := vector(
>       [`Calories (kcal)`,
>        `Protein (g)`,
>        `Fat (g)`,
>        `Carbohydrates (g)`,
>        `Calcium (mg)`,
>        `Iron (mg)`,
>        `Magnesium (mg)`,
>        `Phosphorus (mg)`,
>        `Potassium (mg)`,
>        `Sodium ((mg)`,
>        `Zinc (mg)`,
>        `Copper (mcg)`,
>        `Vitamin C (mg)`,
>        `Thiamine (mg)`,
>        `Riboflavin (mg)`,
>        `Niacin (mg)`,
>        `Pantothenic Acid (mg)`,
>        `Vitamin B6 (mg)`,
>        `Vitamin B12 (mcg)`,
>        `Vitamin A (IU)` ] ):
> FSa := matrix( 1, 10, [[\$1..10]] ):
> FSb := matrix( 1, 10, [[\$11..20]] ):
> NFa := matrix(
>     [ [215, 39, 43, 73, 152, 263, 30, 116, 14, 61.44],
>       [26, 2.55, 1.03, 5.3, 10.33, 14.2, .55, 9.02, 1.62, 3.29],
>       [11.5, .51, .19, 2.5, 11.44, 21.3, .1, .38, .2, 3.34],
>       [0, 8.6, 10.1, 7.1, 1.04, 4.09, 7.68, 20.14, 2.37, 4.66],
>       [7, 36, 27, 10, 42, 492.5, 11, 19, 36, 119.4],
>       [3.1, 1.2, .5, .6, 1.19, .65, .12, 3.33, 1.1, .05],
>       [27, 20, 15, 4, 9, 19.2, 8, 36, 6, 13.44],
>       [211, 56, 44, 30, 148, 337, 9, 180, 45, 93.4],
>       [367, 317, 323, 45, 101, 61.8, 129, 369, 290, 151.5],
>       [69, 21, 35, 354, 270, 1116, 0, 2, 8, 49],
>       [5290, .33, .2, .4, .92, 2.88, .07, 1.27, .25, .38],
>       [.143, .083, .047, .1, .013, .032, .044, .251, .037, .01],
>       [0, 62, 9.3, 0, 0, 0, 38.1, 1.5, 24, .94],
>       [.11, .107, .097, .03, .044, .154, .034, .169, .1, .038],
>       [.25, .08, .059, .07, .399, .844, .02, .073, .1, .162],
>       [4.63, .607, .928, 1.8, .058, .991, .191, 1.06, .5, .084],
>       [.34, .252, .197, 15, .934, .967, .283, .638, .17, .314],
>       [.4, .178, 147, .02, .109, .424, .042, .178, .047, .042],
>       [2.27, 0, 0, .13, .7, 1.69, 0, 0, 0, .357],
>       [0, 719, 28129, 509, 654, 447, 259, 8, 2600, 126] ] ):
> NFb := matrix(
>     [ [25, 884, 38, 130, 448.8, 149, 60, 23, 21, 201],
>       [2.09, 0, 1.16, 2.69, 0, 25.56, 10.51, 2.9, .85, 3.5],
>       [.42, 100, .16, .28, 50.1, 4.42, .1, .26, .33, 11],
>       [4.65, 1, 8.63, 28.17, 2.5, 0, 5.57, 3.75, 4.64, 23.6],
>       [5, .18, 20, 10, 0, 17, 20, 136, 5, 128],
>       [1.24, .38, .22, 1.2, 0, .99, 2.38, 3.57, .45, .09],
>       [10, .01, 10, 12, 0, 33, 40, 87, 11, 14],
>       [104, 1.22, 33, 43, 0, 295, 130, 56, 24, 105],
>       [370, 0, 157, 35, 7.5, 414, 212, 466, 222, 199],
>       [.4, .04, 3, 1, .5, 86, 5586, 70, 9, 80],
>       [.73, .06, .19, .49, 0, .71, .43, .76, .09, .69],
>       [.492, 0, .06, .069, 0, .099, .135, .174, .074, .023],
>       [3.5, 0, 6.4, 0, 0, 0, 0, 9.8, 19.1, .6],
>       [.102, 0, .042, .163, 0, .196, .059, .095, .059, .041],
>       [.449, 0, .02, .013, 0, .073, .152, .236, .048, .24],
>       [40116, 0, .148, 1.476, 0, 8.526, 3.951, .49, .628, .116],
>       [2.2, 0, .106, .39, 0, .865, .376, .145, .247, .581],
>       [.097, 0, .116, .093, 0, .231, .2, .242, .08, .048],
>       [0, 0, 0, 0, 0, 3.46, 0, 0, 0, .39],
>       [0, 0, 0, 0, 0, 136, 0, 8190, 623, 409] ] ):
> T2a := blockmatrix( 2,2, [ C, FSa, N, NFa ] ):
> T2b := blockmatrix( 2,2, [ C, FSb, N, NFb ] ):
> evalm( T2a ); evalm( T2b );

[Nutrient , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10]

[Calories (kcal) , 215 , 39 , 43 , 73 , 152 , 263 , 30 , 116

, 14 , 61.44]

[Protein (g) , 26 , 2.55 , 1.03 , 5.3 , 10.33 , 14.2 , 0.55 ,

9.02 , 1.62 , 3.29]

[Fat (g) , 11.5 , 0.51 , 0.19 , 2.5 , 11.44 , 21.3 , 0.1 ,

0.38 , 0.2 , 3.34]

[Carbohydrates (g) , 0 , 8.6 , 10.1 , 7.1 , 1.04 , 4.09 ,

7.68 , 20.14 , 2.37 , 4.66]

[Calcium (mg) , 7 , 36 , 27 , 10 , 42 , 492.5 , 11 , 19 , 36

, 119.4]

[Iron (mg) , 3.1 , 1.2 , 0.5 , 0.6 , 1.19 , 0.65 , 0.12 ,

3.33 , 1.1 , 0.05]

[Magnesium (mg) , 27 , 20 , 15 , 4 , 9 , 19.2 , 8 , 36 , 6 ,

13.44]

[Phosphorus (mg) , 211 , 56 , 44 , 30 , 148 , 337 , 9 , 180 ,

45 , 93.4]

[Potassium (mg) , 367 , 317 , 323 , 45 , 101 , 61.8 , 129 ,

369 , 290 , 151.5]

[Sodium ((mg) , 69 , 21 , 35 , 354 , 270 , 1116 , 0 , 2 , 8 ,

49]

[Zinc (mg) , 5290 , 0.33 , 0.2 , 0.4 , 0.92 , 2.88 , 0.07 ,

1.27 , 0.25 , 0.38]

[Copper (mcg) , 0.143 , 0.083 , 0.047 , 0.1 , 0.013 , 0.032 ,

0.044 , 0.251 , 0.037 , 0.01]

[Vitamin C (mg) , 0 , 62 , 9.3 , 0 , 0 , 0 , 38.1 , 1.5 , 24

, 0.94]

[Thiamine (mg) , 0.11 , 0.107 , 0.097 , 0.03 , 0.044 , 0.154

, 0.034 , 0.169 , 0.1 , 0.038]

[Riboflavin (mg) , 0.25 , 0.08 , 0.059 , 0.07 , 0.399 , 0.844

, 0.02 , 0.073 , 0.1 , 0.162]

[Niacin (mg) , 4.63 , 0.607 , 0.928 , 1.8 , 0.058 , 0.991 ,

0.191 , 1.06 , 0.5 , 0.084]

[Pantothenic Acid (mg) , 0.34 , 0.252 , 0.197 , 15 , 0.934 ,

0.967 , 0.283 , 0.638 , 0.17 , 0.314]

[Vitamin B6 (mg) , 0.4 , 0.178 , 147 , 0.02 , 0.109 , 0.424 ,

0.042 , 0.178 , 0.047 , 0.042]

[Vitamin B12 (mcg) , 2.27 , 0 , 0 , 0.13 , 0.7 , 1.69 , 0 , 0

, 0 , 0.357]

[Vitamin A (IU) , 0 , 719 , 28129 , 509 , 654 , 447 , 259 , 8

, 2600 , 126]

[Nutrient , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 , 20]

[Calories (kcal) , 25 , 884 , 38 , 130 , 448.8 , 149 , 60 ,

23 , 21 , 201]

[Protein (g) , 2.09 , 0 , 1.16 , 2.69 , 0 , 25.56 , 10.51 ,

2.9 , 0.85 , 3.5]

[Fat (g) , 0.42 , 100 , 0.16 , 0.28 , 50.1 , 4.42 , 0.1 ,

0.26 , 0.33 , 11]

[Carbohydrates (g) , 4.65 , 1 , 8.63 , 28.17 , 2.5 , 0 , 5.57

, 3.75 , 4.64 , 23.6]

[Calcium (mg) , 5 , 0.18 , 20 , 10 , 0 , 17 , 20 , 136 , 5 ,

128]

[Iron (mg) , 1.24 , 0.38 , 0.22 , 1.2 , 0 , 0.99 , 2.38 ,

3.57 , 0.45 , 0.09]

[Magnesium (mg) , 10 , 0.01 , 10 , 12 , 0 , 33 , 40 , 87 , 11

, 14]

[Phosphorus (mg) , 104 , 1.22 , 33 , 43 , 0 , 295 , 130 , 56

, 24 , 105]

[Potassium (mg) , 370 , 0 , 157 , 35 , 7.5 , 414 , 212 , 466

, 222 , 199]

[Sodium ((mg) , 0.4 , 0.04 , 3 , 1 , 0.5 , 86 , 5586 , 70 , 9

, 80]

[Zinc (mg) , 0.73 , 0.06 , 0.19 , 0.49 , 0 , 0.71 , 0.43 ,

0.76 , 0.09 , 0.69]

[Copper (mcg) , 0.492 , 0 , 0.06 , 0.069 , 0 , 0.099 , 0.135

, 0.174 , 0.074 , 0.023]

[Vitamin C (mg) , 3.5 , 0 , 6.4 , 0 , 0 , 0 , 0 , 9.8 , 19.1

, 0.6]

[Thiamine (mg) , 0.102 , 0 , 0.042 , 0.163 , 0 , 0.196 ,

0.059 , 0.095 , 0.059 , 0.041]

[Riboflavin (mg) , 0.449 , 0 , 0.02 , 0.013 , 0 , 0.073 ,

0.152 , 0.236 , 0.048 , 0.24]

[Niacin (mg) , 40116 , 0 , 0.148 , 1.476 , 0 , 8.526 , 3.951

, 0.49 , 0.628 , 0.116]

[Pantothenic Acid (mg) , 2.2 , 0 , 0.106 , 0.39 , 0 , 0.865 ,

0.376 , 0.145 , 0.247 , 0.581]

[Vitamin B6 (mg) , 0.097 , 0 , 0.116 , 0.093 , 0 , 0.231 ,

0.2 , 0.242 , 0.08 , 0.048]

[Vitamin B12 (mcg) , 0 , 0 , 0 , 0 , 0 , 3.46 , 0 , 0 , 0 ,

0.39]

[Vitamin A (IU) , 0 , 0 , 0 , 0 , 0 , 136 , 0 , 8190 , 623 ,

409]

# Table 2: Nutritional Values of Various Foods per 100 g of Foodstuff
# Questions:
# 1.
# Low carbohydrate diets are popular for weight loss. Compute (by hand)
# the amount of carbohydrates in each of the following dishes, and
# determine which would be better for such a dieter to choose.  You will
# first need to use Table 1 to convert the kitchen measures into 100
# gram units, then use Table 2 to find the amount of carbohydrates in
# each ingredient.
>
# Spinach omelet: 1/4 cup spinach, 2 eggs, 1/8 cup milk, 1/2 Tbsp. oil
>
# Greek salad: 1 cup lettuce, 1/4 cup feta cheese, 1/2 of a tomato, 1/8
>
# 2.
# To make a stir fry, fry beef and onions in a wok with oil, and top it
# with soy sauce.
# (a)
# You would like to make a stir fry with a total of 6 g carbohydrates,
# 50 g protein, and 3.5 mg vitamin C, and you'd like this dish to
# contain only 575 calories. Use Table 2 to set up a matrix equation
# which could be used to determine whether it is possible to make such a
# stir fry.  Describe the steps you take to produce the vectors in the
# equation.
>
# (b)
# Find a precise recipe for the stir fry in part a).  Convert your
# amounts to common kitchen measures using Table 1.
>
>
# 3.
# Table 2 has been incorporated into the matrix A.
# A := matrix( 20, 20,
# [[215, 39, 43, 73, 152, 263, 30, 116, 14, 61.44, 25, 884, 38, 130,
# 448.8, 149, 60, 23, 21, 201],
#  [26, 2.55, 1.03, 5.3, 10.33, 14.2, 0.55, 9.02, 1.62, 3.29, 2.09, 0,
# 1.16, 2.69, 0, 25.56, 10.51, 2.9, 0.85, 3.5],
#  [11.5, 0.51, 0.19, 2.5, 11.44, 21.3, 0.1, 0.38, 0.2, 3.34, 0.42, 100,
# 0.16, 0.28, 50.1, 4.42, 0.1, 0.26, 0.33, 11],
#  [0, 8.6, 10.1, 7.1, 1.04, 4.09, 7.68, 20.14, 2.37, 4.66, 4.65, 0,
# 8.63, 28.17, 2.5, 0, 5.57, 3.75, 4.64, 23.6],
#  [7, 36, 27, 10, 42, 492.5, 11, 19, 36, 119.4, 5, 0.18, 20, 10, 0, 17,
# 20, 136, 5, 128],
#  [3.1, 1.2, 0.5, 0.6, 1.19, 0.65, 0.12, 3.33, 1.1, 0.05, 1.24, 0.38,
# 0.22, 1.2, 0, 0.99, 2.38, 3.57, 0.45, 0.09],
#  [27, 20, 15, 4, 9, 19.2, 8, 36, 6, 13.44, 10, 0.01, 10, 12, 0, 33,
# 40, 87, 11, 14],
#  [211, 56, 44, 30, 148, 337, 9, 180, 45, 93.4, 104, 1.22, 33, 43, 0,
# 295, 130, 56, 24, 105],
#  [367, 317, 323, 45, 101, 61.8, 129, 369, 290, 151.5, 370, 0, 157, 35,
# 7.5, 414, 212, 466, 222, 199],
#  [69, 21, 35, 354, 270, 1116, 0, 2, 8, 49, 0.4, 0.04, 3, 1, 0.5, 86,
# 5586, 70, 9, 80],
#  [5290, 0.33, 0.2, 0.4, 0.92, 2.88, 0.07, 1.27, 0.25, 0.38, 0.73,
# 0.06, 0.19, 0.49, 0, 0.71, 0.43, 0.76, 0.09, 0.69],
#  [0.143, 0.083, 0.047, 0.1, 0.013, 0.032, 0.044, 0.251, 0.037, 0.01,
# 0.492, 0, 0.06, 0.069, 0, 0.099, 0.135, 0.174, 0.074, 0.023],
#  [0, 62, 9.3, 0, 0, 0, 38.1, 1.5, 24, 0.94, 3.5, 0, 6.4, 0, 0, 0, 0,
# 9.8, 19.1, 0.6],
#  [0.11, 0.107, 0.097, 0.03, 0.044, 0.154, 0.034, 0.169, 0.1, 0.038,
# 0.102, 0, 0.042, 0.163, 0, 0.196, 0.059, 0.095, 0.059, 0.041],
#  [0.25, 0.08, 0.059, 0.07, 0.399, 0.844, 0.02, 0.073, 0.1, 0.162,
# 0.449, 0, 0.02, 0.013, 0, 0.073, 0.152, 0.236, 0.048, 0.24],
#  [4.63, 0.607, 0.928, 1.8, 0.058, 0.991, 0.191, 1.06, 0.5, 0.084,
# 40116, 0, 0.148, 1.476, 0, 8.526, 3.951, 0.49, 0.628, 0.116],
#  [0.34, 0.252, 0.197, 15, 0.934, 0.967, 0.283, 0.638, 0.17, 0.314,
# 2.2, 0, 0.106, 0.39, 0, 0.865, 0.376, 0.145, 0.247, 0.581],
#  [0.4, 0.178, 147, 0.02, 0.109, 0.424, 0.042, 0.178, 0.047, 0.042,
# 0.097, 0, 0.116, 0.093, 0, 0.231, 0.2, 0.242, 0.08, 0.048],
#  [2.27, 0, 0, 0.13, 0.7, 1.69, 0, 0, 0, 0.357, 0, 0, 0, 0, 0, 3.46, 0,
# 0, 0, 0.39],
#  [0, 719, 28129, 509, 654, 447, 259, 8, 2600, 126, 0, 0, 0, 0, 0, 136,
# 0, 8190, 623, 409]] );
>
# What does the
> j^(`th`)#  column in this matrix represent?  Which entry in this
# matrix tells you how much vitamin C is found in 100 g of vanilla ice
# cream?
>
# 4.
# A particularly math-savvy sumo wrestler wanted to adhere to a strict
# diet to maintain his weight and strength.  Table 3 lists his desired
# nutritional intake for one day.  The entries in Table 3 are stored in
# the vector \!\(TraditionalForm\`v\_1\) which follows this exercise.
# Using Table 2 he was able to decide on an optimal diet to give him
# this combination of nutrients.  How much of each of the above foods
# were in his diet?
> H := vector( [`Amount`] ):
> S := vector( [`8279.12 kcal`,
>       `608.81 g`,
>       `387.6 g`,
>       `604.48 g`,
>       `4067.42 mg`,
>       `93.34 mg`,
>       `1714.73 mg`,
>       `8488.03 mg`,
>       `18023.48 mg`,
>       `8846.38 mg`,
>       `36009.75 mg`,
>       `6.67 mcg`,
>       `604.06 mg`,
>       `6.77 mg`,
>       `10.61 mg`,
>       `28212.10 mg`,
>       `103.11 mg`,
>       `189.81 mg`,
>       `51.78 mcg`,
>       `95382.93 IU`] ):
> T3 := blockmatrix( 2, 2, [ C, H, N, S ] ):
> evalm( T3 );

[      Nutrient              Amount   ]
[                                     ]
[   Calories (kcal)       8279.12 kcal]
[                                     ]
[     Protein (g)           608.81 g  ]
[                                     ]
[       Fat (g)             387.6 g   ]
[                                     ]
[  Carbohydrates (g)        604.48 g  ]
[                                     ]
[    Calcium (mg)          4067.42 mg ]
[                                     ]
[      Iron (mg)            93.34 mg  ]
[                                     ]
[   Magnesium (mg)         1714.73 mg ]
[                                     ]
[   Phosphorus (mg)        8488.03 mg ]
[                                     ]
[   Potassium (mg)        18023.48 mg ]
[                                     ]
[    Sodium ((mg)          8846.38 mg ]
[                                     ]
[      Zinc (mg)          36009.75 mg ]
[                                     ]
[    Copper (mcg)           6.67 mcg  ]
[                                     ]
[   Vitamin C (mg)         604.06 mg  ]
[                                     ]
[    Thiamine (mg)          6.77 mg   ]
[                                     ]
[   Riboflavin (mg)         10.61 mg  ]
[                                     ]
[     Niacin (mg)         28212.10 mg ]
[                                     ]
[Pantothenic Acid (mg)     103.11 mg  ]
[                                     ]
[   Vitamin B6 (mg)        189.81 mg  ]
[                                     ]
[  Vitamin B12 (mcg)       51.78 mcg  ]
[                                     ]
[   Vitamin A (IU)        95382.93 IU ]

# Table 3: Sumo Wrestler Diet
>
# The numerical entries from Table 3 can be entered into a Maple session
# with the command
# v1 := vector(  [8279.12, 608.81, 387.6, 604.48, 4067.42, 93.34,
# 1714.73, 8488.03, 18023.48, 8846.38
#                       36009.75, 6.67, 604.06, 6.77, 10.61, 28212.10,
# 103.11, 189.81, 51.78, 95382.93] );
>
# 5.
# The United States Food and Drug Administration (FDA) provides
# Recommended Daily Values for use on food labels.Table 4 gives the
# FDA's recommendations, which are also stored in the vector
# \!\(TraditionalForm\`v\_2\) which  follows this exercise.  Is it
# possible to combine the foods from the table to approximate these
# nutritional values?
> R := vector([`2000 kcal`,
>       `50 g`,
>       `65 g`,
>       `300 g`,
>       `1000 mg`,
>       `18 mg`,
>       `400 mg`,
>       `1000 mg`,
>       `3500 mg`,
>       `2400 mg`,
>       `15 mg`,
>       `2 mcg`,
>       `60 mg`,
>       `1.5 mg`,
>       `1.7 mg`,
>       `20 mg`,
>       `10 mg`,
>       `2 mg`,
>       `6 mcg`,
>       `5000 IU`] ):
> T4 := blockmatrix( 2, 2, [ C, H, N, R ] ):
> evalm( T4 );

[      Nutrient            Amount  ]
[                                  ]
[   Calories (kcal)       2000 kcal]
[                                  ]
[     Protein (g)           50 g   ]
[                                  ]
[       Fat (g)             65 g   ]
[                                  ]
[  Carbohydrates (g)        300 g  ]
[                                  ]
[    Calcium (mg)          1000 mg ]
[                                  ]
[      Iron (mg)            18 mg  ]
[                                  ]
[   Magnesium (mg)         400 mg  ]
[                                  ]
[   Phosphorus (mg)        1000 mg ]
[                                  ]
[   Potassium (mg)         3500 mg ]
[                                  ]
[    Sodium ((mg)          2400 mg ]
[                                  ]
[      Zinc (mg)            15 mg  ]
[                                  ]
[    Copper (mcg)           2 mcg  ]
[                                  ]
[   Vitamin C (mg)          60 mg  ]
[                                  ]
[    Thiamine (mg)         1.5 mg  ]
[                                  ]
[   Riboflavin (mg)        1.7 mg  ]
[                                  ]
[     Niacin (mg)           20 mg  ]
[                                  ]
[Pantothenic Acid (mg)      10 mg  ]
[                                  ]
[   Vitamin B6 (mg)         2 mg   ]
[                                  ]
[  Vitamin B12 (mcg)        6 mcg  ]
[                                  ]
[   Vitamin A (IU)         5000 IU ]

# Table 4: FDA Daily Recommended Values
>
# The numerical entries from Table 4 can be entered into a Maple session
# with the command
# v2 := vector(  [2000, 50, 65, 300, 1000, 18, 400, 1000, 3500,
#                       2400, 15, 2, 60, 1.5, 1.7, 20, 10, 2, 6, 5000]
# );
>
>
# Reference

﻿