Solves the line equation for the given x. Throws an UnsupportedOperationException if the line isVertical.