<s>[INST] Want to prove an inequality I want to show that 
$9*\left[\frac{xy}{x+y}-q(1-q)\right]-12*[xy-q(1-q)]+(1-q-x)^{3}+(x+y)^{3}+(q-y)^{3}-1\geq0$  where 
$0<q<1$
$0<x<1-q$
$0<y<q$
$(x+y)\left[1+max\{\frac{1-q}{y},\frac{q}{x}\}\right]\leq3$
I play with it numerically. It is right. But don't know how to prove it analytically. Anybody can help? Thanks a lot.
 [/INST] Remark: Actually, the inequality is quite easy. The trick is to take $x, y$ as parameters.
Denote the expression by $f(q)$.
It suffices to prove that $f(q) \ge 0$ provided that
\begin{align*}
    &x, y > 0,\\
    &x + y < 1,\\
    &3y > (x + y)^2,\\
    &3x > (x + y)^2, \\
    &y < q < 1 - x, \\
    &1 + y - \frac{3y}{x + y} \le q \le \frac{3x}{x + y} - x.
\end{align*}
(Note: Condition $(x+y)\left[1+max\{\frac{1-q}{y},\frac{q}{x}\}\right]\leq3$ is equivalent to $(x + y)[1 + (1-q)/y] \le 3$
and $(x + y)(1 + q/x) \le 3$ which are equivalent to $1 + y - \frac{3y}{x + y} \le q \le \frac{3x}{x + y} - x$.
Also, from $y < \frac{3x}{x + y} - x$, we have $3x > (x + y)^2$,
and from $1 + y - \frac{3y}{x + y} < 1 - x $, we have $3y > (x + y)^2$.)
Note that $f(q)$ is quadratic and concave (the coefficient of $q^2$
is $-3x - 3y$).
Also, we have
\begin{align*}
    f(y) &= \frac{3x(1 - x - y)(2y - x)}{x + y},\\
    f(1 - x) &= \frac{3y(1 - x - y)(2x - y)}{x + y},\\
    f\left(1 + y - \frac{3y}{x + y}\right) &= \frac{3y(2 - x - y)(x - 2y)}{x + y}, \\
    f\left(\frac{3x}{x + y} - x\right) &= \frac{3x(2 - x - y)(y - 2x)}{x + y}.
\end{align*}
We split into three cases:
(1) If $x > 2y$, we have $1 + y - \frac{3y}{x + y} > y$
and $1 - x \le \frac{3x}{x + y} - x$, and
$f(1 + y - \frac{3y}{x + y}) \ge 0$ and $f(1 - x) \ge 0$. Thus, $f(q) \ge 0$.
(2) If $y/2 \le x \le 2y$, we have $1 + y - \frac{3y}{x + y} \le y$
and $1 - x \le \frac{3x}{x + y} - x$, and
$f(y) \ge 0$ and $f(1 - x) \ge 0$. Thus, we have $f(q) \ge 0$.
(3) If $x < y/2$, we have $1 + y - \frac{3y}{x + y} \le y$
and $1 - x > \frac{3x}{x + y} - x$, and
$f(y) \ge 0$ and $f(\frac{3x}{x + y} - x) \ge 0$. Thus, $f(q) \ge 0$.
We are done.
</s>