Pātuhitia tēnei: An introduction to the calculus of variations