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.
As said in comments, let $x=\frac y{b_1}$ and $c_i=\frac {b_i}{b_1}$ to make $$\sum_{i=1}^n b_i \left( \frac{a_i}{1+b_i x}\right)^2=b_1\Bigg[\frac{a_1^2}{(1+y)^2}+\sum_{i=2}^n \frac{ a_i^2\, c_i}{(1+ c_i\,y)^2}\Bigg]$$ Now, to get rid of the vertical asymptote at $y=-1$, we shall muliply everything by $(1+y)^2$ and consider the function
$$g(y)=b_1\Bigg[{a_1^2}+{(1+y)^2}\sum_{i=2}^n \frac{ a_i^2\, c_i}{(1+ c_i\,y)^2}\Bigg]-\phi(1+y)^2$$ for which $$g(0)=-\phi+b_1 \sum_{i=1}^n a_i^2\qquad \qquad g(-1)=b_1\,a_1^2 >0 \qquad \qquad g'(-1)=0$$ $$g''(-1)=-2\phi+2b_1 \sum_{i=2}^n \frac { a_i^2\, c_i } {(1-c_i)^2 }$$
Assuming $g(0)<0$, using Taylor around $y=-1$, we have $$g(y)=g(-1)+\frac 12 g''(-1) (y+1)^2+ O\left((y+1)^3\right)$$ and then a first estimate $$y_0=-1 +\sqrt {-\frac {b_1 a_1^2} {g''(-1)}}$$
Let us try using $n=5$, $b_i=10^{5-i}$, $a_i=p_{i+5}^2$ and $\phi=12345678987654321$. This gives as an estimate $$y_0=-1+\sqrt{\frac{175914852251400405000}{15208068862859378242920969041} }\sim -0.999892$$ while the exact solution, obtained using Newton method is $-0.999848$
Starting with this guess, Newton iterates would be $$\left( \begin{array}{cc} n & y_n \\ 0 & \color{red}{-0.99989}244905795162394 \\ 1 & \color{red}{-0.9998}3867358692746307 \\ 2 & \color{red}{-0.999847}63616543148912 \\ 3 & \color{red}{-0.999847899}77068160754 \\ 4 & \color{red}{-0.999847899999109}03399 \\ 5 & \color{red}{-0.99984789999910920552} \end{array} \right)$$
Very immodestly, let me precise that this method bears my name.
Edit
If you are coding, for a complete safety, combine bisection and Newton methods . If you go to this place, on page $359$, you will find subroutine RTSAFE (here and here) which does exactly that. It is very robust.
I apologize for giving you a reference to Fortran coding. If you can access the books of Numerical Recipes, you will find the equivalent in C and C++.