# Can $\frac{\sum_{k = 0}^n e^{\beta_1 \left( t_k + 2 t_n \right)}}{\sum_{k = 0}^n e^{\beta_1 \left( t_k + t_n \right)}}$ be simplified?

Can the expression $$\dfrac{\sum_{k = 0}^n e^{\large\beta_1 \left( t_k + 2 t_n \right)}} {\sum_{k = 0}^n e^{\large\beta_1 \left( t_k + t_n \right)}}\;\;\text{ where}\;t_i\ge0\;\text { and}\;\;\beta_1\ge0$$ be simplified to avoid overflow due to limited precision arithmetic? The sequence $t_k$ is strictly increasing, that is, $t_{k+1}>t_k$.

-
Maybe I'm drunk, but doesn't this simplify to $e^{\beta_1 t_n}$? –  enzotib Jan 30 '13 at 22:11

## 1 Answer

I would find the value of $k=k_m$ such that $\beta_1 (t_{k_m}+2 t_n)$ is a maximum, and factor out $\exp{[\beta_1 (t_{k_m}+2 t_n)]}$ from both numerator and denominator.

-
Thanks! I forgot to mention that $t_i$ is strictly increasing so the maximum is always at $k=n$. –  Hamilton Jacobi Bellman Jan 30 '13 at 21:49
Hurrah! Thanks @rlgordonma, the factorization worked and since the sequence is strictly increasing there is no need to find the maximum. The answer is given by $\frac{\sum_{k = 0}^n e^{\beta_1 \left( t_k + 2 t_n \right)}}{\sum_{k = 0}^n e^{\beta_1 \left( t_k + t_n \right)}} = \frac{\sum_{k = 0}^n \frac{e^{\beta_1 \left( t_k + 2 t_n \right)}}{e^{\beta_1 3 t_n}}}{\sum_{k = 0}^n \frac{e^{\beta_1 \left( t_k + t_n \right)}}{e^{\beta_1 3 t_n}}} = \frac{\sum_{k = 0}^n e^{\beta_1 \left( t_k - t_n \right)}}{\sum_{k = 0}^n e^{\beta_1 \left( t_k - 2 t_n \right)}}$ which is numerically well-behaved. –  Hamilton Jacobi Bellman Jan 30 '13 at 22:20