How to calculate compounding frequency for an loan (Using Lambert-W Function) 
A bond will become worth 500 dollars when it becomes due in 5 years. If the bond was purchased today for 450 dollars at 2.13% per year, determine how frequently the interest was compounded. 

I tried to solve the question with trial and error, but is there a better way to solve it? 
The function looks like this:
$$500 = 450(1 +{0.0213\over x})^{5x}$$
 A: Consider the more general case of the equation
$$a=\left(1+\frac{b}{x}\right)^{c x}$$ The solution of it is given in terms of Lambert function. I shall skip all intermediate steps and just provide the result; it write
$$x=-\frac{b \log (a)}{\log (a)+b\, c\, W_{-1}(-t)}\qquad \text{where} \qquad t=\frac{ a^{-\frac{1}{b\, c}}}{b \,c}\log (a)$$
Just remember than any equation which can write or rewrite as
$$A+B x+C \log(D+Ex)=0$$ has solution(s) i terms of Lambert function.
For your specific problem, since graphing, you see that the solution is close to $x=1$, you could have done the following : take logarithms of both sides and use Taylor expansion around $x=1$. Working with whole numbers you would get
$$\left(5 \log \left(\frac{10213}{10000}\right)-\log
   \left(\frac{10}{9}\right)\right)+(x-1) \left(5 \log
   \left(\frac{10213}{10000}\right)-\frac{1065}{10213}\right)+O\left((x-1)^2\right)$$ and ignoring the higher order terms, this would give, as an approximation,
$$x=1-\frac{10213 \left(5 \log \left(\frac{10213}{10000}\right)-\log
   \left(\frac{10}{9}\right)\right)}{5 \left(10213 \log
   \left(\frac{10213}{10000}\right)-213\right)}\approx 0.98086$$ while the exact solution is $0.98121$.
