def roots_linear(f):
 r = ((- f.nth(0)) / f.nth(1))
 dom = f.get_domain()
 if (not dom.is_Numerical):
  if dom.is_Composite:
   r = factor(r)
  else:
   r = simplify(r)
 return [r]

def roots_linear ( f ) : r = ( ( - f . nth ( 0 ) ) / f . nth ( 1 ) ) dom = f . get_domain ( ) if ( not dom . is_Numerical ) : if dom . is_Composite : r = factor ( r ) else : r = simplify ( r ) return [ r ]
returns a list of roots of a linear polynomial .