發送短信 : Dynamic programming and the calculus of variations