3

I plotted the function

$$f(x) = \sum_{n=1}^x \frac{1}{n}$$

in Wolfram Alpha over $x\in\mathbb{R}$ and it gave me some unexpected behavior for negative $x$. This function is obvious for $x\in\mathbb{N}$. Can anyone explain how Wolfram Alpha is computing this? Is the plot below a numerical artifact or is there some function on $x\in\mathbb{R}$ that agrees with $f(x)$ when $x\in\mathbb{N}$?

enter image description here

https://www.wolframalpha.com/input/?i=plot+sum+1%2Fn+n%3D1+to+x

Erik M
  • 2,391

2 Answers2

4

Extension of the sum from integers to reals uses the Gamma function, which has poles at the negative integers.

See the last equation on the page:

http://en.wikipedia.org/wiki/Harmonic_series_%28mathematics%29#Relation_with_Gamma_Function

orion
  • 15,781
2

If you just enter the sum without plotting it, you'll see that Mathematica has produced an analytic closed form for it.

We can consult wikipedia to learn more about the digamma function.

There is surely some uniqueness theorem, although I have no experience with them. I imagine it is something like that is unique analytic closed form for your sum that is both increasing and concave down on the positive reals.