I need someone to compute a constrained optimization problem. I couldn't find any software that could handle an optimization problem as long as this one is, and I don't want to resort to hand calculating it just yet. Here's the problem:
Maximize $$\frac{fz+p^2+q^2z^2+bz-\left(\left(f+c+q^2\right)z+p^2+d+b\right)\left(\left(q^2+a+b\right)z+f+g+p^2\right)}{\sqrt{\left[\left(f+c+q^2\right)z^2+p^2+d+b-\left(\left(f+c+q^2\right)z+p^2+d+b\right)^2\right]\left[\left(q^2+a+b\right)z^2+f+g+p^2-\left(\left(q^2+a+b\right)z+f+g+p^2\right)^2\right]}}$$
Subject to $$a, b, c, d, f, g, p, q \geq 0, \\ p+q\leq1,\\ a+c=2(1-p-q)q, \\ b+f=2pq, \\d+g=2(1-p-q)p, \\z<0$$.
If this isn't possible, I am okay with turning the constraint of $z<0$ into $z\leq0$. If that doesn't work, then I am okay with giving $z$ a lower bound of -1000. If that doesn't work, then I am okay with just maximizing the numerator of the fraction and minimizing the denominator of the fraction and seeing how that works out.
This is essentially a comment that guides the new OP on how to proceed with their problem, but was too long (and cluttered) to write as a comment.
Questions you need to answer to answer your question.
My starting assumption is that: it is important to you to answer this question. I state this at the outset because you will have to do some work and learn some tools in order to get this answer.
The good news so far is that this shouldn't be a difficult problem to find an approximate near- minimizer for. You should certainly be able to determine whether $z > -1000$.
The bad thing is that you need to do some work. You need to decide exactly what you want and how much work you're willing to do to get it. At least,
If you want to know all of the above, how precisely do you want to know it? For instance, let's say an exact, unique maximum value $x^*$ exists (again, it could be $\infty$, and there could be multiple minimizing points). Do you...
Tasks
In order of increasing difficulty, here is what you should do: