An Introduction to Optimal Control Theory