>   

Setup (Needed for running Maple, not for viewing!).

Lecture on Chapter 3 The Linear Programming Begins...

This review gives a brief summary of the graphical method.

>   

>   

Explanation

Why does the graphical method work?

Conclusion.

Thus on a line in parametric form, a linear function increases or decreases with the parameter depending on the coefficient of the parameter.
For the above line, if we consider a different function, say

g x y = 3 x - y + 2  then we see that

g 1 + t 8 + 3 t = -3  and   this simplifies to

 

g 1 + t 8 + 3 t = -3  .


Thus, a linear function on a line is
either constant at all points or increases in one of the two available directions and decreases in the opposite direction.

Consider the plane region that we can plot for our problem. Where would a linear function become maximum on such a region. If we take any point in the interior of our region we can draw a little line segment through the point which is still entirely in the region. Now if our function is not constant on the line, it would be increasing in one of the two directions and thus would not be maximum at our given point.
If by luck, we had chosen a line segment on which the function happens to be constant, we can choose a different segment through the same point and make the same argument. We could not have the same function constant on the second segment as well, for it is clear that then the function would be identically constant on the whole plane and our problem has a trivial answer: every point is a maximum point!

Thus, our maximum point has to be on the boundary! It could be on a boundary segment or at a corner.  Note that if it is on a segment, but not at a corner, then the function has to be constant on the whole boundary segment (for otherwise we get a contradiction as above). Thus, it would also be maximum at one of the endpoints which must be a corner.

This is why it is enough to only check the corner points for locating a maximum.

This also explains that if we find two maximum points  which are corners, then the line joining them must form a boundary line, i.e. they must be adjacent points on the boundary polygon.

If the region is unbounded,  then it has boundary lines running off to infinity and we may find that the maximum point may not exist in the sense that it has to be a point of infinity on one such boundary line.


>   

>   

Problem 3.2.2 by graphing

Intersect the lines 3 x + 4 y = 1000  and 6 x + 3 y = 1200 .

>    3*x+4*y <= 1000;

3 x + 4 y 1000

>    solve({3*x+4*y=1000,6*x+3*y=1200},{x,y});

x = 120 y = 160

>   

>    P1:=textplot([3,3,`O`],color=blue,font=[TIMES,BOLD,16],align={ABOVE,RIGHT}):
P2:=textplot([200,0,`A`],color=blue,font=[TIMES,BOLD,16],align={ABOVE,RIGHT}):
P3:=textplot([120,160,`B`],color=blue,font=[TIMES,BOLD,16],align={ABOVE,RIGHT}):
P4:=textplot([0,250,`C`],color=blue,font=[TIMES,BOLD,16],align={ABOVE,RIGHT}):
l1:=plot((1000-3*x)/4,x=0..150,color=red,thickness=3):
l2:=plot((1200-6*x)/3,x=110..210,color=blue,thickness=3):
l3:=line([0,0],[200,0],color=black,thickness=3):
l4:=line([0,0],[0,250],color=black,thickness=3):
region:=polygonplot([[0,0],[200,0],[120,160],[0,250]],color=yellow):
display({P1,P2,P3,P4,l1,l2,l3,l4,region});

[Maple Plot]

>    corners:=[[0,0],[200,0],[120,160],[0,250]];

corners := 0 0 200 0 120 160 0 250

>    funvals:=[seq(2*corners[i][1]+(1.5)*corners[i][2],i=1..nops(corners))];

funvals := 0. 400. 480.0 375.0

>    with(plottools):
F := proc(t)
  plots[display](l1,l2,region,
     line([t/2,0],[-t/4,t],color=magenta,thickness=2));
     end:
animate(F,[t],t=150..480,
                scaling=constrained,axes=none);

[Maple Plot]

>   

Some B2  like  problems.

>   

>   

>   

Code

>   

Scratch