It appears it's been a while since I've dealt with advanced algebra (or exponents outside of excel). I'm writing a tiny piece of software to solve for $n$. But I can't seem to isolate $n$ in the following equation:
$$P = L\left(\frac{c(1+c)^n}{(1+c)^n-1}\right)$$
I have gotten just up to:
$$(1+c)^{n+P} - P = (1+c)^{c+n+L}$$
$P$, $L$, and $c$ are my inputs.
Please advise on how to isolate $n$.
$\endgroup$ 52 Answers
$\begingroup$I don´t get your intermediate result. My calculation is the following.
$P = L\cdot \frac{c(1+c)^n}{(1+c)^n - 1} $
Multiplying the equation by $((1+c)^n - 1)$
$P \cdot ((1+c)^n - 1)= L\cdot c(1+c)^n $
Multiplying out the brackets
$P \cdot (1+c)^n - P = L\cdot c(1+c)^n $
$P \cdot (1+c)^n - L\cdot c(1+c)^n = P $
Factoring out $(1+c)^n $
$(1+c)^n \cdot ( P- L\cdot c) = P $
$(1+c)^n = \frac{P}{P- L\cdot c} $
Taking $\ln()$ on both sides.
$\ln\left((1+c)^n \right)=\ln\left(\frac{P}{P- L\cdot c}\right)$
$n\cdot \ln\left(1+c \right)=\ln\left(\frac{P}{P- L\cdot c}\right)$
$n=\frac{\ln\left(\frac{P}{P- L\cdot c}\right)}{\ln\left(1+c \right)}$
$\endgroup$ 4 $\begingroup$It is $$\frac{P}{L}(1+c)^n-\frac{P}{L}=c(1+c)^n$$ so$$(1+c)^n\left(\frac{P}{L}-c\right)=\frac{P}{L}$$Can you finish now? It is $$n\ln(1+c)=\ln\left(\frac{P}{P-Lc}\right)$$
$\endgroup$ 2