You may have switched the values of x and y when you were substituting into the expression. You should be calculating .