Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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$.

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

1 Answer 1

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.

share|improve this answer
Thanks! I forgot to mention that $t_i$ is strictly increasing so the maximum is always at $k=n$. –  Stephen Crowley 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. –  Stephen Crowley Jan 30 '13 at 22:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.