  function [r1,r2] = rootsQuadratic(a,b,c)  
% a, b, and c are real.
% r1 and r2 are roots of ax^2 + bx +c = 0

r1 = (-b - sqrt(b^2 - 4*a*c))/(2*a);
r2 = (-b + sqrt(b^2 - 4*a*c))/(2*a);