Morgan Stanley interview question

Some algebra and calculus questions.