An Introduction to Optimal Control Problems in Life Sciences and Economics