Functions
Here you’ll learn how to use the ruler method for linear optimization.
Rule
The Ruler Method
- 1.
- Set up inequalities based on the text. We’ll be talking about a number of units, so it’s natural to say that and , because it’s impossible to produce a negative number of units.
- 2.
- Solve the inequalities you found for , so that they look like functions .
- 3.
- Draw the graphs of these functions in a coordinate system. Because and , you only need to graph within the first quadrant.
- 4.
- Mark the area that is surrounded by the graphs!
- 5.
- Find the equation for the lines of the objective function. Use the objective function that denotes the thing you want to optimize: Profit, income, or something else.
The objective function can be found by summing the “price per unit” multiplied by the “number of units” for all the items you have. Then it looks like this:
where is the price of an item that has sold units and is the price of an item that has sold units.
You can swap with a constant, . Solve the equation for so that you have a linear function you can move around:
The only thing that matters here is the slope of the function, . The constant term changes all the time, because you change the value of to move the line outwards in the coordinate system.
- 6.
- Draw the line for the objective function you found in the previous point so that it passes through the outermost point of the area surrounded by the graphs.
- 7.
- Read off the coordinates of this point. This is the optimal point
- 8.
- Find the profit/income by inserting the coordinates of the optimal point into .
Example 1
A factory that produces brands will make a shirt and a skirt for Tom Ford. Both pieces have to be made of cashmere and silk. To make a shirt, you need two lengths of cashmere and one length of silk. To make a skirt, you need one length of cashmere and three lengths of silk. The factory has 200 lengths of cashmere and 300 lengths of silk available. A shirt is sold for , while a skirt is sold for . How many shirts and skirts does the factory have to produce to maximize its income, and what is this income?
Item 1
First, you set up the constraints described in the text as inequalities. Let be the number of shirts produced and be the number of skirts produced. The cashmere and the silk has to be distributed between the shirts and skirts. That gives you these inequalities:
-
The number of shirts you produce can be no shirts, or more. This means that
-
The number of skirts you produce can be no skirts, or more. That gives you
-
Now you must construct an inequality for the available cashmere. You need two lengths for a shirt, and one length for a skirt. The roll has a total of lengths. That results in
-
Next, you make an inequality for the available silk. You need one length for a shirt and three lengths for a skirt. The roll has lengths of silk. That would be
You end up with this system of inequalities:
Item 2
Now you need solve the inequalities with respect to . First, inequality (3):
Inequality (4):
You don’t have to do anything with the other two inequalities.
Items 3 and 4
Graph the two inequalities in a coordinate system and mark the area where they overlap. You know that you only need the first quadrant because both and is greater than or equal to 0. That should give you this figure:
Item 5
Find the optimal point using this figure. You know that it is one of the points within the marked area where the graphs intersect, or where the graphs intersect the axes.
When you use the ruler method, you have to find the expression for the objective function . You know that a shirt costs $ and that a skirt costs $. Insert these prices for and in the expression and solve for . Then you get
Item 6
Because the term with the constant term in it isn’t important when you push the line outwards in the first quadrant, you can choose any value for it that you want. It’s smart to begin by picking a value on the -axis that lies within the marked area. In the figure below, the constant term has been chosen to be . It looks like this:
Item 7
You read off the coordinates of the point and find that . That means the factory should produce shirts and skirts in order to maximize their income.
Item 8
You find the income of the factory at the optimal point by inserting the -value and the -value you found in Item 7 into the objective function. That means and , and you get
The factory earns $ by producing shirts and skirts. This is the optimal production, because it was the outermost point in the marked area that the line of the objective function intersected.