I would like to maximize the Confluent Hypergeometric Distribution in order to apply a Rejection sampling. The formula of the distribution is
$f(x;a,b,c) = K x^{a-1}(1-x)^{b-1}e^{-cx}$
where $0 \leq x \leq 1$ and $a,b>0, c\in\mathbb{R}$
and let us assume that K is constant in terms of x. I would like to maximize this distribution in order to find an upper bound C and apply the rejection sampling.
$$\frac{d f(x)}{dx} = \left\{x^{a-2} (1-x)^{b-2} e^{-c x} \left(-a x+a-x (b+c-2)+c x^2-1\right)\right\}$$
and set to $0$ gives the real solutions:
$$x = \frac{\pm \sqrt{(a+b+c-2)^2+4 (1-a) c}+a+b+c-2}{2 c}$$