Skip to main content
Examonaut

Topic 5 · Lesson 2 of 5

Graphical solution

Drawing the feasible region

Draw each constraint as a line (find two points, for example where it crosses the axes) and decide which side is allowed by testing a point such as the origin. The feasible region is the set of points that satisfy every constraint. Exam questions often ask you to shade the regions that are not wanted, leaving the feasible region R clear and labelled (in the figure below, R itself is shaded instead); always follow what the question says.

0123456789012345678x + y = 7x + 3y = 152x + y = 12Rxy

The objective line method

For the objective P=3x+2yP = 3x + 2y, every line 3x+2y=k3x + 2y = k has the same gradient, −32-\frac{3}{2}. Draw one such line, for example 3x+2y=63x + 2y = 6, through (2,0)(2, 0) and (0,3)(0, 3). Then slide a ruler parallel to it, away from the origin to maximise. The last point of R that the line touches is the optimal point. To minimise, slide towards the origin instead and find the first point touched.

The optimum is always at a vertex of R (or along an edge, if the objective line is parallel to it, when every point on that edge is optimal).

The vertex method

Find the coordinates of every vertex, by solving the equations of the lines that meet there, and evaluate the objective at each. Choose the best.

Worked example

Graphical solution

For the problem in the figure, the vertices of R are (0,0)(0, 0), (6,0)(6, 0), (5,2)(5, 2), (3,4)(3, 4) and (0,5)(0, 5).

Show solution
  1. (5,2)(5, 2) is where x+y=7x + y = 7 meets 2x+y=122x + y = 12: subtracting gives x=5x = 5, then y=2y = 2.
  2. (3,4)(3, 4) is where x+y=7x + y = 7 meets x+3y=15x + 3y = 15: subtracting gives 2y=82y = 8.
  3. P=3x+2yP = 3x + 2y at the vertices: 00, 1818, 1919, 1717, 1010.
  4. The maximum is P=19P = 19 at x=5x = 5, y=2y = 2.

How the optimal point depends on the objective

At a vertex where two constraint lines meet, the vertex is optimal while the gradient of the objective line lies between the gradients of those two lines. At (5,2)(5, 2) the lines have gradients −2-2 and −1-1, so for an objective P=ax+byP = ax + by, (5,2)(5, 2) is optimal when 1≤ab≤21 \leq \frac{a}{b} \leq 2.

Integer solutions

If the variables must be whole numbers and the optimal vertex is not, test the integer points in R near the vertex (check each one satisfies every constraint) and choose the best. Simply rounding the vertex can give a point outside R, or not the best integer point. A useful trick is to draw the objective line through the vertex and move it back towards the origin until it first meets an integer point in R.

Minimisation

For a cost to be minimised, the feasible region is often unbounded, away from the origin. The minimum is at the vertex the objective line meets first as it moves away from the origin. Such a problem has no maximum.

Practise this topic

Both are part of Premium.