[tex]A=P\left(1+\dfrac rn\right)^{nt}[/tex]
[tex]\dfrac AP=\left(1+\dfrac rn\right)^{nt}[/tex]
[tex]\ln\dfrac AP=nt\ln\left(1+\dfrac rn\right)[/tex]
[tex]\dfrac{\ln\frac AP}{nt}=\ln\left(1+\dfrac rn\right)[/tex]
[tex]e^{\ln(A/P)/(nt)}=1+\dfrac rn[/tex]
[tex]e^{\ln(A/P)/(nt)}-1=\dfrac rn[/tex]
[tex]n\left(e^{\ln(A/P)/(nt)}-1\right)=r[/tex]