How do I find the number of interest periods per year? I am currently self-studying logarithms and exponential equations and the book I am using includes the method of calculating different aspects of the compound interest (compounded amount, starting amount, running time, rate of interest), all other aspects being given.
But the number of interest periods per year is never the unknown in any problem, and the book doesn't deal with solving for it, all other aspects known. In short, my question would be:

How do I find the number of interest periods per year, mathematically how do you solve for $x$ in the equation $$\left(\frac{A}{P}\right)^{(rn)^{-1}}=\left(1+\frac 1x\right)^x$$ all other letters known, or simply solve for $x$ in $$c=\left(1+\frac 1x\right)^x$$

Here is my attempt




*

*$A$ is the compounded amount

*$P$ the principal or starting amount

*$r$ the annual rate of interest

*$n$ the time of compounding in years

*$p$ the number of interest periods annually, and for example it equals $1$ if the compounding happens annually, $2$ if semi-annually, $4$ if quarterly, but this is what we are actually looking for.

 A: \begin{align}
c &= \left(1 + \frac{1}{x}\right)^x\\
\implies c^{1/x} &= 1 + \frac{1}{x}\\
\implies c^{u - 1} &= u \quad \tag{Subtitute $u = 1 + 1/x$}\\
\implies \frac{1}{u}c^{u} &= c\\
\implies \left(\frac{1}{u}c^{u}\right)^{-1} &=\frac{1}{c}\\
\implies u\cdot c^{-u} &= \frac{1}{c}\\
\implies -u\cdot c^{-u} &= \frac{-1}{c}\\
\implies -u \ln(c) \cdot e^{-u \ln(c)} &= \frac{-1}{c} \ln(c)\\
\implies -u \ln(c) &= W\left(\frac{-\ln(c)}{c}\right)\\
\implies u &= \frac{-1}{\ln(c)}W\left(\frac{-\ln(c)}{c}\right)\\
\implies 1 + \frac{1}{x} &= \frac{-1}{\ln(c)}W\left(\frac{-\ln(c)}{c}\right)\\
\implies x &= \left(\frac{-1}{\ln(c)}W\left(\frac{-\ln(c)}{c}\right) - 1\right)^{-1}\\
 &= \boxed{\frac{-\ln(c)}{W\left(\frac{-\ln(c)}{c}\right) + \ln(c)}}
\end{align}
Note: $W(x)$ is the Lambert $W$ function. To compute $W(x)$ in WolframAlpha, use ProductLog[x].
A: In general, there is no closed-form for this solution in terms of high-school-level mathematics.

Solve for $x$ in
$$
\left(1+\frac{1}{x}\right)^x = c,\qquad c>1
$$
An answer in terms of the Lambert W function
$$
x = \frac{-\ln(c)}{W_{-1}(-\ln(c)/c)+\ln(c)}
$$
See the link for information on the Lambert W function.
A: As other answers have stated, a “closed form” solution requires using the Lambert W function.  But if you don't have this function available on your calculator or programming library, you may be interested in an approximation.
Some “special” values of $c = (1 + \frac{1}{x})^x$ are:

*

*Annual: $x = 1 \implies c = 2$

*Semiannual: $x = 2 \implies c = 2.25$

*Quarterly: $x = 4 \implies c = 2.44140625$

*Monthly: $x = 12 \implies c \approx 2.613035290224676$

*Weekly: $x = 52.1775 \implies c \approx 2.692682824117828$

*Daily: $x = 365.2425 \implies c \approx 2.7145699419617033$

*Continuously: $x \rightarrow \infty \implies c \rightarrow e \approx 2.718281828459045$
After playing with these numbers a bit, I found a simple rational function that approximates the above values.  (Coefficients are for least-squares error on $\frac{1}{x}$.)
$$x = \frac{1}{1.14962209188153(e-c)^2 + 0.55980701470039(e-c)}$$
This gives correct (to the nearest integer) results for $1 \le x \le 6$, but works less well for more frequent compounding.
