determine if a function is continuous and differentiable