ArePerpendicular - Maple Help

geometry

 ArePerpendicular
 test if two lines are perpendicular to each other

 Calling Sequence ArePerpendicular(l1, l2, cond)

Parameters

 l1, l2 - two lines cond - (optional) name

Description

 • The routine returns true if l1 and l2 are perpendicular to each other; false if they are not; and FAIL if it is unable to determine if l1 and l2 are perpendicular to each other.
 • In case of FAIL, if the third optional argument is given, the condition that makes l1 and l2 perpendicular to each other is assigned to this argument.
 • The command with(geometry,ArePerpendicular) allows the use of the abbreviated form of this command.

Examples

 > $\mathrm{with}\left(\mathrm{geometry}\right):$
 > $\mathrm{line}\left(\mathrm{l1},y=x,\left[x,y\right]\right):$
 > $\mathrm{line}\left(\mathrm{l2},y=-x,\left[x,y\right]\right):$
 > $\mathrm{ArePerpendicular}\left(\mathrm{l1},\mathrm{l2}\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{line}\left(\mathrm{l3},x=2,\left[x,y\right]\right):$
 > $\mathrm{ArePerpendicular}\left(\mathrm{l1},\mathrm{l3}\right)$
 ${\mathrm{false}}$ (2)
 > $b≔3:$
 > $\mathrm{line}\left(\mathrm{l4},by+ax=0,\left[x,y\right]\right):$
 > $\mathrm{ArePerpendicular}\left(\mathrm{l1},\mathrm{l4},'\mathrm{cond}'\right)$
 ArePerpendicular:   "hint: cannot determine if -a+3 is zero"
 ${\mathrm{FAIL}}$ (3)
 > $\mathrm{cond}$
 ${-}{a}{+}{3}{=}{0}$ (4)
 > $\mathrm{assume}\left(\mathrm{cond}\right)$
 > $\mathrm{ArePerpendicular}\left(\mathrm{l1},\mathrm{l4},'\mathrm{cond}'\right)$
 ${\mathrm{true}}$ (5)