Here, you’ll learn how to use the substitution method for linear optimization.
Rule
Theory
The objective function is often a profit or income function that is determined by $A$, which is the cost of an item that has sold $x$ units, and $B$, the cost of an item that has sold $y$ units.
$$Z(x,y)=Ax+By$$ |
Example 1
A factory that produces branded merchandise 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 $\text{\$}\text{}295\text{}$, while a skirt is sold for $\text{\$}\text{}450\text{}$. How many shirts and skirts does the factory have to produce to maximize its income, and what is this income?
First, you set up the constraints from the text as inequalities. Let $x$ be the number of shirts produced and $y$ be the number of skirts produced. The cashmere and the silk has to be distributed between shirts and skirts. That gives you these inequalities:
The number of shirts you produce can be no shirts, or more. This means that
$$x\ge 0$$ |
The number of skirts you produce can be no skirts, or more. That gives you
$$y\ge 0$$ |
Now you set up 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 $200$ lengths. That means the inequality is as follows:
$$2x+y\le 200$$ |
Next, you write out an inequality for the available silk. You need one length for a shirt and three lengths for a skirt. The roll has $300$ lengths of silk. That results in:
$$x+3y\le 300$$ |
You end up with this system of inequalities:
$$\begin{array}{lll}\hfill x& \ge 0\phantom{\rule{2em}{0ex}}& \hfill \text{(1)}\phantom{\rule{0.33em}{0ex}}\\ \hfill y& \ge 0\phantom{\rule{2em}{0ex}}& \hfill \text{(2)}\phantom{\rule{0.33em}{0ex}}\\ \hfill 2x+y& \le 200\phantom{\rule{2em}{0ex}}& \hfill \text{(3)}\phantom{\rule{0.33em}{0ex}}\\ \hfill x+3y& \le 300\phantom{\rule{2em}{0ex}}& \hfill \text{(4)}\phantom{\rule{0.33em}{0ex}}\end{array}$$Now you need solve the inequalities with respect to $y$. First, inequality (3):
$$\begin{array}{llll}\hfill 2x+y& \le 200\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill y& \le 200-2x\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$$Inequality (4):
$$\begin{array}{llll}\hfill x+3y& \le 300\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill 3y& \le 300-x\phantom{\rule{1em}{0ex}}|\xf73\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill y& \le 100-\frac{1}{3}x\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$$You don’t have to do anything about the other two inequalities.
Graph the two inequalities in a coordinate system and mark the area where they overlap. You know that you only need to graph in the the first quadrant, because both $x$ and $y$ are greater than or equal to 0. That should give you this figure:
Find the optimal point from 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 substitution method, you have to find all the points of intersection. You can see from the graph that
Point $A$ is where $x+3y=300$ intersects the $y$-axis. There, $x=0$. That gives you
$$\begin{array}{llll}\hfill 0+3y& =300\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill 3y& =300\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill y& =100\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$$This is the point $A=\phantom{\rule{-0.17em}{0ex}}\left(0,100\right)$, which represents producing $0$ shirts and $100$ skirts.
Point $B$ is where $x+3y=300$ intersects $2x+y=200$. This gives you a system equations to solve. You previously rewrote inequalities (3) and (4) so that $y$ was on the left. If you considered them as equations instead, you would get the same answer, except you exchange $\le $ for an equal sign. That means you have
$$\begin{array}{llll}\hfill y& =200-2x\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill y& =100-\frac{1}{3}x\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$$Now you can set the expressions for $y$ equal to each other and get
$$\begin{array}{llllll}\hfill 200-2x& =100-\frac{1}{3}x\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill 200-100& =2x-\frac{1}{3}x\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill 100& =2x-\frac{1}{3}x\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{1em}{0ex}}|\cdot 3\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill 300& =6x-x\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill 300& =5x\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{1em}{0ex}}|\xf75\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill 60& =x\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$$Insert this into $y=200-2x$, as that is the simplest expression. You get that
$$y=200-2\cdot 60=200-120=80$$ |
This gives you the point $B=\phantom{\rule{-0.17em}{0ex}}\left(60,80\right)$, which represents producing $60$ shirts and $80$ skirts.
Point $C$ is where $2x+y=200$ intersects the $x$-axis. There, $y=0$. That gives you
$$\begin{array}{llll}\hfill 2x+0& =200\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill 2x& =200\phantom{\rule{1em}{0ex}}|\xf72\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill x& =100\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$$This gives you the point $C=\phantom{\rule{-0.17em}{0ex}}\left(100,0\right)$, which represents the production of $100$ shirts and $0$ skirts.
Point $D=\phantom{\rule{-0.17em}{0ex}}\left(0,0\right)$ represents producing $0$ shirts and $0$ skirts.
The different points above show different production combinations for shirts and skirts.
You calculate the income of the factory by putting the $x$-values and $y$-values you found in the previous point into the income function $Z(x,y)$ and see which point gives the largest answer.
You know that a shirt costs $$295$ and that a skirt costs $$450$. Insert those for $A$ and $B$ in the $Z(x,y)$ formula $(Z(x,y)=Ax+By)$, which gives you
$$Z(x,y)=295x+450y$$ |
You now calculate the income from the various productions:
The income $Z$ for the point $A=\phantom{\rule{-0.17em}{0ex}}\left(0,100\right)$ is
$$\begin{array}{llll}\hfill Z(0,100)& =295\cdot 0+450\cdot 100\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =45\phantom{\rule{0.17em}{0ex}}000\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$$The income $Z$ for the point $B=\phantom{\rule{-0.17em}{0ex}}\left(60,80\right)$ is
$$\begin{array}{llll}\hfill Z(60,80)& =295\cdot 60+450\cdot 80\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =17\phantom{\rule{0.17em}{0ex}}700+36\phantom{\rule{0.17em}{0ex}}000\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =53\phantom{\rule{0.17em}{0ex}}700\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$$The income $Z$ for the point $C=\phantom{\rule{-0.17em}{0ex}}\left(100,0\right)$ is
$$\begin{array}{llll}\hfill Z(100,0)& =295\cdot 100+450\cdot 0\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =29\phantom{\rule{0.17em}{0ex}}500\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$$The income $Z$ for the point $D=\phantom{\rule{-0.17em}{0ex}}\left(0,0\right)$ is
$$\begin{array}{llll}\hfill Z(0,0)& =295\cdot 0+450\cdot 0,\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\\ \hfill & =0\phantom{\rule{2em}{0ex}}& \hfill & \phantom{\rule{2em}{0ex}}\end{array}$$That means the factory earns $$53\phantom{\rule{0.17em}{0ex}}700$ by producing $60$ shirts and $80$ skirts. This is the optimal production, because the other production volumes resulted in lower earnings.