0

I was fooling around with a graphing calculator and I found that $\sum _{n=1} ^k |x+n|$ (where $k$ is a parameter) bore a strange resemblance to the parabola $(x+51/2)^2+5^4$. Namely, it was tangent to the parabola at exactly one point with $x$ coordinate in every interval between every integer.
I am sure that if I fiddled around with the arguments of the sum and its vertical translation, I could get them to line up at the origin, but I see no point to it. My main question is: Why do these curves resemble each other so much?

GuPe
  • 7,318
  • What value of $k$ gave you your specific parabola? Using $k=1$ it looks like a V. – Ian Miller Oct 30 '16 at 05:40
  • Because $\sum k = (n^2+n)/2$. So sum of linearly increasing amounts are quadratics. This is also why the integral of x is x squared over two. And integral is, in theory, a sum with summands infinitely close together. – fleablood Oct 30 '16 at 05:44
  • Ok. Some experimenting gives $k=50$ leads to your 'parabola' close to $(x+51/2)^2+5^4$. – Ian Miller Oct 30 '16 at 05:46
  • For every $1\leqslant n\leqslant k$ and every $x$ in $(-n-1,-n)$, the sum of absolute values is $$f(x)=(k-2n)x+\tfrac12k(k+1)-n(n+1)$$ and one sees that $$f'(x)=k-2n$$ In particular, at each mid point $x_n=-n-\frac12$, $$f(x_n)=(n+\tfrac12+\tfrac12k)^2+\tfrac14k^2$$ and $$f'(x_n)=k-2n$$ that is, $$f(x_n)=g(x_n)$$ and $$f'(x_n)=g'(x_n)$$ with $$g(x)=(x+\tfrac12k)^2+\tfrac14k^2$$ Thus, the tangency points are at $x_n=-n-\frac12$ and the parabola has the equation $y=g(x)$. For $k=50$, $$g(x)=(x+25)^2+25^2$$ (No approximation in the above.) – Did Oct 30 '16 at 06:34
  • 1
    @Did Why not post that as answer rather than a comment. – Ian Miller Oct 30 '16 at 06:38

2 Answers2

2

$\sum _{n=1} ^k |x+n|=$

$\sum_{n=1; n < -x}(-x-n) + \sum_{n = \max(1,\lceil -x \rceil)}^kx + n=$

$\sum_{n=1}^{\lfloor -x\rfloor}n + \sum_{n=1}^{k-\lceil -x \rceil}n=$

$\frac{(\lfloor -x\rfloor)(\lfloor -x\rfloor + 1)}2 + \frac{(k-\lceil -x \rceil)(k-\lceil -x \rceil+1)}2$

$\approx \frac 12[(x^2 - x) + (k-x)^2+(k-x)$

Which is basically a parabola.

fleablood
  • 124,253
1

Consider $$\sum_{n=1}^{50}|x+n|$$

We want to look at $x=-50$ to $x=-1$ as this is where it is similar to a parabola. Outside of this range it is a straight line, because:

If $x>-1$ then $x+n>0$ for all $n$ in the sum so all the absolute values signs are positive and it becomes $50x+1275$.

Similar if $x<-50$ then $x+n<0$ for all $n$ in the sum so all the absolute values signs reverse the sign of the expression and it becomes $-50x-1275$.

for a value of $x\in[-50,-1]\cap\mathbb{Z}$ we have two (three) cases:

  • for all $n<-x$ then $|x+n|<0$
  • and for all $n>-x$ then $|x+n|>0$
  • (trivially if $n=-x$ then $x+n|=0$)

so the sum breaks into two parts:

$$\sum_{n=1}^{-x}|x+n|+\sum_{n=-x}^{50}|x+n|$$

$$=\sum_{n=1}^{-x}(-x-n)+\sum_{n=-x}^{50}(x+n)$$

$$=\frac{1}{2}x(x+1)+\frac{1}{2}(x+50)(x+51)$$

$$=x^2+51x+1275$$

$$=\left(x+\frac{51}{2}\right)^2+\frac{2499}{4}$$

$$=\left(x+\frac{51}{2}\right)^2+625-\frac{1}{4}$$

Note: You could replace $50$ with $k$ and do similar mathematics to get a parabola of:

$$\left(x+\frac{k+1}{2}\right)^2+\frac{k^2-1}{4}$$

Ian Miller
  • 11,844