I have an optimization problem as below
\begin{align} \max_x&\quad x\sum_{k=1}^{K}\log\left(1+\frac{h_k}{x}\right)+{(1-x) \sum_{l=1}^L \log\left(1+\frac{g_l}{1-x}\right)}\\\text { subject to }&\quad0 < x < 1 \hspace{0.7cm}\\&\quad Q(x)\leq 0 \end{align}
Is it possible use slack variables to reform it (actually first constraint) in a standard format? (I'm aiming to rewrite it as a standard problem and then attempt to find a closed-form solution using the Lagrangian method.)