# Deriving inequalities featuring bounded variables

I have a model which fits certain thermodynamic data, of the form

$$y = \frac{ax}{ 1 + (a - 1)x} + bx(1 - x) \quad a,b \in \mathbb{R} \quad 0 \leq x \leq 1$$

Thermodynamics dictate that $\frac{\mathrm{d}y}{\mathrm{d}x} > 0$ and also that $0 \leq y \leq 1$. I have evaluated these bounds numerically and have found the following region for which these bounds are obeyed (the red region in the following graph):

I would like to describe these bounds analytically but I am stumped by solving inequalities only within a certain region, as presented here for the limits on $x$.

I have tried solving for the extrema of $y$ and the derivative in order ensure that these are bounded, but I've gotten bogged down reasoning about when the roots are inside the region.

Is there a systematic way of deriving bounds on $a$ and $b$ in this specific case, and can anyone point me in the direction of a general method for handling bounded inequalities like this in general?

• Short answer : yes there is (at least in theory), and since your problem only uses rational fractions, your defining inequalities will all be polynomial. This is a typical "quantifier elimination" problem. The details may be messy, and I’ve no idea right now of the complexity of the defining inequalities you’re looking for. The simplicity of your function looks promising though. – Ewan Delanoy Aug 5 '14 at 9:19
• Have I answered your question adequately? Would you like any more explanation, particularly about the last question? – ShakesBeer Aug 9 '14 at 12:17

EDIT: this answer relies on an incorrect formula for y based on a typo in the OP

After working through some inequalities, it would seem to me you've got your region wrong.
e.g. http://www.wolframalpha.com/input/?i=plot+x%2F%281%2B3x%29-2x%281-x%29+for+0%3Cx%3C1 doesn't work, even though the choice of parameters definitely seems to be in your picture.

Anyway, the solution.
$\frac{\mathrm{d}y}{\mathrm{d}x} > 0$ implies that $y$ is increasing, so it makes sense already to check $y(0) \geq 0, y(1) \leq 1$. $y(0)=0$, so that's fine. On the other hand, $y(1)=1/a$, so we learn we always need $a >1$.
This comes in handy now. The derivative is:
$\frac{\mathrm{d}y}{\mathrm{d}x} = b(1-2x)+\frac {1}{(1+(a-1)x)^2}$
We see the right hand term is decreasing in $x$ for $a>1$. So is the left hand term for $b>0$. So for $\frac{\mathrm{d}y}{\mathrm{d}x} > 0$, we need only $\frac{\mathrm{d}y}{\mathrm{d}x} (1) > 0$ , if $b>0$. $\frac{\mathrm{d}y}{\mathrm{d}x} (1)=-b+\frac {1}{(1+(a-1))^2}$, so
$b<\frac {1}{a^2}$ if $b>0$.

For $b<0$ this is less easy to work with. We still want $\frac{\mathrm{d}y}{\mathrm{d}x} > 0$, but this time we will rearrange to give the equivalent inequality:
$b(2x-1)(1+(a-1)x)^2 < 1$. Note we could have used it before as well, but it was not necessary. Checking at $x=0$ immediately gives $b>-1$, but we need to check further. Let $f(x)=b(2x-1)(1+(a-1)x)^2$. We are looking for a maximum of f, so investigate its derivative.
$f'(x)=2b(1+(a-1)x)^2+2b(a-1)(2x-1)(1+(a-1)x)=2b(1+(a-1)x)[(a-1)(3x-1)+1]$
The term in the square bracket is the only one that can change sign, otherwise (if it doesn't) they are all positive, apart from $b<0$. This means that $f'(x)$ is negative and our check at $f'(0)$ was sufficient. Now solve for $f'(x)=0$. This gives $x=\frac{1}{3}(1-\frac{1}{a-1})$. This is in the range $0<x<1$ for $a>2$. So while for $1<a<2$, $b>-1$ is fine, when $a>2$ we get another restriction.
Plugging this value of x back into $f$ gives (after a bit of work):
$b<\frac{27(a-1)}{(3-a)(a+3)^2}$.
We have now ensured $\frac{\mathrm{d}y}{\mathrm{d}x} > 0$ so we are fine about $0 \leq y \leq 1$.
in summary: $a>1$. If $b>0$ then $b < \frac{1}{a^2}$. If $b<0$, then $b>-1$, and if $b<0$ and $a>2$ then $b<\frac{27(a-1)}{(3-a)(a+3)^2}$.

So how did I go about all this?
Initially, I actually started with the derivative. Then I noticed that little simplifying note to give $a>1$. From then on it was just a bit of plug and chug really, there is nothng tricky about these sorts of inequalities. You just have to attack them. Find maxima, minima, etc. But look out for things to make your life easier, such as that thing I noticed with $a>1$, rearranging near the end to give the polynomial function $f$, etc. Also, as was noted in the comment, it can get really messy, there's just not much you can do about it sometimes. Sometimes you can do things with some neat tricks. Helps if you're up to date on some known inequalities too. No one method fits all though.

Let me know if you want me to explain anything a bit more/see any mistakes etc.

• You're going to hate me for this, but I was suspicious about the region not being correct - I made an error in the formula in my question! I've edited to fix it (there was an extra $a$ above the line in the fraction). This actually ensures that $f(1)=1$. I really appreciate the idea of checking the derivative first and letting that sort out the $y>0$ bound. That's smart. I am willing to award the bounty for your work on this question, but I don't really want the answer not to match the question. If you are willing to spend more time, let me know, otherwise I'll edit the question. – chthonicdaemon Aug 10 '14 at 16:21
• do you think you can sort it out based on what I've showed you? I'm not sure I have the time to change the whole thing, maybe just work it out if it's still as easy and show the resulting inequalities – ShakesBeer Aug 10 '14 at 16:34
• @chthonicdaemon it seems to me that graphically we can discern (especially if you made a higher resolution pic) that $a>0$, $b<\frac{1}{a^2}$, $a>-b$. The lowermost one is unclear, you'll have to work on that. Anyway, exactly the same methods as used in my post should work, I've had a look at it. – ShakesBeer Aug 10 '14 at 17:04

I wanted to post a correct solution for posterity.

Since $y=0$ when $x=0$ and $y=1$ when $x=1$ it is clear that the positive derivative constraint is sufficient to find all valid $a$ and $b$. Basically, the only way $y$ can be less than 0 is if the line goes "down". Similarly, the only way $y$ can be larger than 1 but still end up at 1 eventually is for the line to go "down". This reasoning relies on the curve being continuous, but there may be a discontinuity. To avoid a discontinuity, we must require that the numerator doesn't become zero. It is clear that if $a<0$, there will be a discontinuity, so our first constraint is $a>0$.

Taking the derivative with respect to $x$ and collecting terms, we have

$$\frac{\mathrm{d}y}{\mathrm{d}x} = \frac{\left(a x \left(- a + 1\right) + a \left(x \left(a - 1\right) + 1\right) - b x \left(x \left(a - 1\right) + 1\right)^{2} + b \left(- x + 1\right) \left(x \left(a - 1\right) + 1\right)^{2}\right)}{\left(x \left(a - 1\right) + 1\right)^{2}}$$

Since the denominator is squared, the sign of the derivative is completely determined by the sign of the numerator, which turns out to be a third order polynomial. While possible, it is not computationally tractable to calculate the roots of this equation analytically. We can, however, employ Budan's theorem to ensure that there are no roots in the interval (0, 1). Basically, we require that the polynomial obtained by setting $x = \frac{1}{x + 1}$ and multiplying by $(x + 1)^3$ has no changes in sign in the coefficients.

This polynomial is:

$$\left(a + b\right) x^{3}+ \left(2 a b + 3 a - b\right) x^{2}+ \left(a^{2} b - 2 a b + 3 a\right) x + (a - a^{2} b)$$

Requiring no sign changes in the coefficients is equivalent to requiring that each coefficient multiplied by the leading coefficient is positive. This leads to a set of inequalities concerning quadratics, which can be solved relatively easily and shows this constraint region: