Solution (source code)

= Solution

For $x>1$, write the proposed <density> as $x^{-\alpha}(c-1/x)$. Since the first factor is positive, nonnegativity for all such $x$ requires $c\geq1$; if $c<1$, values sufficiently close to one make it negative. With $c\geq1$, the positive tail is integrable only if $\alpha>1$. In that case normalization requires
$$
\frac c{\alpha-1}-\frac1\alpha=1,\qquad c=\alpha-\frac1\alpha.
$$
Imposing $c\geq1$ now gives $\alpha^2-\alpha-1\geq0$. Combining this with $\alpha>1$ yields
$$
\boxed{\alpha\geq\frac{1+\sqrt5}{2},\qquad c=\alpha-\frac1\alpha.}
$$
Conversely, these conditions ensure a nonnegative, integrable <function> with integral one, so they are sufficient as well as necessary. The endpoint is allowed: the <density> vanishes at the left-hand boundary limit, not on its whole support.