# We have a simple calculation that we are having troubles solving for n.

• Nov 7th 2012, 02:17 PM
iamblackhawk
We have a simple calculation that we are having troubles solving for n.
A=P((r(1+r)^(n))/((1+r)^(n)-1))

http://www.mathway.com/math_image.as...03)?p=127?p=42

Is this possible? I've tried for a couple of hours but have failed and I need it for some software I'm writing. Any help would be welcomed!

• Nov 7th 2012, 02:22 PM
richard1234
Re: We have a simple calculation that we are having troubles solving for n.
$A = Pr(\frac{(1+r)^n}{(1+r)^n - 1})$

$\frac{A}{Pr} = \frac{(1+r)^n}{(1+r)^n - 1} = 1 + \frac{1}{(1+r)^n - 1}$

Can you take it from here?
• Nov 7th 2012, 04:09 PM
iamblackhawk
Re: We have a simple calculation that we are having troubles solving for n.
great thanks, yes that helped a lot. How did you get to there? The rest I've got.
• Nov 7th 2012, 06:34 PM
skeeter
Re: We have a simple calculation that we are having troubles solving for n.
$\frac{(1+r)^n}{(1+r)^n - 1} =$

$\frac{(1+r)^n - 1 + 1}{(1+r)^n - 1} =$

$\frac{(1+r)^n - 1}{(1+r)^n - 1} + \frac{1}{(1+r)^n-1} =$

$1 + \frac{1}{(1+r)^n - 1}$
• Nov 7th 2012, 06:54 PM
Soroban
Re: We have a simple calculation that we are having troubles solving for n.
Hello, iamblackhawk!

Quote:

$\text{Solve for }n\!:\;\;A \:=\:P\frac{r(1+r)^n}{(1+r)^n-1}$

Multiply by $(1+r)^n-1\!:$

. . . . . . . $A\big[(1+r)^n-1\big] \;=\;Pr(1+r)^n$

. . . . . . . . $A(1+r)^n - A \;=\;Pr(1+r)^n$

m $A(1+r)^n - Pr(1+r)^n \;=\;A$

Factor:. $(A - Pr)(1+r)^n \;=\;A$

. . . . . . . . . . . . $(1+r)^n \;=\;\frac{A}{A-Pr}$

Take logs: n . $\ln(1+r)^n \;=\;\ln\left(\frac{A}{A-Pr}\right)$

. . . . . . . . n $n\ln(1+r) \;=\;\ln\left(\frac{A}{A-Pr}\right)$

. . . . . . . . . . . . . . . $n \;=\;\dfrac{\ln\left(\frac{A}{A-Pr}\right)}{\ln(1+r)}$