Video Transcript
Given the graph below and that 𝑥 is greater than or equal to zero, 𝑦 is greater than or equal to zero, 𝑥 plus 𝑦 is less than or equal to seven, and 𝑦 is greater than or equal to five, determine at which point the function 𝑝 equals three 𝑥 minus 𝑦 has its maximum using linear programming.
Okay, in this example, we’re given these four constraints, and those constraints are depicted in our figure. It’s the orange-shaded region that shows us the allowable values for 𝑥 and 𝑦 given our restrictions. Along with this, we’re given this function 𝑝 equals three 𝑥 minus 𝑦. We can call this our objective function. This is the function we want to maximize within our given constraints. The idea, then, is that we take our objective function and we plug in 𝑥, 𝑦 coordinate pairs where those pairs, the 𝑥, 𝑦 points, are taken from the orange-shaded region in our graph.
The point from this area that gives us the largest value of 𝑝 compared to all the other values will be the point that maximizes this objective function. Now, in this orange-shaded region, there are actually infinitely many points. But thankfully, due to a proof that we won’t give here, it’s only the points at the vertices of this region — at the points labeled 𝐴, 𝐵, and 𝐶 — which could lead to a maximum value in our objective function. This means it’s really only these three points that we need to test.
Note that there’s a fourth point labeled on our graph called point 𝐷. Because this point is outside of the allowed or feasible region though, the one shaded in orange, we won’t consider it. Our next step, then, is to figure out the coordinates of these three points 𝐴, 𝐵, and 𝐶. For point 𝐴, we can see that this lies along the line 𝑥 equals zero and the line 𝑦 equals five. Point 𝐵 has the same 𝑦-value as point 𝐴 with an 𝑥-value of two. Point 𝐶 has an 𝑥-value of zero and a 𝑦-value of seven. So then, these are the three points we’ll test in our objective function.
Substituting in the coordinates of point 𝐴, we have three times zero minus five. That’s negative five. Then for point 𝐵, we have three times two minus five. That’s positive one. And lastly, point 𝐶, three times zero minus seven equals negative seven. Of these three points, the maximum value is positive one. And that corresponds to the coordinates of point 𝐵.
We can say then that it’s at point 𝐵 at which our objective function reaches its maximum value.