Skip to content
Worked Examples · Example 7

Q.Solve the following Linear Programming Problem graphically. Maximize Z=2x+4yZ = 2x + 4y Subject to constraints:
x+2y≤5x + 2y \le 5
x+y≤4x + y \le 4
x≥0 and y≥0x \ge 0 \text{ and } y \ge 0

Sikkim CbseNCERTSubjective· 5mImportance★★★★★
32% · 7/22 Questions
✓ Free question

This is a two-variable linear programming problem solved by the graphical method. The feasible region is bounded by the constraints, and the objective function Z=2x+4yZ = 2x + 4y is maximised at a corner point. The maximum value is Z=10Z = 10, attained at the point (0,2.5)(0, 2.5).

We are asked to maximise Z=2x+4yZ = 2x + 4y subject to linear inequalities. The graphical method works because with two variables, each constraint is a half-plane, and the intersection of all half-planes gives a convex polygon (the feasible region). The fundamental theorem of linear programming tells us that if an optimal solution exists, it occurs at one of the vertices (corner points) of this polygon. So we plot the lines, find the region, list the corners, and evaluate ZZ at each.

Let’s go step by step.

  1. Plot each constraint as a line.

    First, treat each inequality as an equation.

    • x+2y=5x + 2y = 5: intercepts are (5,0)(5,0) and (0,2.5)(0, 2.5).
    • x+y=4x + y = 4: intercepts are (4,0)(4,0) and (0,4)(0,4).
    • x=0x = 0 is the y-axis, y=0y = 0 is the x-axis.
  2. Determine the feasible side for each inequality.

    For x+2y≤5x + 2y \le 5, test the origin (0,0)(0,0): 0+0≤50 + 0 \le 5 is true, so the region containing the origin is feasible.

    For x+y≤4x + y \le 4, test (0,0)(0,0): 0≤40 \le 4 is true, so again the side containing the origin is feasible.

    x≥0x \ge 0 and y≥0y \ge 0 restrict us to the first quadrant.

    The feasible region is the intersection of all these half-planes — a polygon in the first quadrant.

  3. Find the corner points of the feasible region.

    The region is bounded by the axes and the two lines. The corners are:

    • Intersection of x=0x=0 and y=0y=0: (0,0)(0,0).
    • Intersection of y=0y=0 and x+y=4x + y = 4: (4,0)(4,0).
    • Intersection of x=0x=0 and x+2y=5x + 2y = 5: (0,2.5)(0, 2.5).
    • Intersection of the two lines x+2y=5x + 2y = 5 and x+y=4x + y = 4. Subtract the second from the first: (x+2y)−(x+y)=5−4  ⟹  y=1(x+2y) - (x+y) = 5 - 4 \implies y = 1. Then x+1=4  ⟹  x=3x + 1 = 4 \implies x = 3. So the point is (3,1)(3,1).

    So the four corners are: (0,0)(0,0), (4,0)(4,0), (0,2.5)(0,2.5), and (3,1)(3,1).

  4. Evaluate the objective function at each corner.

    Z=2x+4yZ = 2x + 4y:

    • At (0,0)(0,0): Z=0Z = 0.
    • At (4,0)(4,0): Z=2(4)+4(0)=8Z = 2(4) + 4(0) = 8.
    • At (0,2.5)(0,2.5): Z=2(0)+4(2.5)=10Z = 2(0) + 4(2.5) = 10.
    • At (3,1)(3,1): Z=2(3)+4(1)=6+4=10Z = 2(3) + 4(1) = 6 + 4 = 10.

    Both (0,2.5)(0,2.5) and (3,1)(3,1) give Z=10Z = 10. When two adjacent corners give the same optimal value, every point on the line segment joining them is also optimal. Here, the segment lies on the line x+2y=5x + 2y = 5 between (0,2.5)(0,2.5) and (3,1)(3,1).

Watch out

A common mistake is to forget checking the intersection of the two constraint lines. Also, note that (0,2.5)(0,2.5) is on the y-axis, not (0,5)(0,5) — the intercept of x+2y=5x+2y=5 on the y-axis is 2.52.5, not 55. Always compute intercepts carefully.

Tip

When two corner points yield the same ZZ, the entire edge between them is optimal. This means the problem has infinitely many optimal solutions — but the maximum value is unique.

  1. State the maximum value. The maximum value of ZZ is 1010, attained at (0,2.5)(0,2.5) and (3,1)(3,1) (and all points on the line segment between them).
Figure 8.2 — feasible region OABC for Maximize Z = 2x + 4y subject to x+2y<=5 and x+y<=4
Figure 8.2 — feasible region OABC for Maximize Z = 2x + 4y subject to x+2y<=5 and x+y<=4

The bounded feasible region OABC; Z = 10 is attained along the whole edge AB (multiple optimal solutions).

✓Final answer

The maximum value is Z=10Z = 10, achieved at (0,2.5)(0, 2.5) and (3,1)(3, 1) (and every point on the line segment joining them).

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.