In question the pdf is given gamma with parameter alpha and lambda. Asked to compute mean in terms of alpha and lambda. In solution log of the pdf is taken and the defferentiated it? Why log and then differentiation us used?
Check the question again. You are asked to compute mode and not mean in part (a). Taking log and differentiating helps to compute mode with minimal effort.
Thanks. this method is not mentioned in cmp. And then how to identify the question to apply this method? Is this a rare situation?
This method is not unique to this course. This is about computing max of a continuous function of a single variable where differentiating the log transform of the function instead of the function itself would take lesser amount of computation time. NB: This can work only if the function is positive and monotonous. You can try differentiating the original function as well. You should get the same answer in the end.
On a second thought, there is something similar within the course as well. When you compute maximum likelihood estimate of a parameter starting with the likelihood function, think why you differentiate the log-likelihood function instead of the likelihood function !