An introduction to calculus with applications