# Optimizing a function under strictly positive constraint

Find x and y that optimise

\begin{align} f(x,y) &= (-a-y)(\Psi(y)-\Psi(x+y)) + (b-x)(\Psi(x)-\Psi(x+y)) \\ &-\log \Gamma(x+y) + \log\Gamma(x) + \log\Gamma(y) \end{align}

where a, b are strictly positive constant.

Taking the derivative of $$f(x,y)$$ w.r.t. $$x$$, we get \begin{align*} \frac{\partial}{\partial x}f(x,y) = (b-x)\Psi'(x) - (b-x-a-y)\Psi'(x+y) \end{align*}

Taking the derivative of $$f(x,y)$$ w.r.t. $$y$$, we get \begin{align*} \frac{\partial}{\partial x}f(x,y) = (-a-y)\Psi'(y)-(b-x-a-y)\Psi'(x+y) \end{align*}

It gives $$x = b$$ and $$y = -a$$ which means $$y<0$$ since $$a>0$$. Here $$\Psi$$ is digamma and $$\Psi'$$ is trigamma.

How can I proceed from here to optimise $$f(x,y)$$ such that $$x > 0$$ and $$y > 0$$.?

• What are the functions $\Psi$ and $\Gamma$? – David M. May 11 at 13:56
• $\Psi$ is digamma function and $\Gamma$ is gamma function. – bemma May 11 at 13:56
• In general, nonlinear optimization models and algorithms are not capable of handling strict inequality constraints. The typical way to handle this is to instead require $x \ge \epsilon$ for small $\epsilon$. – LarrySnyder610 May 11 at 14:01
• @LarrySnyder610 If we introduce $x \ge \epsilon$ then is $y = \epsilon$ the solution? – bemma May 11 at 14:02
• @ThePheromoneKid I want to maximise the function. – bemma May 13 at 12:02