Applications of quadratic functions