Solve algebraic fractions