假如覺得推線麻煩,可以有更快的方法猜到最大頂點/最小頂點嗎?當然有!同樣利用上面的範圍,求 f(x, y) = 2x − 3y 的最大值與最小值。
我們可以假設,x 與 y 分別是爸爸和媽媽,他們每天都會給你零用錢/問你拿家用,數量就視乎函數中 x 和 y 前面的數值,例如上述情況,每個 x 會給你 2 元,每個 y 則收取你 3 元;在這情況下,想自己得到最多的錢,就應該「x 有咁大攞咁大,y 有咁細攞咁細」;於是乎對於 (−1, 2)、(3, 5)、(2, 1) 呢三個頂點,我哋會見到 (2, 1) 係最大值,因為 x 係裡面最大,y 係裡面最細;至於另外兩個邊個係最小值就有啲難比較,所以都係代數入函數計算最穩陣:f(2, 1) = 1、f(−1, 2) = −8、f(3, 5) = −9。最大值為 1(在 (2, 1)),最小值為 −9(在 (3, 5))。
If pushing the line is a bother, there is a faster way to guess the best vertex. With the same region, find the maximum and minimum of f(x, y) = 2x − 3y.
Think of x and y as your father and mother: every day x gives you $2 for each unit of x, and y takes $3 for each unit of y. To end up with the most money you want "as much x as possible, as little y as possible". Among (−1, 2), (3, 5) and (2, 1), the vertex (2, 1) has the biggest x and the smallest y, so it gives the maximum. The other two are harder to compare by eye, so substituting into the function is the safest: f(2, 1) = 1, f(−1, 2) = −8, f(3, 5) = −9. The maximum is 1 at (2, 1) and the minimum is −9 at (3, 5).