1

$$x=\sum_{N=1}^TA^N$$Say I have a problem like this , how would go about rewriting this equation so that I can solve for t using x and a? I don't know what the individual variables are called so I couldn't look it up using google. I am guessing that doing this isn't easy. So if it is as hard as I think it probably is maybe you could just give me a link explaining how to do this if it is even possible.

NoahGav
  • 121

2 Answers2

1

The answer is... $$T =\frac{ \log (-X+XA+A) }{\log (A)}-1$$. I think $X$ and $A$ can't be less than one.

NoahGav
  • 121
  • There are problems with your solution, which are rooted in problems with your question. The notation is inconsistent, replacing $A$ with $a$ and $T$ with $t$. You write (for example) $\ln(a)$ but give no condition that restricts $a \gt 0$ to justify this use of logarithms. In posting a self-answer you surely have the opportunity to make the necessary improvements. – hardmath Oct 17 '15 at 00:37
  • Does this help? – NoahGav Oct 17 '15 at 21:43
  • Perhaps a minor point but (as I discussed in my more detailed answer) the case $A=1$ will give division by zero in the above formula. – hardmath Oct 17 '15 at 22:04
1

The notation used in the Question is slightly inconsistent, so let's fix attention on the variables used first, in the top equation:

$$ x = \sum_{N=1}^T A^N $$

Note that $N$ is a "bound variable" internal to the indicated summation, so $N$ is not a variable that will appear in an expression for $T$.

Since this is a geometric series with $T$ terms (a natural number, presumably $T \ge 1$), if $A\neq 1$, we can also say:

$$ x = A \frac{A^T - 1}{A - 1} $$

Thus $A^T = x \frac{A-1}{A} + 1 = x - \frac{x}{A} + 1$, provided $A\neq 0$.

Before proceeding to offer a solution involving logarithms, let's deal with the two special cases:

A = $0$ : If $A=0$, the only possible value for $x$ is also zero. In this case the value of $T$ can be any natural number, since the sum will always be zero however many summands are used.

A = $1$: In this case $x = T$, the number of summands used ($x = 1+1+\ldots + 1$, added $T$ times).

Otherwise ($A\neq 0,1$) we can use logarithms to find $T$, although numerically we may not get an exact integer due to rounding of floating point operations. If $A \gt 0$ we could say:

$$ T = \log_A (x \frac{A-1}{A} + 1) $$

For the ease of programming, and to deal with the case that $A$ (and possibly $x$) may be negative, we can introduce absolute values:

$$ |A|^T = \left|x \frac{A-1}{A} + 1 \right| $$

Now we can validly take logarithms (of any convenient base):

$$ T = \frac{ \log \left|x \frac{A-1}{A} + 1 \right| }{\log |A|} = \frac{ \log \left|x - \frac{x}{A} + 1 \right| }{\log |A|} $$

hardmath
  • 37,015