Solving a special rational equation on a very small interval I need to solve the following equation (for $x$):
\begin{equation} 
\mathcal f(x):=\sum_{i=1}^n b_i \left( \frac{a_i}{1+b_i x}\right)^2-\phi=0, \quad \text{with} \quad -1/b_1< x \le 0.
\end{equation}
Assume that the equation has at least one solution in $(-1/b_1,0]$ and $b_1\ge b_2\dots\ge b_n>0$. In practice, $b_1$ can be very large, so that the interval of interest $(-1/b_1,0]$ can be very small. Therefore, numerical issues can happen (I think because $1/(1+b_1x)$ can blow up, at least when a numerical method captures a solution that is very close to $-1/b_1$). What is the best practical idea to find a solution of $f(x)=0$ that falls into $(-1/b_1,0]$?
By the way, I am currently using the bisection method and $b_1$ is around 1000 for example. The quantity $n$ could be up to 50 in my case. Further, such an equation must be solved iteratively in my algorithm for different values of $ a_i$'s for $i\in [n]$.
Thank you very much in advance for your time and help.
 A: The current framing of the Question suggests that the $b_i$'s are fixed but the problem (root-finding) will need to be solved repeatedly for varying coefficient's $a_i$.  My remarks are intended to help with the selection of an initial approximation of the root, to be improved iteratively.
Note that the problem specifies only that the $b_i$'s are ordered by weak inequalities:
$$ b_1 \ge b_2 \ge b_3 \ge \ldots \ge b_n $$
Unless the intention is vary those $b_i$'s, we can eliminate a priori consecutive terms with equal $b_i$'s (by lumping them together) in the summation that defines $f(x)$:
$$ f(x) := \sum_{i=1}^n b_i \left( \frac{a_i}{1+b_i x} \right)^2  - \phi $$
So let's assume the $b_i$'s are distinct, although to be sure there is no requirement that they are widely spaced.
Then all the terms in the summation are continuous and strictly decreasing on the interval $(-1/b_1,0]$ in which the root is sought, and only the first term fails to be continuous at left hand endpoint $x=-1/b_1$ because the first term tends to $+\infty$ there.
It follows that any root $f(r) = 0$ with $r\in (-1/b_1,0]$ is unique, and such a root exists if and only if $f(0) \le 0$.  The case $f(0)=0$ is easily checked as it amounts to $\sum a_i^2 b_i = \phi$, so we assume hereafter that the check shows $f(0) \lt 0$.
Locating $r$ is striking the right balance between the contributions of the first term, which are "potentially" unbounded, and the contributions of the rest of the summands, which are at most a finite value we can directly evaluate at $x=-1/b_1$.
My suggestion is that we evaluate those terms:
$$ g(x) := \sum_{i=2}^n \frac{a_i^2 b_i}{(1 + b_i x)^2} $$
at two points and use linear interpolation to approximate their sum in between.  Since those terms are concave up (a convex function), that linear interpolation is consistently an overestimate of their true contribution.
Initially we would evaluate $g(x)$ at the two points $x=-1/b_1$ and $x=0$.  Then we would solve the simpler rational equation (as equivalent to a cubic):
$$ \frac{a_1^2 b_1}{(1 + b_1 x)^2} + b_1(g(0) - g(-1/b_1)) x + g(0) = \phi $$
The solution $r_1$ of this equation will yield $f(r_1) \lt 0$ because of the error introduced by linear interpolation.  Therefore $r_1 \gt r$ overestimates the actual root.
We can then repeat this procedure, replacing evaluation of $g$ at the upper endpoint $x=0$ with evaluation at new upper endpoint $x=r_1$.  The attraction of this method is that it conservatively approaches the actual root from above, and therefore does not risk passing the singularity at $x = -1/b_1$.
