Linear Inequality

Enter a linear inequality based on a description

Complete Code

Download file: LinearInequality.pg

POD for Macro Files

PG problem file

Explanation

DOCUMENT();

loadMacros('PGstandard.pl', 'PGML.pl', 'parserLinearRelation.pl',
    'PGcourse.pl');

Preamble

We include the macro file parserLinearRelation.pl to be able to the a LinearRelation object.

Context("LinearRelation");

do {
    $a = random(2, 6);
    $b = random(2, 6);
} until ($a != $b);
$ab = $a * $b;

$lr = LinearRelation("$a x + $b y < $ab")->reduce;

Setup

This perl code sets up the problem.
BEGIN_PGML
The line [`L`] that passes through the point [`([$b],0)`] and [`(0,[$a])`] divides
the [`xy`]-plane.  What is the linear relation that describes the set of
points in half-plane containing the origin?  Note, do not include the
points on the line?

[__]{$lr}

END_PGML

Statement

Everything is as usual. Insert the fraction and answer blanks using $showfraction.

BEGIN_PGML_SOLUTION
[`[$lr]`]
END_PGML_SOLUTION

ENDDOCUMENT();

Solution

A solution should be provided here.