Quadratic Functions And Applications