how to transform the equations into quadratic equations?