I'm solving a set of equations as part of a simple fixed point optimization algorithm that I am implementing in MATLAB.
I have a set of N numbers A={a(1),a(2),.......,a(N)}. Each a(i) is a member of the positive reals. No order or pattern is presumed in the values of A. I am trying to solve the following equation:
sum(i=1:N){1/(a(i)+x)}=C
To give a simple numerical example with N=4, A={1,3,2,0.5), and C=10:
1/(1+X)+1/(3+X)+1/(2+X)+1/(0.5+X)=10
I can solve x by multiplying through the denominator, creating a 4th order polynomial and then solving this polynomial, but this is a lot of work and not feasible for large datasets (e.g, I have a dataset with n=10000). I'm sure that there must be a simple mathematical trick for solving this function, but I can't seem to find it. Please does anyone have any idea about this?