Hello, I am having trouble setting up the equations for maximum entropy given mean and variance.

The entropy is defined as . Problem statement is "use lagrangian optimization to find the pdf of maximal entropy if the variance is and variance is .

I started with

(a) function to maximize

(b) first constraint (probabilities must add up to one)

(c) second constraint (expectation constraint)

(d) third constraint (variance constraint)

So the lagrangian looks something like:

(sorry for using h_1,h_2,h_3 in the lagrangian, i get a "latex error, image too big" if I substitute the actual values in the lagrangian formula).

Now I know that for the discrete case, its fairly easy to do and you end up with the normal/gaussian distribution. I'm assuming the answer will be the same in the continuous case, but it appears that I need to use functional derivatives, because I am taking the derivative of a function p(x) , not a variable (at least that's what my math major friend seems to think), but I don't know how to do that. Is there an easier way of doing this?