I don't think you are writing that correctly. Shouldn't it be 5/(1+k) + 9/(2+k) ... with parenthesis around each denominator term? This detail is very, very important. I would add parenthesis around each term summed so you don't have to rely on interpretation of the precedence list.

I would first try the Newton-Raphson method as described at : Fast and Stable Polynomial Root Finders - Part Two[^] although I am not certain it would work for this equation.

If that doesn't work you could try a binary search approach. First try a succession of values to find two numbers where one answer gives a result above zero and the next one gives a result below zero, or vice versa. Then you try a result in the middle of those two and subsequently keep trying the middle value between two others until you get an answer that is within your tolerance, the epsilon described in my previous reply. In your previous question, you tried successive values between -10000 and 10000, if I recall correctly. You try this method with those as the two initial guesses. If they give results with opposite signs then those are reasonable first guesses. Then keep trying the middle value between guesses.

The key to this approach is picking the right value to check next. What I mean is if -10000 and 10000 are tried first and the results are of opposite signs, then try 0 next. The result of the check with 0 will determine which value you try next. As an example, let's say the result of checking -10000 is negative and the result of 10000 is positive then check 0 next. If the value at zero is negative then try +5000 next. If the value at zero is positive then try -5000 next, and keep splitting the difference like that until you have zeroed in on the result.

ETA: as my comment stated, I decided to try this and I am not sure I understand the formula correctly. The problem is, given the way I wrote it above, there are four asymptotes toward infinity at -1, -2, -3, and -4. I ended up finding the one at -1 first using a binary search.

The question I have is what does it really mean to "fit the values of k into the equation? If it is finding k so that formula is zero then I don't think it is possible because of the asymptotes.

15,903,175 members

formula = 5/(1+k) + 9/(2+k) + 13/(3+k) + 17/(4+k) - 16 ?