Find solution using graphical method
MAX z = 2x1 + x2
subject to
x1 + 2x2 <= 10
x1 + x2 <= 6
x1 - x2 <= 2
x1 - 2x2 <= 1
and x1,x2 >= 0 Solution:Problem is | MAX `z` | `=` | `` | `2` | `x_1` | ` + ` | `` | `x_2` |
|
| subject to |
| `` | `` | `x_1` | ` + ` | `2` | `x_2` | ≤ | `10` | | `` | `` | `x_1` | ` + ` | `` | `x_2` | ≤ | `6` | | `` | `` | `x_1` | ` - ` | `` | `x_2` | ≤ | `2` | | `` | `` | `x_1` | ` - ` | `2` | `x_2` | ≤ | `1` |
|
| and `x_1,x_2 >= 0; ` |
Hint to draw constraints
1. To draw constraint `color{red}{x_1+2x_2<=10} ->(1)`
Treat it as `color{red}{x_1+2x_2=10}`
When `x_1=0` then `x_2=?`
`=>(0)+2x_2=10`
`=>2x_2=10`
`=>x_2=(10)/(2)=5`
When `x_2=0` then `x_1=?`
`=>x_1+2(0)=10`
`=>x_1=10`
Put `x_1=0,x_2=0` (origin) in `color{red}{x_1+2x_2<=10}`, then `0+0<=10`, which is true,
The half plane containing the origin is the region of the solution set of the inequation `color{red}{x_1+2x_2<=10}`
2. To draw constraint `color{green}{x_1+x_2<=6} ->(2)`
Treat it as `color{green}{x_1+x_2=6}`
When `x_1=0` then `x_2=?`
`=>(0)+x_2=6`
`=>x_2=6`
When `x_2=0` then `x_1=?`
`=>x_1+(0)=6`
`=>x_1=6`
Put `x_1=0,x_2=0` (origin) in `color{green}{x_1+x_2<=6}`, then `0+0<=6`, which is true,
The half plane containing the origin is the region of the solution set of the inequation `color{green}{x_1+x_2<=6}`
3. To draw constraint `color{blue}{x_1-x_2<=2} ->(3)`
Treat it as `color{blue}{x_1-x_2=2}`
When `x_1=0` then `x_2=?`
`=>(0)-x_2=2`
`=>-x_2=2`
`=>x_2=-2`
When `x_2=0` then `x_1=?`
`=>x_1-(0)=2`
`=>x_1=2`
Put `x_1=0,x_2=0` (origin) in `color{blue}{x_1-x_2<=2}`, then `0+0<=2`, which is true,
The half plane containing the origin is the region of the solution set of the inequation `color{blue}{x_1-x_2<=2}`
4. To draw constraint `color{brown}{x_1-2x_2<=1} ->(4)`
Treat it as `color{brown}{x_1-2x_2=1}`
When `x_1=0` then `x_2=?`
`=>(0)-2x_2=1`
`=>-2x_2=1`
`=>x_2=(1)/(-2)=-0.5`
When `x_2=0` then `x_1=?`
`=>x_1-2(0)=1`
`=>x_1=1`
Put `x_1=0,x_2=0` (origin) in `color{brown}{x_1-2x_2<=1}`, then `0+0<=1`, which is true,
The half plane containing the origin is the region of the solution set of the inequation `color{brown}{x_1-2x_2<=1}`

The value of the objective function at each of these extreme points is as follows:
Extreme Point Coordinates (`x_1`,`x_2`) | Lines through Extreme Point | Objective function value `z=2x_1 + x_2` |
| `color{red}{O(0,0)}` | `color{black}{5->x_1>=0}` `color{black}{6->x_2>=0}` | `2(0)+1(0)=0` |
| `color{green}{A(1,0)}` | `color{brown}{4->x_1-2x_2<=1}` `color{black}{6->x_2>=0}` | `2(1)+1(0)=2` |
| `color{blue}{B(3,1)}` | `color{blue}{3->x_1-x_2<=2}` `color{brown}{4->x_1-2x_2<=1}` | `2(3)+1(1)=7` |
| `color{brown}{C(4,2)}` | `color{green}{2->x_1+x_2<=6}` `color{blue}{3->x_1-x_2<=2}` | `2(4)+1(2)=10` |
| `color{darkorange}{D(2,4)}` | `color{red}{1->x_1+2x_2<=10}` `color{green}{2->x_1+x_2<=6}` | `2(2)+1(4)=8` |
| `color{darkviolet}{E(0,5)}` | `color{red}{1->x_1+2x_2<=10}` `color{black}{5->x_1>=0}` | `2(0)+1(5)=5` |
The maximum value of the objective function `z=10` occurs at the extreme point `(4,2)`.
Hence, the optimal solution to the given LP problem is : `x_1=4, x_2=2` and max `z=10`.
This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then