# Optimal distribution with moment conditions

Basically, I want to find a probability distribution which maximizes a convex objective function and satisfies two moment constraints. For given $\bar x$, $m_{n-1}$, $m_n$ $$\max_{f(x)} \int_{x=0}^\bar{x} f(x)\sum_{i=n+1}^\infty \frac{x^i}{i!} dx$$ such that $$\int_{x=0}^\bar{x}f(x)dx = 1\\ \int_{x=0}^\bar{x}x^{n-1}f(x)dx = m_{n-1}\\ \int_{x=0}^\bar{x}x^{n}f(x)dx = m_{n}\\ f(x)\geq 0$$ Some numerical examples suggest that if a solution exists, the optimal $f^*(x)$ is nonzero at only two distinct points, $\bar x$ and a second point. How can I prove this?

What I tried: Lagrange optimization with the three constraints gives at most three nonzero points. Namely, for each $x\in[0,\bar x]$ $$f(x)\left( \sum_{i=n+1}^\infty \frac{x^i}{i!} dx - \lambda_1 - \lambda_2 x^{n-1} - \lambda_3 x^{n}\right) = 0$$ This system of equations may have three distinct nonzero $f(x)$ because there are three unknowns $\lambda_1$, $\lambda_2$ and $\lambda_3$. How to exclude the third nonzero?

-
Does the second point always occur at $x=0$? – Rahul Feb 10 '13 at 7:26
E.g., if $m_{n-1}=0.45$ and $m_n=0.45$ then the second point is close to $x=0.7$. Matlab code: N = 101; x = linspace(0,1,N); n = 5; x0 = zeros(1,N); x0(end) = .67; x0(round(0.65*N):round(0.75*N)) = .03; Aeq = [ones(1,N); L.^(n-1); L.^n];beq = [1; 0.45; 0.4];A = -eye(N);b = zeros(N,1); [x_opt f_val] = fmincon(@(p) -sum(p.*(exp(x)-sum((ones(n,1)*x).^((0:n-1)'*ones(1,N))./([1 cumprod(1:n-1)]'*ones(1,N))))),x0,A,b,Aeq,beq,zeros(1,N),[],[],optimset('Algorit‌​hm','sqp','MaxFunEvals',100000,'MaxIter',1000,'TolX',1e-32,'TolFun',1e-32)); plot(x_opt) – Sander Feb 10 '13 at 14:14