# How to find the value of x

Need the formula to find $x$ in the below equation.

$$\frac{A_1}{(1+x)^{y_1}} + \frac{A_2}{(1+x)^{y_2}} + \frac{A_3}{(1+x)^{y_3}} + \cdots + \frac{A_n}{(1+x)^{y_n}} = 0\;(\mbox{or }0.0001)$$

where $A_1,\dots,A_n$ can be any real numbers.

$y_1,\dots,y_n$ can be any numbers between 0 and 1 (including 0 and 1).

-
@AustinMohr A's can be negative – Norbert Nov 3 '12 at 2:53
What makes you think there is such a formula? – Gerry Myerson Nov 3 '12 at 4:43

Let $u=1/(1+x)$ --- there's a formula to find $x$ if and only if there's a formula to find $u$.

We have $A_1u^{y_1}+A_2u^{y_2}+\cdots+A_nu^{y_n}=0$. Let's take $n=3$, $y_1=1$, $y_2=1/5$, $y_3=0$, and write $v=u^{1/5}$ --- there's a formula for $u$ if and only if there's a formula for $v$. But now our equation is $$A_1v^5+A_2v+A_3=0$$ and it's well-known that there is no formula (in terms of arithmetic operations, $n$th roots, exponentials, logarithms, trig functions and the like) for solving this equation.

Since this very simple special case can't be solved by a formula, there's no hope for the general case.

-

As Gerry Myerson showed, there is no general solution, so a numerical method must be used.

To get an initial approximation, you might approximate $(1+x)^{-y_k}$ by $1-x y_k$ so the equation becomes $0 = \sum A_k (1-x y_k) = \sum A_k - x \sum A_k y_k$ or $x = (\sum A_k)/(\sum A_k y_k)$.

Then use Newton's iteration until it converges. If it doesn't converge, use something else:)

-