Discriminant stuff for question 4. Still need to do the error analysis.