4

I am trying to solve for $x$ s.t. $$\sum_i^n \frac{1}{x-a_i}=0$$

or

$$\sum_i^n \frac{1}{x-a_i}\rightarrow0$$

$a_i$ is an arbitrary real number. A trivial solution is $x \rightarrow \infty$, and sometimes there aren't other solutions. But when there are nontrivial solutions, how would we be able to solve/approximate them numerically?

I am interested in a case where $n$ is very large so it is impractical to write down an analytic expression of $x$.

EDIT: This is a response to a commenter who asked to provide context. This question comes from a research problem that I am working on. Say I have a symmetric positive definite matrix $M=QAQ^T$ where $A$ is a real diagonal matrix and $Q$ is an orthonormal matrix. I want to find $\lambda$ that satisfies:

$$\left(M-\lambda I \right)^{-1}_k z =0$$

where $\left(M-\lambda I \right)^{-1}_i$ means a $k^{th}$ row of $\left(M-\lambda I \right)^{-1}$. This equality constraint is only applied to one row, which in this case is $k^{th}$ row, and all other rows do not have any constraint.

$$\left(M-\lambda I \right)^{-1} = Q(A-\lambda I)^{-1}Q^T z = Q(A-\lambda I)^{-1}b$$

where $b=Q^T z$. In other words, we want to solve

$$ Q_k(A-\lambda I)^{-1}b = 0$$

where $Q_k$ is $k^{th}$ row of $Q$. Now this has the following form:

$$\sum_i^n \frac{c_i}{a_i-\lambda}=0$$

I figured it will be sufficient to ask a simpler question: how to solve for $x$ such that

$$\sum_i^n \frac{1}{x-a_i}=0$$

AetbeUT
  • 555
  • 1
    What is $a_i$ ? – Atmos Sep 22 '21 at 20:07
  • $a_i$ is an arbitrary real number. I will edit the post to clarify. @Atmos – AetbeUT Sep 22 '21 at 20:09
  • I'm still a bit unclear, are there $n$ different real numbers $a_1, a_2, \cdots$ here? Are they, essentially, randomly chosen? EDIT: I suppose there must be multiple different numbers, or the only solution would be $x \to \infty$. – Eric Snyder Sep 22 '21 at 20:13
  • Do you want to find all the solutions ? Only one ? – Atmos Sep 22 '21 at 20:15
  • 1
    Yes, $a_1, a_2, a_3,...$ are randomly chosen real number (they are all different). @EricSnyder – AetbeUT Sep 22 '21 at 20:16
  • I am wondering if I can find all the solutions! @Atmos – AetbeUT Sep 22 '21 at 20:17
  • 2
    The expression you have written is a rational expression. It can be rewritten as the quotient of two polynomials of degree $\le n$. The expression will only be zero when the numerator is zero. So you want to determine values of $x$ such that a (potentially high degree) polynomial function is zero. There are algorithms for finding the roots of polynomials, so my impulse is to expand out the expression and work with the numerator. Of course, it is impossible to know if this will be helpful, as I don't know why you want to solve this equation. – Xander Henderson Sep 22 '21 at 20:23
  • Are you sure the question wants to find all the solutions? Because as far as I rememeber, I solved a similar problem years back which asked to prove that real solutions exist. – Sayan Dutta Sep 22 '21 at 20:24
  • In any event, I have closed this question, as it lacks context. As I said above, it would be incredibly helpful to know why you are trying to solve this problem. It would also be helpful to know something of your background (e.g. are you a student in a mathematics class? which class?), and what theorems or other results you think might be relevant. At the very least, it would be helpful to see what kind of approach you have tried thus far. – Xander Henderson Sep 22 '21 at 20:26
  • @XanderHenderson Thank you for the advice. – AetbeUT Sep 22 '21 at 20:27
  • 3
    Each $a_i$ produces a hyperbola. Negative when $x < a_i$ and positive when $x > a_i$. Sort $a_i$. A zero will exist between each adjacent pair of $a_i$. Use a bracketing method between $a_i$ and $a_{i+1}$ to converge on the solution. This question should be reopened. –  Sep 22 '21 at 20:35
  • 1
    @XanderHenderson I edited to post to provide context. I can also provide the context of the context, but I don't think it will be relevant at the level... +1 on reopening the question! – AetbeUT Sep 22 '21 at 21:11
  • 1
    If $f(x) = \prod\limits_{i=1}^n(x-a_i),$ then this is the same as: $$\dfrac{f'(x)}{f(x)} = 0.$$ so you just need to solve for $f'(x) = 0.$ – dezdichado Sep 22 '21 at 21:14
  • @arthur Thanks for the insight. Could you please elaborate? – AetbeUT Sep 22 '21 at 21:18
  • 3
    I find it beyond absurd that the question was closed because it "lacks context". Sure, context is always nice, but lacking context should not be a reason for closing a perfectly clear and worthwhile question. – Dan Asimov Sep 22 '21 at 21:53
  • @DanAsimov I would invite you to look at the original version of this question, which is the version which was closed. I would also invite you to read back through the comments in reply to that version of the question, which expressed confusion about the nature the problem for a number of reasons. So, even if we ignore the long-standing consensus that lacking context is a good reason for closing a "perfectly clear and worthwhile question", there is good reason to believe that this question was not "perfectly clear and worthwhile" (in its previous form). – Xander Henderson Sep 22 '21 at 23:56
  • Have a look at this question https://math.stackexchange.com/questions/3078167/efficient-algorithm-for-solving-equation-sum-n-a-n-x-x-n-1/3078999#3078999 this is a problem we worked in my group for decades since it happens billions of billions of times in chemical engineering and oil&gas industry (in a single simulation) – Claude Leibovici Sep 23 '21 at 06:31
  • If I may add, never consider the polynomial transform of it – Claude Leibovici Sep 23 '21 at 06:32

1 Answers1

1

Each $a_i$ produces a hyperbola.

Negative when $x<a_i$ and positive when $x>a_i$.

Sort $a_i$.

A zero will exist between each adjacent pair of $a_i$.

Use a bracketing method between $a_i$ and $a_{i+1}$ to converge on the solution.

Note the "walls" reach $\infty$ and $-\infty$ and the influence from outside adjacent $a_i$ decays rapidly.

Octave/Matlab code

f = @(x) 1./(x-1) + 1./(x-2) + 1./(x-3);
x = [-1:0.001:5];
y = f(x);
# clip y values for plotting
ylimit = 100;
[s idx] = find(y > ylimit);
y(idx) = ylimit;
[s idx] = find(y < -ylimit);
y(idx) = -ylimit;
plot(x,y); grid minor on;
title("f(x) = 1/(x-1) + 1/(x-2) + 1/(x-3)","fontsize",10);

print polegraph.jpg

enter image description here

  • This is very nice. Thank you. I believe this method can be used to solve $\sum_i^n \frac{c_i}{x-a_i}=0$ as well, right? – AetbeUT Sep 22 '21 at 21:31
  • Yes. I've been working on a problem that ends up with similar equations. –  Sep 22 '21 at 21:33