Suppose that are i.i.d. to with both parameters unknown, we wish to estimate the density function of X with a family of densities as learners and the negative log loss function

Find the ERM density.

So I know I have to find

Now I'm stuck here since I don't know what to do, I thought about taking the derivative and set it equals to zero. But then I get

But then how would you solve it? Thanks.