How to maximize $p_1p_2$ subject to constraints? 
Given $x_2 \geq x_1 \geq 0$, solve the following optimization problem in $p_1$ and $p_2$.
$$\max p_1p_2$$
subject to:
$$p_1 x_1 + p_2 (x_2 - x_1) = 1 $$
$$0\leq p_2 \leq p_1$$

 A: Let $p_2=t$, $x_2-x_1=y\geq 0$ and $x_1=x$, then $$p_1 = {1-ty\over x}$$ so $$p_1p_2 = t{1-ty\over x} = -{y\over x}t^2+{1\over x}t$$
If $y\neq 0$ then this quadratic equation achieves maximum at $t= {1\over 2y}$ and that maximum is $${1\over 4xy}={1\over 4x_1(x_2-x_1)}$$
If $y=0$ we get  $$p_1p_2 = {1\over x}t\leq {1\over x}$$
so in this case maximum is $1/x$
A: I had planned to answer your deleted question on maximum likelihood.  I think the answer here depends on whether $x_2 \gt 2x_1$ or $x_2 \lt 2x_1$:


*

*If $x_2 \ge 2x_1$, I think the product is maximised when $p_1=\frac1{2x_1}$ and $p_2=\frac1{2(x_2-x_1)}$ which makes the product $p_1p_2 = \frac1{4x_1(x_2-x_1)}$, essentially for the reason Maria Mazur gives in her answer

*If $2x_1 \ge x_2 \ge x_1$, I think the product is maximised when $p_1=p_2=\frac1{x_2}$  which makes the product $p_1p_2 = \frac1{x_2^2}$
Note that, as you might expect, these are equal when $x_2 = 2x_1$ since they are then both $\frac1{4x_1^2} = \frac1{x_2^2}$
A: Hint
Substitute from the constraint in the object function (considering $0\le p_1\le p_2\le1$) and differentiate with respect to the remaining variable. Then compare it with the value of the object function in the limit points.
