Grading - Maple Programming Help

 LinearFunction

 Calling Sequence LinearFunction(t) LinearFunction(p1, p2))

Parameters

 t - linear expression in one variable or linear equation in variables x and y p1, p2 - a GridPoint object or list/rtable with two values representing a point on the line

Options

 • domain : a RealRange expression specifying the region over which the line is defined
 • variable : name used in generated expression if the second calling sequence is used

Description

 • The LinearFunction constructor generates and returns a line object.
 • If the equation form is given, the variables must consist of $x$ and/or $y$ only. The equation is converted to the form $y=f\left(x\right)$ and only the right-hand-side is saved within the object.
 • Vertical lines can also be constructed using two points with the same x-value or an expression of the form $x=a$ where $a$ is a constant. In this case, the equation $x=a$ is returned if the Grading:-GetExpression command is called.

Examples

 > $\mathrm{with}\left(\mathrm{Grading}\right)$
 $\left[{\mathrm{AbsoluteValueFunction}}{,}{\mathrm{Draw}}{,}{\mathrm{ExponentialFunction}}{,}{\mathrm{GetData}}{,}{\mathrm{GetDomain}}{,}{\mathrm{GetExpression}}{,}{\mathrm{GradePlot}}{,}{\mathrm{GridPoint}}{,}{\mathrm{Inequalities}}{,}{\mathrm{LinearFunction}}{,}{\mathrm{LogarithmicFunction}}{,}{\mathrm{QuadraticFunction}}{,}{\mathrm{Quiz}}{,}{\mathrm{Segment}}\right]$ (1)
 > $\mathrm{LinearFunction}\left(3x-4\right)$
 ${\mathrm{<< LinearFunction: 3*x-4>>}}$ (2)
 > $\mathrm{LinearFunction}\left(x+2y=5\right)$
 ${\mathrm{<< LinearFunction: 5/2-1/2*x>>}}$ (3)
 > $L≔\mathrm{LinearFunction}\left(\mathrm{GridPoint}\left(\left[2,4\right]\right),\mathrm{GridPoint}\left(\left[1,-1\right]\right)\right)$
 ${L}{:=}{\mathrm{<< LinearFunction: 5*v-6>>}}$ (4)
 > $\mathrm{GetExpression}\left(L\right)$
 ${5}{}{v}{-}{6}{,}{v}$ (5)

Compatibility

 • The Grading:-LinearFunction command was introduced in Maple 18.
 • For more information on Maple 18 changes, see Updates in Maple 18.