7

Let $A,B \in (0,1)$ be known constants, and $C \in (-\infty, \infty)$ be a known constant. Define

\begin{equation} \xi(x) = \log \big( x \big) + \log \big( 1+x-A-B \big) - \log \big( A - x \big) - \log \big( B - x \big) - C \end{equation}

For a particular application I need to find the root of $\xi(x)$ that satisfies:

\begin{equation} {\rm max}\Big(0, A+B-1\Big) \le x \le {\rm min}\Big(A,B\Big). \end{equation}

Some simple manipulation shows that the roots of $\xi(x)$ are also the roots of this quadratic equation:

$$ (1-e^{C}) x^{2} + \Big(1 - A(1-e^{C}) - B(1-e^{C}) \Big)x - ABe^{C} $$

Which is easily solved with $a=(1-e^{C})$, $b=\Big(1 - A(1-e^{C}) - B(1-e^{C}) \Big)$, and $c=- ABe^{C}$. Comparing these solutions with numerical ones using bisection (with the bracket specified by the contraint above), I find that the solution always coincides with the '+' one of the two solutions to the quadratic equation. Any indication on how to show that analytically?

Macro
  • 588

1 Answers1

8

Assuming $C\neq0$ (since otherwise there is no quadratic equation and your question doesn't arise), we can divide through by $1-\mathrm e^C$, and the quadratic equation becomes

$$x^2+\left(\frac{1}{1-\mathrm e^C}-A-B\right)x-\frac{AB\mathrm e^C}{1-\mathrm e^C}=:x^2+px+q=0\;.$$

Assuming that you labeled the solutions as '$+$' and '$-$' according to the formula for the full quadratic equation, the sign of the square root is reversed if the coefficient we're dividing through by, $1-\mathrm e^C$, is negative, that is if $C>0$. Thus, for the reduced formula with $p$ and $q$, we need to show that for $C<0$ the '$-$' solution violates the bounds and for $C>0$ the '$+$' solution violates the bounds.

Now for $C<0$ we have $1/(1-\mathrm e^C)>1$, and thus $-p<A+B-1$ and $q<0$, and hence

$$-\frac p2-\sqrt{\frac{p^2}4-q}<-\frac p2-\sqrt{\frac{p^2}4}\le-\frac p2-\frac p2=-p<A+B-1\le\max(0,A+B-1)\;,$$

whereas for $C>0$ we have $1/(1-\mathrm e^C)<0$, and hence

$$-\frac p2+\sqrt{\frac{p^2}4-q}\ge-\frac p2\ge\frac{A+B}{2}\ge\min(A,B)\;.$$

Thus, the solution that has a '$-$' in the formula for the full quadratic equation always violates one of the bounds.

joriki
  • 238,052
  • let $A = .4$, $B = .1$, $C = 2$. Then, $p = 1/(1-e^2) - .4 - .1 \approx -.656$. Also, $q = - .4 \cdot .1 \cdot e^{2}/(1 - e^{2}) \approx .046$. So, $-p/2 - \sqrt{ p^{2}/4 - q } \approx .079 > 0$. which directly disagrees with your last line. Am I making a mistake? – Macro Jul 03 '11 at 02:04
  • Also, yes, when $C=0$, the answer reduces to $AB$, which makes perfect sense in the context of the application. – Macro Jul 03 '11 at 02:06
  • In fact, I'm actually finding numerically that the '-' solution violates the upper bound sometimes and the lower bound sometimes. – Macro Jul 03 '11 at 02:11
  • @Macro: You're right, I got the signs mixed up in the case $C>0$. But I don't understand your last comment: If the '$-$' solution sometimes violates the upper bound, how can the '$+$' solution, which is always greater than the '$-$' solution, always fulfil the constraints? Or is that not what you were saying in the question? – joriki Jul 03 '11 at 02:27
  • The '+' solution doesn't have to be larger than the '-' solution. For example, $A=.2$, $B=.6$, $C=.1$ (using the notation in the original post). It depends entirely on the sign of $C$, which is a useful observation I've just now made. – Macro Jul 03 '11 at 02:29
  • @Macro: I see. I was thinking about the '$+$'/'$-$' solutions in the $p,q$ formula -- it seems you're talking about the '$+$'/'$-$' solutions in the $a,b,c$ formula? – joriki Jul 03 '11 at 02:35
  • well the solutions should be the same, yes? Otherwise, dividing through by $(1-e^{C})$ wouldn't be a valid step. However, it will flip the sign of the solution when $C<0$, right? Your $C<0$ case seems clearly correct. Now I just need to show that when $C>0$, $\frac p2-\sqrt{\frac{p^2}4-q} > \min(A,B)$. – Macro Jul 03 '11 at 02:36
  • @Macro: Yes, that's what I meant -- of course the solutions are the same, but we were applying the labels '$+$'/'$-$' differently. About your last conclusion: No, this is what you call the $'+'$ solution, the correct one; you need to show that $\frac p2+\sqrt{\frac{p^2}4-q} > \min(A,B)$ when $C>0$; this is the one you call the '$-$' solution. Otherwise my argument would apply that if $\frac p2-\sqrt{\frac{p^2}4-q} > \min(A,B)$, then also $\frac p2+\sqrt{\frac{p^2}4-q} > \min(A,B)$. – joriki Jul 03 '11 at 02:41
  • I corrected the treatment of the $C>0$ case; I hope the answer is correct now? – joriki Jul 03 '11 at 03:04
  • I've just verified each inequality with $10^{7}$ simulations, which satisfies me. Very nice - thank you! – Macro Jul 03 '11 at 03:13