This version matches Maxima results