Skip to main content
Form 5 maths

Inequalities and linear programming

Quadratic and compound inequalities, and linear programming: drawing the feasible region and finding the maximum or minimum. Part of the unit is Foundation and part is NF.

What you will learn

  • 8.1 Compound linear inequalities with "and" or "or"; triangle inequality problems.
  • 8.2 Quadratic inequalities by the graphical method.
  • NF 8.3 Quadratic inequalities by the algebraic method.
  • NF 8.4 Graphs of linear inequalities in two unknowns.
  • NF 8.5 Systems of linear inequalities in two unknowns.
  • NF 8.6 Linear programming.

You need first: Linear inequalities in one unknown, Quadratic equations in one unknown, Equations of straight lines

Key terms

English中文
compound inequality複合不等式
"and" / "or"「和」/「或」
quadratic inequality一元二次不等式
triangle inequality三角不等式
linear inequality in two unknowns二元一次不等式
feasible region (solution region)可行解區域
objective function目標函數
linear programming線性規畫

Standard steps

Compound inequalities

  1. Solve each part separately.
  2. Draw both on one number line.
  3. "and": the overlap only. "or": everything covered by either part.

Triangle inequality

The sum of any two sides is greater than the third side.

  1. Write all three inequalities: a + b > c, a + c > b and b + c > a.
  2. Solve each one for the unknown side.
  3. Combine them: the unknown side lies between the difference and the sum of the other two sides.

Quadratic inequality

  1. Move everything to one side and factorise (or find roots with the formula).
  2. Sketch the parabola through the roots (a > 0 opens up).
  3. "< 0" means below the x-axis: between the roots.
  4. "> 0" means above: outside the roots.
y = (x + 2)(x − 3)
  \         /
---•-------•---      x² − x − 6 < 0   →   −2 < x < 3   (below)
   −2  \_/  3        x² − x − 6 > 0   →   x < −2 or x > 3 (above)

Linear programming (NF)

  1. Define the unknowns: "Let x be the number of …".
  2. Write the constraints as inequalities, including x ≥ 0, y ≥ 0 and "integers" if needed.
  3. Draw each boundary line and find the feasible region, where every constraint is true. Follow the question's shading convention.
  4. Find the vertices of the region (solve pairs of boundary lines simultaneously).
  5. Test the objective function at each vertex. The maximum or minimum is at a vertex.
  6. If the answer must be an integer and a vertex isn't, test the nearby integer points inside the region.

Why a vertex: the objective function is a straight line sliding across the region; it last touches the region at a corner.

Worked examples

Example 1: Compound inequalities: solve 2x − 1 < 5 and 3 − x ≤ 4.
2x − 1 < 5   →  x < 3
3 − x ≤ 4    →  x ≥ −1
"and":  −1 ≤ x < 3
Example 2: Quadratic inequality (NF): solve x² − x − 6 < 0.

(x + 2)(x − 3) < 0, so −2 < x < 3.

Example 3: Linear programming (NF): maximise P = 30x + 40y subject to x + y ≤ 12, x + 2y ≤ 16, x ≥ 0, y ≥ 0.
vertices: (0, 0), (12, 0), (8, 4), (0, 8)
          [(8, 4) from x + y = 12 and x + 2y = 16]
P:          0,      360,     400,     320
maximum P = 400 at x = 8, y = 4
Example 4: Linear programming (NF), a word problem: a workshop makes chairs and tables. A chair needs 1 hour of cutting and 2 hours of finishing; a table needs 3 hours of cutting and 2 hours of finishing. Each day there are at most 15 hours of cutting and 14 hours of finishing. The profit is $50 per chair and $90 per table. How many of each give the greatest profit?
Let x be the number of chairs and y the number of tables.
constraints:  x + 3y ≤ 15          cutting
              2x + 2y ≤ 14, i.e. x + y ≤ 7      finishing
              x ≥ 0, y ≥ 0, x and y integers
objective:    P = 50x + 90y

vertices: (0, 0), (7, 0), (3, 4), (0, 5)
          [(3, 4) from x + 3y = 15 and x + y = 7]
P:          0,     350,    510,    450
greatest profit $510: 3 chairs and 4 tables
Example 5: Triangle inequality: two sides of a triangle are 4 cm and 9 cm. Find the range of the third side x.
4 + 9 > x   →  x < 13
4 + x > 9   →  x > 5
9 + x > 4   →  always true
5 < x < 13

Common mistakes

  • Using "and" when the question says "or" (and the reverse).
  • For a quadratic inequality, giving "x < 3 and x > −2" when the parabola opens down (always sketch).
  • Dividing a quadratic inequality by x (x could be negative).
  • Testing points that are not vertices, or missing a vertex on an axis.
  • Forgetting the integer condition in a real-life LP problem.

How the DSE tests it

  • A(1): compound inequalities with "and" or "or", then the number of integers that satisfy them.
  • Paper 2: quadratic inequalities; which region represents a system of inequalities; NF the maximum of an objective function on a given region.
  • Section B: occasionally a full LP word problem.

Questions you might not ask in class

Why does '< 0' give 'between the roots'?

For an upward parabola, the part below the x-axis is the dip between the two roots.

Which side of the line do I shade?

Test the origin (0, 0), if it isn't on the line. If it satisfies the inequality, the origin's side is the allowed side.

Why do we only check the corners?

The profit line is straight, so moving it across the region, the best place is always at a corner.

More Form 5 maths topics