You find the stationary points and then check the nature of these stationary points. If you want to maximise then you keep the solution that is a maximum. If you want to minimise then you keep the solution that is a minimum.
If you want more help, show some effort. We are not going to just hand you a step-by-step by solution.
Your objective is to find the derivative of and set it equal to 0.
Taking each part in turn:
Here is the differenciation of
rewrite this as
From here, just differentiate using the chain rule:
In case your chain rule is a bit rusty, it goes like this:
Bring the power of the bracket (2) down and reduce the power on the bracket by 1.
Then multiply by the deriviative of the bracket
Now, we need the derivative of:
Combining those 2 results, we have the derivative we want. Your optimisation problem is:
Have a go at that. I might have made a mistake because that equation looks pretty messy to solve.