GeoGebra
You can use GeoGebra
for solving linear optimization problems. The instructions below cover both the substitution method and the ruler method.
When you input equations and inequalities into GeoGebra
, you don’t need to move the terms around so that is isolated on the left-hand side. Simply enter them as they’re written!
GeoGebra
Instruction 1
- 1.
- Open
Algebra View
andGraphics View
underView
inMenu
. - 2.
- Enter your inequalities, one by one, into
Algebra View
. - 3.
- Now input your inequalities as equations, each in its own row in
Algebra View
, by replacing the inequality signs , , , with the equality sign . You need these equations to find the intersections later. - 4.
- The lines you drew in Step 3 are the inequality boundary lines. To find the coordinates of the points of intersection between them, first select the
Intersect
tool (it’s under the
Point
toolbox). For every pair of lines that intersect, click the two lines in each pair to draw their point of intersection.
- 5.
- Now, you should see the feasible region of the optimization problem as the area with the darkest shade of blue, and its vertices should be the points of intersection in Step 4. To make this area even clearer, select the
Polygon
tool and click all the points of intersection. Complete the polygon by clicking the initial point again.
- 6.
- In an empty row in
Algebra View
, enter the objective function by typingZ(x,y) = Ax+By
, where and are given in the exercise. - 7.
- Now you can choose between the substitution method or the ruler method.
The Substitution Method
- 7.1.
- Compute the value of the objective function at all of the points of intersection. Type
Z(A)
for the point ,Z(B)
for the point , and so on. The point that yields the highest value of is the optimal solution.
The Ruler Method
- 7.1.
- Type
w
in an empty row inAlgebra View
and pressEnter
(if there is already another object with the name , use another name instead). You should get a slider for the number in the same row. Enter the settings menu of the slider by clicking the three vertical dots in the row is on. Click theSlider
pane, and setMin
to 0 andMax
equal to the smallest value of and . - 7.2.
- In the next row in
Algebra View
, typer(x) = -A*x/B+w
where you replace
A
andB
with and from the exercise. You should get a line. - 7.3.
- Adjust the slider for the number so that increases, while making sure that at least one segment of the line remains within the feasible region. The line should eventually hit one point of intersection. This point is the optimal solution. If the line can’t reach a point of intersection, adjust
Max
in the slider settings accordingly.