Solve for x -1/2x^2+5x=8