maximum likelihood two unknown parameters I have a problem. I have to find the mle's (maximum likelihood estimators) for $a$ and $b$ whose density is $f(x|a,b)$, when I derive the $l(b|x)$ (The log-likelihood function) to find the maximum, $b$ is in terms of $a$. But $a$ is unknown.
any suggestions of what to do?
density is $f(x|a,b)=3ax^2+2bx+(1-a-b),~~0<x<1$ and $f$ is decreasing throughout (0,1)
thanks
 A: This answer goes through the minimal amount of analysis to discern the nature of the problem, find a solution method, and identify potential problems or limitations.  In the end, you will need to use numerical methods to maximize the likelihood.

In order for any function to be a density, it has to integrate to $1$ and be nonnegative throughout its domain, which here is $[0,1]$.  When we add the requirement that it be decreasing, we obtain a set of linear conditions on the parameters $a$ and $b$:


*

*$1 = \int_0^1 f(x) dx$ automatically.

*$1-a-b = f(0) \ge f(1) = 3a + 2b + 1-a-b = 1 + 2a + b \ge 0$.

*$6a x + 2b = f^\prime(x) \le 0$ for $x\in [0,1]$, so in particular $2b = f^\prime(0) \le 0$ and $6a + 2b = f^\prime(1) \le 0$.
Conditions (2) and (3) determine five half-planes in $(a,b)$ coordinates.  Their intersection is a triangle with vertices at $(-1,0)$,$(0,0)$, and $(1,3)$, as shown in the figure.

This is the set of possible values of the parameters.  Its boundary consists of portions of the zeros of three functions which are negative on the interior:
$$\cases{g_1(a,b) = 3a + b \\ g_2(a,b) = b \\ g_3(a,b) = -(2a + b + 1).}$$
Given iid data $\mathbf{x}=(x_1, x_2, \ldots, x_n)$ drawn from such a distribution, the log likelihood of $(a,b)$ is (by definition) the logarithm of the probability of $\mathbf{x}$.  It depends on the unknown value $(a,b)$:
$$\Lambda(a,b|\mathbf{x}) = \sum_{i=1}^n \log f(x_i|a,b) = \sum_{i=1}^n \log \left(3ax_i^2 + 2b x_i + 1-a-b\right).$$
Critical points $(a,b)$ satisfy the KKT conditions: there must exist constants $\mu_1, \mu_2, \mu_3$ such that
$$D f(a,b) = \mu_1 D g_1(a,b) + \mu_2 D g_2(a,b) + \mu_3 D g_3(a,b).\tag{1}$$
(There are additional conditions that amount to asserting that $(a,b)$ lies within the triangle, the $\mu_i$ are non-negative, and each product $\mu_i g_i(a,b)$ is zero.)
The derivatives are readily computed:
$$\eqalign{
D f(a,b) &= \left(\frac{\partial f}{\partial a}(a,b), \frac{\partial f}{\partial b}(a,b)\right)^\prime \\
&= \left(\sum_{i=1}^n \frac{3x_i^2 - 1}{3ax_i^2 + 2b x_i + 1-a-b}, \sum_{i=1}^n \frac{2x_i - 1}{3ax_i^2 + 2b x_i + 1-a-b}\right)^\prime; \\
Dg_1(a,b) &= (3,1)^\prime; \\
Dg_2(a,b) &= (0,1)^\prime;\\
Dg_3(a,b) &= (2,1)^\prime.
}$$
When the algebra is performed and a common denominator is found, the numerators in $(1)$ become high-degree polynomials in $a$ and $b$: you need to solve this one numerically.  When you do, you will obtain at least one $(a,b)$ for which $\Lambda$ is maximized.  If one or more of the $\mu_i$ are nonzero (and any constrained optimizer will tell whether this is so), then the solution is on the boundary and special techniques are needed to develop confidence intervals for the estimates.
