A nonlinear single variable equation Say I have $f(k)$ for all $k = 1, \ldots, 2^n$, and $0\le f(k)\le n$.
I would like to solve for $x$:
$$   x\sum _{k=1}^{2^n }\frac{1}{f(k)+x}  =1. $$
And also this if possible,
$$\sum _{k=1}^{2^{n} }\exp\left(\frac{-f(k)^{2} }{x} \right) =1.$$
Any ideas?
 A: Multiplying both sides of the first equation by
$$\prod_{k=1}^{2^n} \big( f(k) + x\big)$$
reveals that solving your equation is equivalent to solving a polynomial of degree $2^n$, which is possible analytically for $n=0$, $n=1$ and $n=2$, but not in general for $n\geq 3$, unless your coefficients $f(k)$ have a particularly nice form.
A: About the second equation, it seems a solution exists for a unique positive $x$.
Solutions cannot be negative, since the left hand side would be bigger than $2^n$.
On $\mathbb{R}_+$, whe have:


*

*The left hand side is a sum of increasing functions, so it is 
itself increasing.

*Letting $x$ go to $0$, the left hand side goes to $0$.

*Letting $x$ go to infinity, the left hand side goes to $2^n >
   1$.


So there is a unique value in between that solves the equation, but I don't see how to solve it analytically.
Given its monotonic nature, it should be very easy to solve numerically, with a Newton-Raphson method, for example.
A: Solving the second is equivalent to solving for $y$:
$$ \sum_{k=1}^{M} \exp(- a_k y ) = 1$$
for some given $M=2^n$, $ a_k = f(k)^2 $ (so $0 \le a_k \le n^2$), and $x = 1/y$ This is obviously not solvable analytically, but (as Felix points out) it's a nice function, smooth and decreasing, it have a single solution and it's easy to find numerically. Little more can be said withouth knowing $a_k$
