solve m^3-m^2+1=0 for m