Steply

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

Step by step, with the reason for every step · Linear programming · Algebra 1

Step by step

The question

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

minimize C = x + 3y

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

x and y must follow every rule.

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

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 + 4y ≥ 12 is the line x + 4y = 12.

It crosses the axes at (12, 0) and (0, 3).

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 = 6 meets x + 4y = 12: we solve the two together, as in the systems lesson.

x = 4, y = 2.

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

4 Test each corner

At (0, 6): C = 18.

(0, 6): C = 1(0) + 3(6) = 18

At (12, 0): C = 12.

(12, 0): C = 1(12) + 3(0) = 12

At (4, 2): C = 10.

(4, 2): C = 1(4) + 3(2) = 10

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 10, at x = 4, y = 2.

minimum C = 10 at (4, 2)

6 Check

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

That is more than 10.

So the corner is the best!

inside: (5, 3): C = 14 > 10

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 = 10 at (4, 2)

Your turn

Try this one yourself, then check:

minimize C = x + 2y
Show the answer
minimum C = 8 at (4, 2)

More from Linear programming

The whole lesson: Linear programming →