The RIGHT Way To Solve Optimization Problems

The RIGHT Way To Solve Optimization Problems

Folded box for optimization problems

Your Math class may have introduced you to a type of word problem called an optimization problem, sometimes referred to as a min / max problem.  The objective of these is always the same: to find the maximum or minimum possible value of some quantity named in the problem.  

The weird thing about these problems is that you typically encounter them TWICE during your math career — once in Algebra class, and then again in Calculus class.  The only difference is that once you get to Calculus, you have more advanced math techniques to handle one particular step in the process.  And other than that one step, the procedure to handle these problems is exactly the same between the two math classes.

Since the process for solving these problems is almost exactly the same, I am going to describe a way to handle them that will apply to your situation equally well whether you are in Algebra or Calculus class.  The general process is as follows:

  1. Define all the variables that you are going to use — draw a picture if necessary.
  2. Create two statements: an OPTIMIZATION Statement, and a CONSTRAINT Statement.
  3. Use the Constraint Statement to eliminate one of the variables in the Optimization Statement so there is only one variable on the right side of the Optimization Statement.
  4. Perform the optimization — either by using the Vertex Formula in Algebra class, or the First Derivative Test in Calculus class.

Let’s look at an example to illustrate the method.

A farmer wants to create a rectangular fenced enclosure adjacent to his barn, so that the barn wall will serve as one of the sides and no fencing will be needed there.  If the farmer has 600 feet of fencing available, what are the dimensions of the rectangle that provides the largest area for the enclosure?

I do need to mention at this point that I chose to include this problem because it is honestly the most frequently repeated math problem of this type that I have seen anywhere.  With a quick Google search, I found variants of this problem, each with its own unique length of available fencing, here, here, here, and here.  So I am guessing that there is at least a decent chance that you received a similar problem as part of your class- or homework.  If that turns out to be the case, you’re welcome!

Following the process I outlined above, I will start with a picture of the situation described in the problem and choose my variables.  A good strategy is to create variables to match whatever quantities the problem asks for.  In this case, the problem is asking for the dimensions of the rectangle, that is, the length and width, so I will label those quantities x and y:

Three-sided fence, for optimization problems

I now need to create two statements.

The Optimization Statement is an equation to express the quantity that I am trying to optimize (that is, either maximize or minimize) in terms of the variables I established earlier.  In this case, I want to maximize the area, and happily I know how to express the area of my rectangle in terms of x and y:

A = x ∙ y           (Optimization Statement)

The Constraint Statement is a second equation which limits the possible values of my defined variables.  There has to be something that will place limits on what x and y can be, otherwise what is to stop me from making my rectangle a million miles on a side?  In this case, the length of available fencing is the basis for my constraint.  Noting that the length of fencing material will have to be used for one length and two widths of the rectangle, I can write:

x + 2y = 600           (Constraint Statement)

I do need to confess that the phrases “Optimization Statement” and “Constraint Statement” are terms that I made up and use with my tutoring clients, but are not part of established math vocabulary.  So if you mention “Optimization Statement” in class, neither your classmates nor the teacher are going to know what you are talking about.

I am almost ready to perform the optimization, but I note that I cannot do it just yet, as the Optimization Statement has more than one variable on the right side — it is an expression with both x and y in it.  Whether I am doing this for Algebra class or Calculus class, I can’t proceed if there is more than one variable on the right side of this equation.

So what can I do?  I will have to solve for one of the variables in the Constraint Statement, and plug it into the Optimization Statement to reduce the number of variables.  I can solve for x in the Constraint Statement:

x = 600 – 2y

And plug that expression for x into the Optimization Statement:

A = (600 – 2y) ∙ y

    = 600y – 2y2

Now, the next step will be different depending on what math class I am in, Algebra or Calculus.  I will do this problem the Algebra way and will show a Calculus example later.

In the context of Algebra class, I notice that my equation for area now features a quadratic in y on the right side, and so its graph would look like a parabola.  The maximum of this parabola will be at the vertex, which I can find using the Vertex Formula.  As a reminder, the Vertex Formula tells us that if we have a quadratic equation in the form y = ax2 + bx + c, then the x-coordinate of the vertex can be found at x = -b / 2a.  (If you would like additional resources on the Vertex Formula, you can find some on OpenStax or Khan Academy.)  For my problem, b = 600 and a = -2, so the vertex will be at

y = -b / 2a = -(600) / 2(-2) = 150

So the width of the rectangle will be 150 feet.  To find the length, I can plug my newly found value for y back into the Constraint Statement:

x = 600 – 2y = 600 – 2(150) = 300

So the enclosure should be 150 by 300 feet to enclose the maximum area.

Here is another question I see very commonly:

A company is selling concert lightsticks.  At the current price per lightstick of $70, the company sells 500 lightsticks every week.  Their research indicates that for every $1 increase in price, they will sell 5 fewer lightsticks per week.  What should the company price its lightsticks at to maximize revenue?

Many clients have trouble with this kind of problem, because they don’t have enough experience in finance to know what to do about the Optimization Statement.  I know from the problem statement that the quantity that I want to maximize is revenue, but what does that mean?

Revenue is just the total amount of money that a company makes, and it is just the price per item times the number of items that are sold.  For instance, if the company in the problem above is selling 500 lightsticks per week at a price of $70, then the total amount of money it makes in a week is just (500)(70) = $35,000.  If we define variables p for the price and q for the quantity sold, then the Optimization Statement becomes just 

R = p ∙ q           (Optimization Statement)

where R is the revenue that we want to maximize.

Now how to set up the Constraint Statement?  Well, I know it must have something to do with selling fewer lightsticks when the price goes up.  I don’t know what the relationship between p and q is supposed to be, so I am going to set up a table of different values of p and determine what the corresponding values of q will be in each case.  I can start at p = 70, q = 500, and decrease q by 5 each time I increase p by 1:

Price (p)Quantity sold (q)
$70500
$71495
$72490
$73485

Some textbooks and websites will define a variable x that means “the number of $1 price hikes” or something like that, but I think it is just as easy to stick with the variables p and q and to find a way to express q in terms of p.  Assuming that the relation between p and q is linear, we can find the slope of the line that relates them using the typical comparison between two points:

m = (y2 – y1) / (x2 – x1)

    = [(495) – (500)] / [(71) – (70)]

    = -5

So I can write a relationship between p and q using point-slope form, like this:

(q – 500) = -5∙(p – 70)           (Constraint Statement)

I can rewrite this as

q = -5p + 850

So that I can substitute it back into the Optimization Statement, like so:

R = p ∙ (-5p + 850)

    = -5p2 + 850p

I can now use the Vertex Formula again to get

p = -b / 2a

  = -(850) / 2(-5) = 85

So the company should sell its lightsticks for $85 each.  It will sell q = -5(85) + 850 = 425 of them per week at this price and will make $36,125 in revenue for the whole week.

Let’s do one final example, this time requiring Calculus.  If you have not started a Calculus class yet, no worries!  You can still follow along up until I generate the Optimization Statement — you will just have to take the final result on faith for now.

A boy takes a 7 by 15 inch piece of cardboard, cuts identical squares in each corner, and then folds up the sides to make an open top box.  What should the side length of the square cutouts be in order to produce a box of the largest volume?

Folded box for optimization problems

Since the problem is asking for the length of a side of the square cutouts, I will let x be equal to that length.  When I fold up the sides, the base of the new box will be 2x less in both width and length than the width and length of the original cardboard, since I used the extra length and width to form the sides of the box.  So the volume of the box is

V = (15 – 2x)(7 – 2x)x           (Optimization Statement)

Wait, where is the Constraint Statement?  In this case, I don’t need one!  Remember that the purpose of the Constraint Statement is to eliminate one of the variables in the Optimization Statement so that there is only one variable on the right hand side.  But in this case, there is already just one variable — x — so a Constraint Statement is not needed.

I can multiply out the expression for V to get

V = 4x3 – 44x2 + 105x

This is a cubic equation, so I am not able to use the Vertex Formula for this problem.  If you are taking Calculus, you may know that I can find a critical point of the volume function by taking the derivative of the expression instead and setting that derivative to 0.  This will give me my maximum.

dV/dx = 12x2 – 88x + 105 = 0

This factors into

(2x – 3)(6x – 35) = 0

x = 3/2, 35/6

This suggests that the square cutouts should be either 1.5 inches on a side or 35/6 = just short of 6 inches on a side.  If I look back at my picture, however, I can see that I can’t make the square cutouts 35/6 inches across, because two such cutouts would be larger than the entire width of 7 inches.  I can therefore conclude that the cutout which results in the maximum volume is 1.5 inches on a side.  (If I have any doubts that this is a maximum and not a minimum, I can always perform the First Derivative Test to be sure.)

I hope you find my post helpful!  If you would like more help for any level of Math, I would love to work with you on 1:1 tutoring.  Please see my website at https://andrewjeungtutoring.com .

 

Leave a Reply

Your email address will not be published. Required fields are marked *