1
$\begingroup$

I know I could start multiplying by all denominators and try to get the exact value that way but is there some smarter way or shortcut?

Let's take simple example: $\displaystyle \frac{1}{99}+\frac{1}{98}+...+1$. How to approximate or to get the exact value fast?

I know I could split the sequence into sum of geometric series like $$s_{2}=\frac{1}{2}+\frac{1}{4}+...=2,\qquad s_{3}=\frac{1}{3}+\frac{1}{9}+...=\frac{3}{2},$$ but there can be an infinite amount of them if $Max$ is infinite.

  • 0
    If Max is infinite then the sum diverges.2011-06-02
  • 0
    Your "simple example" isn't an example, as min is 1 and max is 99 but everything between 1 and 98 is missing. What do you really mean?2011-06-02
  • 0
    @Gerry Myerson: sorry forgot the dots, corrected.2011-06-02
  • 0
    OK, then Yuval has given you a good answer. $\sum_1^n(1/k)=\log n+\gamma+$ terms of lower order, where $\gamma=.57721\dots$ is the Euler-Mascheroni constant. A websearch for gamma, or Euler-Mascheroni, or harmonic number, will get you tons of information.2011-06-02

1 Answers 1

4

You can use the formula $\sum_{k=l+1}^h 1/k = H_h - H_l$ together with estimates for the harmonic number (here $H_t$ is the $t$th harmonic number). This gives for example the estimate $$\sum_{k=l+1}^h = \ln \frac{h}{l} + O\left(\frac{1}{l}\right).$$

  • 0
    A good answer, but hhh should note that it's not very useful if the number of terms in the sum is small compared to $h$. In that case one has $(h-l)/h\lt\sum\lt(h-l)/(l+1)$.2011-06-02
  • 0
    @hhh, what does it mean to you to differentiate a function you have only defined on the integers?2011-06-02
  • 0
    $Plot( HarmonicNumber(100) -HarmonicNumber(n), n, 0,99)$...now I need to find the inflexion point of this...trying to plot the derivatives in terms of n.2011-06-02
  • 0
    You keep talking of derivatives, but what does derivative of $f(x)$ mean to you, if $f(x)$ is only defined for $x=1,2,3,\dots$? The definition of $f'(a)$ requires $f(x)$ to be defined for all real $x$ near $a$, you can't even get started if $f(x)$ is only defined at integer values of $x$.2011-06-02
  • 0
    @Gerry Myerson: ...like $d/dn(H_{n}) = 1/6 (pi^{2}-6 H_{n}^{2})$ and $D[D[HarmonicNumber[n], n],n] = 2 (H_{n}^{3}-zeta(3))$ where $z$ is the Riemann zeta function. I want to do that on paper fast. I am trying to analyze the sums. For example, I have this kind of $H_{100}-H_{n}$ return/cost -relationship where $n$ stands for the number of cottages and $H_{100}$ for the maximum and to find the best amount of cottages I need to know how to analyze it. Since it does not have inflexion points or zero values with derivatives, I am confused.2011-06-02
  • 0
    @hhh, but I have no idea what $d/dn(H_n)=(1/6)(\pi^2-6H_n^2)$ means, because I don't understand what the left side means. How are you defining the derivative of $H_n$?2011-06-03