The remainder of the solution is left to the reader to work out. To help you out, however,

6.2.1.1 Prove that the function that extremises: