Tip:
Highlight text to annotate it
X
In this mathcast we show how to use GeoGebra to do Linear Programming. Let’s assume that
we have a problem with the following constraints.
How do we do this with GeoGebra? We open GeoGebra. The first two constraints that say that x
greater than or equal to 0 and y greater than or equal to 0 means that we are working in
the first quadrant. So we move our drawing pad down to the first quadrant. Now GeoGebra
does not do inequalities so the second thing we do is type in the third constraint but
using an equality. So we have 10x plus 20y and now instead of less than or equal, we
type equals 140 and then we hit Enter. And there’s the line and GeoGebra has reduced
the equation to its simplest form. We use our mouse scroll button; we put our pointer
over in the drawing pad and we use our mouse scroll button to back up until we can see
the whole thing and we can move again down to the first quadrant. So here we are with
our first line. Let’s make it red. Now we need to know which side of the line to shade
so we test a point not on the line. Let’s test (0,0). Substitute. Is 0 plus 0 less than
140? Yes. So we are going to shade the side of the line down here by (0,0). So let’s
put our points in. We need intersection points for here and for here (we would need them
anyway) and because we are going to use this part down here, we’ll take (0,0). We are
going to rename that point O. So we’re in the first quadrant, we want this part so we
get our polygon tool and we go from O to A to B and back to O again. That’s our first
area. We are going to make this area red and turn off all the labels. Now our fourth constraint
is also an inequality so we click down in the input bar here and then we type in 0.6x+0.8y
and we can’t put inequality so we put equals 7.2. There is our line. We make it blue. Now
for this fourth constraint we again substitute (0,0) and find that it satisfies the inequality
so this line is also shaded down toward (0,0). So we need the 2 intersection points here
and this point O. So we take our intersection tool and find that intersection point, this
intersection point and we take our polygon tool and make a triangle using O, C, D and
O again. We make this triangle blue and turn off all the labeling and now we can see that
our combination area is this quadrilateral down here. Let’s get the intersection point
here. So we need to check A, E and D in our objective function. The easiest way to do
this is to go the input bar. So we are looking at V at point A equal to 0.4 times the x value
of A plus 0.6 times the y value of A. Now before we hit enter we are going to copy this
so we press shift and hit home and then Ctrl+C and then we hit enter. So the value of the
objective function at A is 4.2. Now we are still down here in the input bar. We click
Ctrl+V. We change this to be E. So we put E here, here and here and hit enter. So that’s
the value of the objective function at point E and now we need it at point D so we paste
again and put D in everywhere and hit enter. And we can see that VE is the maximum value
so this is where our objective function is maximum at E. So given our 4 constraints,
we have found that our objective function has a maximum value when x=8 and y=3.