3

I was wondering what comparing the graph of 1+2+3... with 1×2×3... would look like. In doing so, I tried graphing 1×2×3... in Excel, but no matter how many points I plotted (e.g. 5, 120 vs. 8, 40320) I kept getting a jagged angle towards the end, like so: multiplication slope to precision of 81

where $y\in 1,2,6,24,120,720,5040,40320$.

Compare this with the smooth

addition slope to precision of 8

Is the graph just a series of successive jagged angles? Also, what is the derivative of the series 1×2×3...? How much faster does it grow than 1+2+3...? What are the two series called? I can't seem to find a graphing software online whihch will allow me to scale down the x asis and scale up the y axis so that I can see how the two functions grow in the same amount of time. Such a graph would be appreciated.

Sam
  • 153
  • 2
    The sum of the first $n$ natural numbers is $s(n)={n^2+n\over 2}$; this is a good exercise (think about pairing up $1$ and $n$, and $2$ and $n-1$, and so on; it may help your intuition to first assume that $n$ is even). The product of the first $n$ natural numbers meanwhile is the factorial function, denoted "$n!$." Note that $s$ makes sense for arbitrary real numbers, not just natural numbers; the factorial function is a bit messier in this regard , but can be extended to the Gamma function. – Noah Schweber Oct 02 '20 at 04:58
  • 4
    The second graph isn't smooth either, it's just that the differences between successive $y$ values are smaller so the angles aren't as steep as in the first graph. I will plot both graphs on the same scale in Mathematica and post it as an answer. – Randy Marsh Oct 02 '20 at 05:03

1 Answers1

3

Here are the graphs of the functions $f(n)=1+2+\cdots+n$ (blue) and $g(n)=1\times2\times\cdots\times n$ (orange) for $n=5$, $n=10$ and $n=100$

$\mathbf{n=5}$

enter image description here

$\mathbf{n=10}$

enter image description here

$\mathbf{n=100}$ (here the blue graph for addition is barely visible)

enter image description here

The blue function appears smooth, for example as below for $n=100$.

enter image description here

However it is not, it has a jagged angle at every integer value on the $x$-axis. The reason that it appears smooth is that the change of angle at $x=n$ and $x=n+1$ is smaller and smaller as $n$ grows larger: the slope of the line segment between the points $(n,f(n))$ and $(n+1,f(n+1))$ is $$\frac{f(n+1)-f(n)}{n+1-n}=\frac{(1+2+\cdots+n+1)-(1+2+\cdots+n)}{1}=n+1,$$ so the ratio of the slopes of two consecutive line segments is $\frac{n+1}{n}=1+\frac{1}{n}$. Therefore, as $n$ grows larger and larger, the slopes of two consecutive line segments change by only a very small amount that eventually the human eye can't discern and because of that the graph appears smooth.

Contrast this with the orange graph for the product: first, we write $1\times2\times\cdots\times n$ as $n!$ (read as '$n$ factorial'). The slope of the line segment between the points $(n,g(n))$ and $(n+1,g(n+1))$ is $$\frac{g(n+1)-g(n)}{n+1-n}=\frac{(n+1)!-n! }{1}=(n+1)!-n!=n!((n+1)-1)=n!\cdot n.$$ The ratio of the slopes of two consecutive line segments is now $$\frac{(n+1)!\cdot (n+1)}{n!\cdot n}=\frac{(n+1)(n+1)}{n}=\frac{n^2+2n+1}{n}=n+2+\frac{1}{n}.$$ Therefore, as $n$ grows larger and larger, the slopes of two consecutive line segments change by a huge amount, and the non-smoothness is more apparent because the human eye can easily distinguish between such a drastic change in angles.

Randy Marsh
  • 2,857
  • So, to make sure I understood, the derivative of the addition function is n+1, and the derivative of the factorial function is n!*n? What was the n+2+1/n at the end? I didn't quite follow that. – Sam Oct 08 '20 at 19:34
  • $n+1$ is not the derivative, it's the the slope of the line segment between the points $(n,f(n))$ and $(n+1,f(n+1))$, meaning that the angle that that line segment closes with respect to the $x$-axis is $\arctan (n+1)$. Since $\arctan$ is increasing, this means that the angle at $x=n+1$ is steeper than at $x=n$, however as $n$ grows larger, the difference between two consecutive angles will be less and less discernable because the ratio of slopes is $1/n$. The usual derivative is not applicable here because the two functions are not functions of a real variable, their domain is discrete @Sam. – Randy Marsh Oct 09 '20 at 02:35
  • The $n+2+1/n$ at the end is the ratio of the slopes of two consecutive line segments given by the function $g$. As with the addition function, the slope of the line segment between $(n,g(n))$ and $(n+1,g(n+1))$ is $n!\cdot n$, so the angle that this line segment closes with the $x$-axis is $\arctan (n!n)$. But unlike with the addition function, the ratio of slopes doesn't reduce to $0$ as $n$ goes to infinity, it instead goes to infinity, since $\lim_{n\to\infty}(n+2+1/n)=\infty$. So the difference in the steepness between two consecutive angles at $x=n$ and $x=n+1$ will always be discernible. – Randy Marsh Oct 09 '20 at 02:42