You can put this solution on YOUR website! Define
You know that,
Substituting,
Now Z is a function of one variable.
Find the derivative and set it equal to zero to find the minimum.
So then,
and
You should technically calculate the second derivative and show that the extremum is a minimum.