Who to solve compound interest formula for t?

67 Views Asked by At

By using this modified compound interest formula I can find the monthly payment for a mortgage:

$$x = {1000 \cdot (1 + 0.05 \div 12)^{12t} \over 12t}$$

Instead of providing the time to find the monthly payment, I need to provide the desired monthly payment to find the time. How can I solve it for t ?

$$100 = {1000 \cdot (1 + 0.05 \div 12)^{12t} \over 12t}$$

2

There are 2 best solutions below

0
On

Your equation is of the form $$ x = \frac{ab^{ct}}{ct} := f(t) $$ for $a,c>0$ and $b>1$. Now consider the function $$ f:\mathbb{R}_{> 0} \rightarrow \text{img}(f) \subseteq \mathbb{R}_{> 0}, \quad f(t) = \frac{ab^{ct}}{ct}. $$ It is only possible to solve your equation for general $t>0$ if and only if for every $x \in \text{img}(f)$ there is exacty one $t$ such that $x = f(t)$ (think about this). This is precisely the case if $f$ is a bijection. Morever, $f$ is a bijection if and only if it is strictly increasing or strictly decreasing on its whole domain $\mathbb{R}_{>0}$.

To check if $f$ is strictly increasing or strictly decreasing, we take a look at its derivate:

$$ f'(t) = \frac{cab^{ct}(t\ln(b)c-1)}{(ct)²} $$

From this, we see that $f'$ changes its sign at $t = 1/(\ln(b)c)$. Therefore $f$ can neither be strictly increasing or strictly decreasing, because then $f'$ would either be strictly positive or strictly negative on the whole domain $\mathbb{R}_{>0}$.

This proves, that unfortunately it is impossible to solve you equation for $t>0$. For example, it can happen, that for a fixed $x \in \text{img}(f)$ there are two different time points $t_1 \neq t_2$ such that $f(t_1) = f(t_2) = x$. For a given $x \in \text{img}(f)$, however, you can always find a $t$ such that $f(t) = x$ with numerical methods.

0
On

Considering your last equation$$100 = {1000 \cdot (1 + 0.05 \div 12)^{12t} \over 12t}$$ let $x=12t$ and simplify it as $$\frac x {10}=a^x\qquad \text{where}\qquad a=1+\frac{0.05}{12}$$ This kind of equation has solution$\color{red}{(s)}$ in terms of Lambert function $$x=-\frac{W(-10 \log (a))}{\log (a)}$$ For this value of $a$, we then have $$x=-\frac{W\left(-10 \log \left(\frac{241}{240}\right)\right)}{\log \left(\frac{241}{240}\right)}$$ Since the argument is small $(10 \log \left(\frac{241}{240}\right)\approx 0.0415801)$, we can use the expansion (for small values of $z$) $$W(z)=z-z^2+\frac{3 }{2}z^3+O\left(z^4\right)$$ and get $$x\approx 10 \left(1+10 \log \left(\frac{241}{240}\right)+150 \log ^2\left(\frac{241}{240}\right)\right)\approx 10.4417$$ and then $t\approx 0.870145$ while the "exact" solution would be $t\approx 0.870319$.

However, as Joker123 mentioned in his/her answer, the problem is that there is a second solution to the equation since Lambert function is multi valued. This second solution is given by $$x=-\frac{W_{-1}(-10 \log (a))}{\log (a)}$$ For the $W_{-1}(z)$ branch, use the other given approximation $$W_{-1}(z)=L_1-L_2+\frac{L_2}{L_1}+\frac{L_2(L_2-2)}{2L_1^2}+\cdots$$ where $L_1=\log(-z)$ and $L_2=\log(-L_1)$.

This would lead to $x\approx 1142.15$ and then to $t \approx 95.1793$ while the "exact" solution would be $t\approx 94.9001$.