Select Page

We see graphically how linear programming optimizes a linear objective function in which the variables must satisfy a set of simultaneous linear equations. From the graphical view of points, we take following examples of linear programming problems of two variables and their analysis can be seen on a two-dimensional graph.

Example
Solve the following linear programming problem graphically.

We consider the constraints as equalities and plot them.

Then we have :

The maximum value of   will be attainable at any one of the five vertices (extreme points) of the feasible region.

Thus, the objective function   is maximum at

In the Command Window of MATLAB,

k :=[{3*x1+8*x2&lt;=12,x1+x2&lt;=2,2*x1&lt;=3},5*x1+7*x2 ,NonNegative ] :
g:= linopt::plot_data (k , [ x1 , x2 ] ) :
plot ( g ) :</p>

mupad command open MAPLE environment for entering MAPLE commands.

The commands after mupad command, are MAPLE commands. These commands do not answer in command window of MATLAB.

Perhaps , You have a question, Why we do not use MATLAB command?

MAPLE is very professional software in mathematics, MATLAB does not support all of MAPLE capabilities, so MATLAB supports MAPLE to increase its capability and the user can solve complex problems easily in mupad.

Example

Solve graphically