# Maximize linear equation with 2 variables

How do I maximize the following equation:

$$150 \le 9.05x + 18.89y \\ \text{constraints: } \\ x > 0, y > 0 \\ \text{x and y must be whole numbers.}$$

I cannot use calculus to solve this question, which would have been easy if I could.

The student council is planning a school dance. There will be an opportunity for students to purchase refreshments. The council is going to sell chocolate bars but also wants to offer snacks to students who do not like chocolate bars (or who may have food allergies!)

Ashley, a member of the student council, researched prices at two stores.
She found 3 types of non-chocolate bars, Zagnut, Zero and PayDay. The prices of boxes of the bars at two different stores are shown below:

$$\begin{array}{c|c} \text{COSCO}&\text{WALMART}\\ \hline \text{Box of }24\text{ Zagnut bars: }\12.49&\text{Box of }18\text{ Zagnut bars: }\9.05\\ \text{Box of }18\text{ Zero bars: }\9.89&\text{Box of }12\text{ Zero bars: }\6.69\\ \text{Box of }36\text{ PayDay bars: }\18.89&\text{Box of }6\text{ PayDay bars: }\4.45 \end{array}$$

The student council has $\$150$cash available for the initial purchase of these non-chocolate bars. They want to offer at least two types of the non-chocolate bars for the students to purchase at the dance. Your job is to: • decide which bars the student council should purchase and from where to purchase them. You must purchase at least two types of bars (or all 3) • fill in the shopping list provided, clearly indicating your choice of bar and quantity. • set the price for the sale of the bars at the dance knowing that the Student Council must make a profit of at least$\$200$.
• Justify the choices that you make to solve the problem
-
What are you trying to maximize? You need some objective function (missing) as well as constraints. – ncmathsadist Jul 19 '12 at 1:08
its hard enough to explain the problem here because I have it scanned... should I just post a link to the problem? – Nerd in Training Jul 19 '12 at 1:15
Please attach any material relevant to the question. – user2468 Jul 19 '12 at 1:22
Honestly, this seems like a silly exercise. I set the price of each bar to be $100. Therefore, I profit. There are no constraints given in the problem statement that govern consumer behavior. – Emily Jul 19 '12 at 2:36 ## 1 Answer To solve the problem in your link, what you really want to do is model income and expense. To model expense, define the following variables •$x_c$: the boxes of Zagnut bars bought from cosco •$y_c$: the boxes of Zero bars bought from cosco •$z_c$: the boxes of payday bars bought from cosco •$x_w$: the boxes of Zagnut bars bought from Walmart •$y_w$: the boxes of Zero bars bought from Walmart •$z_w$: the boxes of payday bars bought from Walmart Then, you have that your expenses are$12.49x_c+9.89y_c+18.89z_c+9.05x_w+6.69y_w+4.45z_w \le 150$. Then, you model your income:$p_xn_x+p_yn_y+p_zn_z \ge 350$where$p_x$is the sales price for a Zagnut bar, and$n_x$are the number of bars sold. However, you don't know if you're going to sell out or not; furthermore, there is no information given as to whether your sales rates are affected by$p_w$. If you assume you sell out, then$n_x = 24x_c+18x_w$, and so on. I still don't see this as an optimization problem, however, as there appears to be nothing preventing you from pricing each bar at$1000 and calling it a day.

Community Wiki'd as this is just an extended comment.

-