【線性規劃:可行區域及最大值、最小值】Linear Programming: Feasible Region and the Maximum or Minimum Value
SketchMath 數學團隊 SketchMath Maths Team | 更新 Updated 2026-10-20
逐條畫出不等式,塗出所有條件同時成立的可行區域,求出它的頂點,再把頂點代入目標函數P = ax + by。最大值及最小值必定出現在頂點。Draw each inequality, shade the feasible region where all hold, find its vertices (corner points), and evaluate the objective functionP = ax + by at each one. The maximum and minimum occur at vertices.
拖動 k:直線 2x + 3y = k 掃過塗了色的可行區域。它最後接觸的點是頂點 (4, 4),此時 k = 20,即例題 1 的最大值。 Drag k: the line 2x + 3y = k sweeps across the shaded feasible region. The last point it touches is the vertex (4, 4), where k = 20 is the maximum of Example 1. 自己試試 → Try it yourself →
線性規劃步驟 Linear Programming Steps
邊界線Boundary lines≤, ≥ 用實線;<, > 用虛線Solid for ≤, ≥; dashed for <, >
哪一邊?Which side?代入測試點,例如 (0, 0)Test a point such as (0, 0)
頂點Vertices解在每個角相交的兩條邊界方程Solve the two boundary equations that meet at each corner
A boundary line splits the plane in two. Test a point such as (0, 0): if it satisfies the inequality, shade its side. Use a solid line for ≤, ≥ and a dashed line for <, >.
移動測試點 P:在塗了色的一邊符合 x + y ≤ 8,在另一邊則不符合。 Slide the test point P: it satisfies x + y ≤ 8 on the shaded side and fails on the other. 自己試試 → Try it yourself →
在 x ≥ 0, y ≥ 0, x + y ≤ 8, x + 2y ≤ 12 的條件下,求 P = 2x + 3y 的最大值。Find the maximum value of P = 2x + 3y subject to x ≥ 0, y ≥ 0, x + y ≤ 8, x + 2y ≤ 12.
頂點:(0, 0)、(8, 0)、(0, 6),以及 x + y = 8 與 x + 2y = 12 的交點 (4, 4)Vertices: (0, 0), (8, 0), (0, 6), and the meeting point of x + y = 8 and x + 2y = 12: (4, 4)
各頂點的 P:0、16、18、20P at the vertices: 0, 16, 18, 20
答案: Answer: 最大值 P = 20(在 (4, 4))Maximum P = 20 at (4, 4)
例題 2 Example 2:另一個目標函數 Another objective
在 x ≥ 0, y ≥ 0, 2x + y ≤ 10, x + 3y ≤ 15 的條件下,求 x + y 的最大值。Find the greatest value of x + y subject to x ≥ 0, y ≥ 0, 2x + y ≤ 10, x + 3y ≤ 15.
頂點:(0, 0)、(5, 0)、(0, 5),以及由 2x + y = 10、x + 3y = 15 得出的 (3, 4)Vertices: (0, 0), (5, 0), (0, 5), and (3, 4) from 2x + y = 10, x + 3y = 15
⚠️ 不要漏掉兩條斜線的交點 Do not forget the vertex from two slanted lines最優值常出現在兩條限制線的交點,必須解聯立方程才能求出。The optimum is often at the point where two constraint lines cross, which you must find by solving simultaneous equations.
⚠️ 整數解 Integer answers若 x 及 y 必須是整數,要檢查最優頂點附近的整點;頂點本身可能不符合要求。If x and y must be whole numbers, check lattice points near the best vertex; the vertex itself may not be allowed.
溫習方法:點擊以下任何題目,即時在坐標網格載入並核對計算步驟。How to study: click any question to load it on the coordinate grid and check your steps.
(求最大值 Maximise)塗出 x ≥ 0, y ≥ 0, 3x + 2y ≤ 18, x + 4y ≤ 16 的區域,並求 5x + 4y 的最大值。Shade the region x ≥ 0, y ≥ 0, 3x + 2y ≤ 18, x + 4y ≤ 16 and find the maximum of 5x + 4y.
(應用題 Word problem)某店售賣 A、B 兩款貨品。列出存貨及時間限制的不等式,並求最佳組合。A shop sells packs of A and B. Write the constraints for a stock and time limit and find the best mix.
(解釋 Explain)為何線性函數在多邊形區域上的最大值會在頂點出現?Why does the maximum of a linear function on a polygon occur at a vertex?
同時滿足所有不等式的點所組成的區域。
The set of points that satisfy all the inequalities at the same time.
把目標函數代入可行區域每個頂點,取最大的值。亦可把 P 為常數的直線在區域上平移。
Evaluate the objective function at every vertex of the feasible region and choose the largest value. You can also slide a line of constant P across the region.
最大值或最小值可能不存在。要檢查目標函數增大的方向。
A maximum or minimum may not exist. Check the direction in which the objective function grows.