Algebra and trigonometry: A functions approach