Sorry for the possibly stupid question. But I can't solve this equation. I'm need to find X from:
$$N = \frac{\log(\frac{Bd-X}{Ad-X})}{\log(D)} - \frac{\log(1-\frac{Bi}{P+X})}{\log(I)}$$
I don't know how to kill log in this equation.
This is a credit card loan analysis problem.
$A$ - the loan Amount (initial loan balance, $B_0$)
$N$ - the total Number of payments/periods/month for the entire loan (from $B_0$ till $B_N$)
$B_n$ - the Balance after n payments have been made
$i$ - the Interest rate per period, not per year, $0 < i < 1$
$p$ - the Payment rate, $0 < p < 1$, $i <= p$
$P$ - the min. Payment amount
Actual payment for loan (of this type) $Payment = MIN(A*p ; P)$
$X$ - additional eXtra payment
$B$ - loan balance at some "threshold point" $B_t = P/p$
When loan balance $B_n > B_t$ then payment $=B_n*p$ and number of periods: $$N_{B_n>B_t} = \frac{\log(\frac{Bd-X}{Ad-X})}{\log(D)}$$ When loan balance $B_n <= B_t$ then payment $=P$ and number of periods: $$N_{B_n<=B_t}=-\frac{\log(1-\frac{Bi}{P+X})}{\log(I)}$$ $$N = N_{B_n>B_t} + N_{B_n<=B_t}$$
Variable Replacements:
$I = 1 + i$, $1 < I < 2$
$d = i - p$, $-1 < d < 0$
$D = 1 + i - p$, $0 < D < 1$
$log$ base is $10$ but I can replace it with $e$ or anything else.
Please send me in the right direction.
Thanks in advance.
By a combination of homography and antilogarithms, you can turn this equation to the form
$$t^a(rt+1)=pt+q$$ where the unknown is $t$.
The details are unimportant, this is just to show that except for a few very specific cases (such as $a=1,2,3$), there is no analytical solution. You need to use a numerical solver.