Steply

Linear programming

The best corner of the region · Algebra 1 · 20 problems, easy to harder

▶ Watch the first one solved

How we do it

  1. Draw the lines
  2. Shade the region
  3. Find the corners
  4. Test each corner
  5. Pick the best
  6. Check

The steps for Maximize P = 3x + 2y: x ≥ 0, y ≥ 0, x + y ≤ 6, x ≤ 4. Every solution names its steps, so you always know what comes next.

Worked examples

Maximize P = 3x + 2y: x ≥ 0, y ≥ 0, x + y ≤ 6, x ≤ 4 Easy

The question

Question: maximize P = 3x + 2y, when x ≥ 0, y ≥ 0, x + y ≤ 6, x ≤ 4.

maximize P = 3x + 2y

Maximize means: make P as big as it can be.

x and y must follow every rule.

= x ≥ 0, y ≥ 0, x + y ≤ 6, x ≤ 4

1 Draw the lines

A grid for x and y.

The edge of x + y ≤ 6 is the line x + y = 6.

It crosses the axes at (6, 0) and (0, 6).

Solid: "or equal to".

The edge of x ≤ 4: the line x = 4, straight up.

2 Shade the region

x ≥ 0 and y ≥ 0: right of the y-axis, above the x-axis.

"Less than or equal": the side of each line with (0, 0).

The shaded part fits every rule.

3 Find the corners

The corners are where two edges of the region meet.

4 Test each corner

At (0, 0): P = 0.

(0, 0): P = 3(0) + 2(0) = 0

At (0, 6): P = 12.

(0, 6): P = 3(0) + 2(6) = 12

At (4, 0): P = 12.

(4, 0): P = 3(4) + 2(0) = 12

At (4, 2): P = 16.

(4, 2): P = 3(4) + 2(2) = 16

Careful!

The biggest value is always at a corner of the shaded region.

So we only test the corners.

Careful: the best point is always a corner of the region

5 Pick the best

The biggest is 16, at x = 4, y = 2.

maximum P = 16 at (4, 2)

6 Check

Let's check with a point inside the region, (2, 2): P is 10.

That is less than 16.

So the corner is the best!

inside: (2, 2): P = 10 < 16

Let's look back.

First: draw the lines.

Then: shade the region.

Then: find the corners.

Then: test each corner.

Then: pick the best.

Last: check.

Answer
maximum P = 16 at (4, 2)

▶ Watch it solved

Maximize P = 2x + 3y: x ≥ 0, y ≥ 0, x + y ≤ 6, 2x + y ≤ 8 Medium

The question

Question: maximize P = 2x + 3y, when x ≥ 0, y ≥ 0, x + y ≤ 6, 2x + y ≤ 8.

maximize P = 2x + 3y

Maximize means: make P as big as it can be.

x and y must follow every rule.

= x ≥ 0, y ≥ 0, x + y ≤ 6, 2x + y ≤ 8

1 Draw the lines

A grid for x and y.

The edge of x + y ≤ 6 is the line x + y = 6.

It crosses the axes at (6, 0) and (0, 6).

Solid: "or equal to".

The edge of 2x + y ≤ 8 is the line 2x + y = 8.

It crosses the axes at (4, 0) and (0, 8).

Solid: "or equal to".

2 Shade the region

x ≥ 0 and y ≥ 0: right of the y-axis, above the x-axis.

"Less than or equal": the side of each line with (0, 0).

The shaded part fits every rule.

3 Find the corners

The corners are where two edges of the region meet.

Where x + y = 6 meets 2x + y = 8: we solve the two together, as in the systems lesson.

x = 2, y = 4.

x + y = 6 and 2x + y = 8: x = 2, y = 4

4 Test each corner

At (0, 0): P = 0.

(0, 0): P = 2(0) + 3(0) = 0

At (0, 6): P = 18.

(0, 6): P = 2(0) + 3(6) = 18

At (4, 0): P = 8.

(4, 0): P = 2(4) + 3(0) = 8

At (2, 4): P = 16.

(2, 4): P = 2(2) + 3(4) = 16

Careful!

The biggest value is always at a corner of the shaded region.

So we only test the corners.

Careful: the best point is always a corner of the region

5 Pick the best

The biggest is 18, at x = 0, y = 6.

maximum P = 18 at (0, 6)

6 Check

Let's check with a point inside the region, (1, 2): P is 8.

That is less than 18.

So the corner is the best!

inside: (1, 2): P = 8 < 18

Let's look back.

First: draw the lines.

Then: shade the region.

Then: find the corners.

Then: test each corner.

Then: pick the best.

Last: check.

Answer
maximum P = 18 at (0, 6)

▶ Watch it solved

Minimize C = 2x + 3y: x ≥ 0, y ≥ 0, x + y ≥ 4, x + 3y ≥ 6 Harder

The question

Question: minimize C = 2x + 3y, when x ≥ 0, y ≥ 0, x + y ≥ 4, x + 3y ≥ 6.

minimize C = 2x + 3y

Minimize means: make C as small as it can be.

x and y must follow every rule.

= x ≥ 0, y ≥ 0, x + y ≥ 4, x + 3y ≥ 6

1 Draw the lines

A grid for x and y.

The edge of x + y ≥ 4 is the line x + y = 4.

It crosses the axes at (4, 0) and (0, 4).

Solid: "or equal to".

The edge of x + 3y ≥ 6 is the line x + 3y = 6.

It crosses the axes at (6, 0) and (0, 2).

Solid: "or equal to".

2 Shade the region

x ≥ 0 and y ≥ 0: right of the y-axis, above the x-axis.

"Greater than or equal": the side away from (0, 0).

The shaded part fits every rule.

3 Find the corners

The corners are where two edges of the region meet.

Where x + y = 4 meets x + 3y = 6: we solve the two together, as in the systems lesson.

x = 3, y = 1.

x + y = 4 and x + 3y = 6: x = 3, y = 1

4 Test each corner

At (0, 4): C = 12.

(0, 4): C = 2(0) + 3(4) = 12

At (6, 0): C = 12.

(6, 0): C = 2(6) + 3(0) = 12

At (3, 1): C = 9.

(3, 1): C = 2(3) + 3(1) = 9

Careful!

The smallest value is always at a corner of the shaded region.

So we only test the corners.

Careful: the best point is always a corner of the region

5 Pick the best

The smallest is 9, at x = 3, y = 1.

minimum C = 9 at (3, 1)

6 Check

Let's check with a point inside the region, (4, 2): C is 14.

That is more than 9.

So the corner is the best!

inside: (4, 2): C = 14 > 9

Let's look back.

First: draw the lines.

Then: shade the region.

Then: find the corners.

Then: test each corner.

Then: pick the best.

Last: check.

Answer
minimum C = 9 at (3, 1)

▶ Watch it solved

Practice

Try each one, then open the answer. Stuck? Open the problem to watch every step.

Easy

  1. maximize P = 3x + 2y: x ≥ 0, y ≥ 0, x + y ≤ 6, x ≤ 4
    Answer
    maximum P = 16 at (4, 2)
  2. maximize P = x + 3y: x ≥ 0, y ≥ 0, x + y ≤ 5, y ≤ 3
    Answer
    maximum P = 11 at (2, 3)
  3. maximize P = 4x + y: x ≥ 0, y ≥ 0, x + y ≤ 7, x ≤ 5
    Answer
    maximum P = 22 at (5, 2)
  4. maximize P = 2x + 5y: x ≥ 0, y ≥ 0, x + y ≤ 8, y ≤ 6
    Answer
    maximum P = 34 at (2, 6)
  5. maximize P = 5x + 2y: x ≥ 0, y ≥ 0, x + y ≤ 4, x ≤ 3
    Answer
    maximum P = 17 at (3, 1)
  6. maximize P = x + 3y: x ≥ 0, y ≥ 0, x + 2y ≤ 8, x ≤ 6
    Answer
    maximum P = 12 at (0, 4)
  7. maximize P = 2x + y: x ≥ 0, y ≥ 0, x + y ≤ 5, x ≤ 3
    Answer
    maximum P = 8 at (3, 2)

Medium

  1. maximize P = 2x + 3y: x ≥ 0, y ≥ 0, x + y ≤ 6, 2x + y ≤ 8
    Answer
    maximum P = 18 at (0, 6)
  2. maximize P = 3x + 2y: x ≥ 0, y ≥ 0, x + y ≤ 6, 2x + y ≤ 8
    Answer
    maximum P = 14 at (2, 4)
  3. maximize P = 5x + 4y: x ≥ 0, y ≥ 0, x + 2y ≤ 10, x + y ≤ 6
    Answer
    maximum P = 30 at (6, 0)
  4. maximize P = 3x + 4y: x ≥ 0, y ≥ 0, 2x + y ≤ 10, x + 2y ≤ 8
    Answer
    maximum P = 20 at (4, 2)
  5. maximize P = 4x + 3y: x ≥ 0, y ≥ 0, x + y ≤ 7, 3x + y ≤ 15
    Answer
    maximum P = 25 at (4, 3)
  6. maximize P = 2x + y: x ≥ 0, y ≥ 0, x + y ≤ 5, x + 3y ≤ 9
    Answer
    maximum P = 10 at (5, 0)
  7. maximize P = x + 4y: x ≥ 0, y ≥ 0, x + y ≤ 6, x + 2y ≤ 8, x ≤ 4
    Answer
    maximum P = 16 at (0, 4)

Harder

  1. minimize C = 2x + 3y: x ≥ 0, y ≥ 0, x + y ≥ 4, x + 3y ≥ 6
    Answer
    minimum C = 9 at (3, 1)
  2. minimize C = 3x + 2y: x ≥ 0, y ≥ 0, x + y ≥ 5, 2x + y ≥ 6
    Answer
    minimum C = 11 at (1, 4)
  3. minimize C = 4x + 5y: x ≥ 0, y ≥ 0, x + 2y ≥ 6, 2x + y ≥ 6
    Answer
    minimum C = 18 at (2, 2)
  4. minimize C = x + 3y: x ≥ 0, y ≥ 0, x + y ≥ 6, x + 4y ≥ 12
    Answer
    minimum C = 10 at (4, 2)
  5. maximize P = 3x + 5y: x ≥ 0, y ≥ 0, x + y ≤ 8, x + 3y ≤ 12, x ≤ 7
    Answer
    maximum P = 28 at (6, 2)
  6. minimize C = 5x + 2y: x ≥ 0, y ≥ 0, 3x + y ≥ 9, x + y ≥ 5
    Answer
    minimum C = 16 at (2, 3)