Find the number of integral values of $x$ where $f(x)=x^2|x-1|+(x-1)^2|x-4|+(x-4)^2|x-9|+...+(x-2401)^2|x-2500|$ has local minima.

401 Views Asked by At

Find the number of integral values of $x$ for which

$f(x)=x^2|x-1|+(x-1)^2|x-4|+(x-4)^2|x-9|+.....+(x-2401)^2|x-2500|$

has local minima.

My Attempt $$f(x)=\sum_{m=0}^{49}\left(x-m^2\right)^2\left|x-(m+1)^2\right|$$

It appears that the extrema would appear between $m^2$ and $(m+1)^2$. So how to proceed after this.

2

There are 2 best solutions below

2
On

A partial answer (I can answer your question, though not with the integer restriction, and the generalization is clear if somewhat offputting). The tl;dr is more enlightening than the gross calculations that I omitted, so here's the summary.

  • For $0\leq m\leq 49$, the signs are determined on each interval $[m^2,(m+1)^2)$, and we can invoke continuity at the endpoints. Further, the signs are determined on $(-\infty,1)$ and $[50^2,\infty)$, but $f$ is decreasing (resp. increasing) on these intervals, so we needn't consider them.
  • Find the extrema on each sub-interval; select the minimum from among these. This is not so bad as it seems: there is only one subinterval where $f'$ achieves its root, $r_{50}$. Further, for $x<r_{50}$ $f$ is decreasing, and $f$ is increasing for $x>r_{50}$.

Written in cases, we have $f(x)=$ $$ \begin{cases} -50 x^3+123775 x^2-184333345x+108911329940& x<1 \\ -48 x^3+123773 x^2-184333345 x+108911329940 & 1\leq x<4 \\ -46 x^3+123761 x^2-184333327 x+108911329932 & 4\leq x<9 \\ -44 x^3+123727 x^2-184333151 x+108911329644 & 9\leq x<16 \\ -42 x^3+123659 x^2-184332413 x+108911327052 & 16\leq x<25 \\ -40 x^3+123545 x^2-184330301 x+108911314252 & 25\leq x<36 \\ -38 x^3+123373 x^2-184325451 x+108911269252 & 36\leq x<49 \\ -36 x^3+123131 x^2-184315803 x+108911142244 & 49\leq x<64 \\ -34 x^3+122807 x^2-184298457 x+108910834916 & 64\leq x<81 \\ -32 x^3+122389 x^2-184269529 x+108910171364 & 81\leq x<100 \\ -30 x^3+121865 x^2-184224007 x+108908859164 & 100\leq x<121 \\ -28 x^3+121223 x^2-184155607 x+108906439164 & 121\leq x<144 \\ -26 x^3+120451 x^2-184056629 x+108902222556 & 144\leq x<169 \\ -24 x^3+119537 x^2-183917813 x+108895213788 & 169\leq x<196 \\ -22 x^3+118469 x^2-183728195 x+108884017876 & 196\leq x<225 \\ -20 x^3+117235 x^2-183474963 x+108866730676 & 225\leq x<256 \\ -18 x^3+115823 x^2-183143313 x+108840810676 & 256\leq x<289 \\ -16 x^3+114221 x^2-182716305 x+108802930868 & 289\leq x<324 \\ -14 x^3+112417 x^2-182174719 x+108748809260 & 324\leq x<361 \\ -12 x^3+110399 x^2-181496911 x+108673016588 & 361\leq x<400 \\ -10 x^3+108155 x^2-180658669 x+108568759788 & 400\leq x<441 \\ -8 x^3+105673 x^2-179633069 x+108427639788 & 441\leq x<484 \\ -6 x^3+102941 x^2-178390331 x+108239382180 & 484\leq x<529 \\ -4 x^3+99947 x^2-176897675 x+107991539332 & 529\leq x<576 \\ -2 x^3+96679 x^2-175119177 x+107669162500 & 576\leq x<625 \\ 0 x^3 + 93125 x^2 - 173015625 x + 107254442500 & 625\leq x<676 \\ 2 x^3+89273 x^2-170544375 x+106726317500 & 676\leq x<729 \\ 4 x^3+85111 x^2-167659207 x+106060046492 & 729\leq x<784 \\ 6 x^3+80627 x^2-164310181 x+105226747004 & 784\leq x<841 \\ 8 x^3+75809 x^2-160443493 x+104192895612 & 841\leq x<900 \\ 10 x^3+70645 x^2-156001331 x+102919789812 & 900\leq x<961 \\ 12 x^3+65123 x^2-150921731 x+101362969812 & 961\leq x<1024 \\ 14 x^3+59231 x^2-145138433 x+99471598804 & 1024\leq x<1089 \\ 16 x^3+52957 x^2-138580737 x+97187800276 & 1089\leq x<1156 \\ 18 x^3+46289 x^2-131173359 x+94445950924 & 1156\leq x<1225 \\ 20 x^3+39215 x^2-122836287 x+91171927724 & 1225\leq x<1296 \\ 22 x^3+31723 x^2-113484637 x+87282307724 & 1296\leq x<1369 \\ 24 x^3+23801 x^2-103028509 x+82683519116 & 1369\leq x<1444 \\ 26 x^3+15437 x^2-91372843 x+77270942148 & 1444\leq x<1521 \\ 28 x^3+6619 x^2-78417275 x+70927958436 & 1521\leq x<1600 \\ 30 x^3-2665 x^2-64055993 x+63524947236 & 1600\leq x<1681 \\ 32 x^3-12427 x^2-48177593 x+54918227236 & 1681\leq x<1764 \\ 34 x^3-22679 x^2-30664935 x+44948942428 & 1764\leq x<1849 \\ 36 x^3-33433 x^2-11394999 x+33441890620 & 1849\leq x<1936 \\ 38 x^3-44701 x^2+9761259 x+20204293148 & 1936\leq x<2025 \\ 40 x^3-56495 x^2+32939051 x+5024504348 & 2025\leq x<2116 \\ 42 x^3-68827 x^2+58279901 x-12329340652 & 2116\leq x<2209 \\ 44 x^3-81709 x^2+85931789 x-32110741260 & 2209\leq x<2304 \\ 46 x^3-95153 x^2+116049295 x-54596311308 & 2304\leq x<2401 \\ 48 x^3-109171 x^2+148793743 x-80087324940 & 2401\leq x<2500\\ 50 x^3-123775 x^2+184333345x-108911329940 & x\geq 2500 \\ \end{cases} $$The sole root of $f'$ and hence the minimum value occurs at $r_{50}=\frac{1}{30} \left(\sqrt{9670755955}-70645\right)\approx 923.167$.

I played around with generalizations, namely $ S(x,n) = \sum _{k=0}^{n-1} \left(x-k^2\right)^2 \left| x-(k+1)^2\right| $, to see where the minimum $r_n$ might be. The most promising lead was the coefficient of $x^3$ (which can actually tell us which subinterval, since it increases by two each time): $$ \begin{array}{c|c|c} n & \text{location of minimum, }r_n & \text{ coefficient of }x^3\\ \hline 3 & \frac{1}{3} \left(22-\sqrt{193}\right) & -1 \\ 4 & \frac{56}{11} & 0 \\ 5 & \frac{1}{3} \left(101-\sqrt{5689}\right) & -1 \\ 6 & \frac{417}{34} & 0 \\ 7 & \frac{1}{3} \left(\sqrt{65953}-206\right) & 1 \\ 8 & \frac{516}{23} & 0 \\ 9 & \frac{1}{3} \left(\sqrt{300961}-463\right) & 1 \\ 10 & \frac{2065}{58} & 0 \\ 11 & \frac{1}{3} \left(\sqrt{1006801}-874\right) & 1 \\ 12 & \frac{1}{3} \left(\sqrt{440305}-509\right) & 2 \\ 13 & \frac{1}{3} \left(\sqrt{2746297}-1475\right) & 1 \\ 14 & \frac{1}{6} \left(\sqrt{4445347}-1685\right) & 2 \\ 15 & \frac{1}{3} \left(11 \sqrt{6279}-628\right) & 3 \\ 16 & \frac{1}{3} \left(5 \sqrt{98953}-1295\right) & 2 \\ 17 & \frac{1}{9} \left(\sqrt{14512327}-2867\right) & 3 \\ 18 & \frac{1}{6} \left(\sqrt{20025211}-3769\right) & 2 \\ 19 & \frac{1}{9} \left(\sqrt{28270807}-4136\right) & 3 \\ 20 & \frac{1}{6} \left(\sqrt{9712915}-2243\right) & 4 \\ 21 & \frac{1}{3} \left(\sqrt{5717703}-1909\right) & 3 \\ 22 & \frac{1}{12} \left(\sqrt{68851741}-6179\right) & 4 \\ 23 & \frac{1}{9} \left(\sqrt{88641703}-7676\right) & 3 \\ 24 & \frac{1}{6} \left(\sqrt{28988443}-4121\right) & 4 \\ 25 & \frac{1}{15} \left(\sqrt{149183395}-8785\right) & 5 \\ 26 & \frac{1}{12} \left(\sqrt{187158757}-10711\right) & 4 \\ 27 & \frac{1}{15} \left(\sqrt{236709955}-11380\right) & 5 \\ 28 & \frac{1}{6} \left(31 \sqrt{75811}-6811\right) & 4 \\ 29 & \frac{1}{15} \left(\sqrt{363114331}-14429\right) & 5 \\ 30 & \frac{1}{6} \left(\sqrt{49709523}-5069\right) & 6 \\ 31 & \frac{1}{15} \left(\sqrt{541056739}-17968\right) & 5 \\ 32 & \frac{1}{9} \left(\sqrt{164689303}-9448\right) & 6 \\ 33 & \frac{1}{21} \left(\sqrt{794838709}-19789\right) & 7 \\ 34 & \frac{1}{18} \left(\sqrt{946968835}-23123\right) & 6 \\ 35 & \frac{1}{3} \left(\sqrt{23093653}-3454\right) & 7 \\ 36 & \frac{1}{3} \left(\sqrt{37021755}-4654\right) & 6 \\ 37 & \frac{1}{21} \left(\sqrt{1578794893}-29153\right) & 7 \\ 38 & \frac{1}{24} \left(5 \sqrt{74305849}-30341\right) & 8 \\ 39 & \frac{1}{21} \left(\sqrt{2163532165}-34750\right) & 7 \\ 40 & \frac{1}{6} \left(\sqrt{157945723}-9031\right) & 8 \\ \end{array} $$

I might play around with this more; apologies if the edits keep popping up. Perhaps more can be said about the coefficients of the $0^{th}-2^{nd}$ order terms, maybe even written as a function of the upper limit of summation. Hope that helps!

4
On

It follows from the following two claims that the answer is $0$.

Claim 1 : If $x$ is an integer satisfying $x\not=1^2,2^2,\cdots, 50^2$, then $f'(x)\not=0$.

Claim 2 : If $x=1^2,2^2,\cdots, 50^2$, then $f(x)$ is not a local minima.


Claim 1 : If $x$ is an integer satisfying $x\not=1^2,2^2,\cdots, 50^2$, then $f'(x)\not=0$.

Proof :

If $x\lt 1$ or $x\gt 50^2$, then $$f(x)=\pm\sum_{m=0}^{49}\left(x-m^2\right)^2\left(x-(m+1)^2\right)$$ and so $$f'(x)=\pm \sum_{m=0}^{49}\bigg(2\left(x-m^2\right)\left(x-(m+1)^2\right)+\left(x-m^2\right)^2\bigg)$$ If $x$ is an integer, then we get $$\begin{align}f'(x)&\equiv \sum_{m=0}^{49}(x^2+m^4)\pmod 2 \\\\&\equiv \sum_{m=0}^{49}(x+m)\pmod 2 \\\\&=50x+1225 \\\\&\equiv 1\pmod 2\end{align}$$

So, if $x$ is an integer such that $x\lt 1$ or $x\gt 50^2$, then we get $f'(x)\not=0$.

For $ j^2\lt x\lt (j+1)^2$ where $j$ is an integer satisfying $1\le j\le 49$, we have $$f(x)=\sum_{m=0}^{j-1}\left(x-m^2\right)^2\left(x-(m+1)^2\right)-\sum_{m=j}^{49}\left(x-m^2\right)^2\left(x-(m+1)^2\right)$$ and so $$\begin{align}f'(x)&=\sum_{m=0}^{j-1}\bigg(2\left(x-m^2\right)\left(x-(m+1)^2\right)+\left(x-m^2\right)^2\bigg) \\\\&\qquad\qquad -\sum_{m=j}^{49}\bigg(2\left(x-m^2\right)\left(x-(m+1)^2\right)+\left(x-m^2\right)^2\bigg)\end{align}$$ If $x$ is an integer, then we get $$\begin{align}f'(x)&\equiv \sum_{m=0}^{j-1}(x+ m ) -\sum_{m=j}^{49}(x+m )\pmod 2 \\\\&= 2(j-25)x+\underbrace{j(j-1)}_{\text{even}}-1225 \\\\&\equiv 1\pmod 2\end{align}$$

So, if $x$ is an integer such that $ j^2\lt x\lt (j+1)^2$ where $j$ is an integer satisfying $1\le j\le 49$, then we get $f'(x)\not=0$. $\quad\blacksquare$


Claim 2 : If $x=1^2,2^2,\cdots, 50^2$, then $f(x)$ is not a local minima.

Proof :

For $ j^2\lt x\lt (j+1)^2$ where $j$ is an integer satisfying $1\le j\le 49$, we have $$f(x)=\sum_{m=0}^{j-1}\left(x-m^2\right)^2\left(x-(m+1)^2\right)-\sum_{m=j}^{49}\left(x-m^2\right)^2\left(x-(m+1)^2\right)$$ and so $$\begin{align}f'(x)&=\sum_{m=0}^{j-1}\bigg(2\left(x-m^2\right)\left(x-(m+1)^2\right)+\left(x-m^2\right)^2\bigg) \\\\&\qquad\qquad -\sum_{m=j}^{49}\bigg(2\left(x-m^2\right)\left(x-(m+1)^2\right)+\left(x-m^2\right)^2\bigg)\end{align}$$

So, we have $$\begin{align}\lim_{x\to (j^2)^+}f'(x)&=\sum_{m=0}^{j-1}\bigg(2\left(j^2-m^2\right)\left(j^2-(m+1)^2\right)+\left(j^2-m^2\right)^2\bigg) \\\\&\qquad\qquad -\sum_{m=j}^{49}\bigg(2\left(j^2-m^2\right)\left(j^2-(m+1)^2\right)+\left(j^2-m^2\right)^2\bigg) \\\\&=\sum_{m=0}^{j-1}\bigg(3 m^4 + 4 m^3 + (2 - 6 j^2) m^2 - 4 j^2 m +3 j^4- 2 j^2 \bigg) \\\\&\qquad\qquad -\sum_{m=j}^{49}\bigg(3 m^4 + 4 m^3 + (2 - 6 j^2) m^2 - 4 j^2 m +3 j^4- 2 j^2\bigg) \\\\&=\frac{(j - 1) j (2 j - 1) (3 j^2 - 3 j - 1)}{10}+(j - 1)^2 j^2 \\&\qquad\qquad +\frac{(1-3j^2)(j - 1) j (2 j - 1)}{3} -2j^3(j - 1)+j^3 (3 j^2 - 2) \\&\qquad\qquad -\frac{(50-j) (6 j^4 + 285 j^3 + 14260 j^2 + 713000 j + 35649999)}{10} \\&\qquad\qquad - (50-j) (j + 49) (j^2 - j + 2450) \\&\qquad\qquad -\frac{(1-3j^2) (50-j) (2 j^2 + 97 j + 4851)}{3} \\&\qquad\qquad +2j^2 (50-j) (j + 49)-(50-j) j^2 (3 j^2 - 2) \\\\&=\frac{1}{15}(48 j^5 - 2235 j^4 - 40 j^3 + 3713250 j^2 + 7 j - 2765000175) \end{align}$$

Let $g(j)=\frac{1}{15}(48 j^5 - 2235 j^4 - 40 j^3 + 3713250 j^2 + 7 j - 2765000175)$. Then, we get $g'(j)=4 j h(j)+\frac{7}{15} $ where $h(j)=4 j^3 - 149 j^2 - 2 j + 123775$. Then, $h'(j)=12j^2-298j-2=12(j-\alpha)(j-\beta)$ with $\alpha\lt 0\lt \beta$. Since $h(\beta)\gt 0$, we see that $h(j)\gt 0$ for $j\gt 0$. It follows that $g'(j)\gt 0$, so $g(j)$ is increasing for $j\gt 0$. With $g(30)\lt 0\lt g(31)$, we have $\displaystyle\lim_{x\to (j^2)^+}f'(x)=g(j)\lt 0$ for $0\lt j\le 30$. It follows that if $x=1^2,2^2,\cdots, 30^2$, then $f(x)$ is not a local minima.

Similarly, we have $$\small\begin{align}\lim_{x\to ((j+1)^2)^-}f'(x)&=\sum_{m=0}^{j-1}\bigg(2\left((j+1)^2-m^2\right)\left((j+1)^2-(m+1)^2\right)+\left((j+1)^2-m^2\right)^2\bigg) \\\\&\qquad -\sum_{m=j}^{49}\bigg(2\left((j+1)^2-m^2\right)\left((j+1)^2-(m+1)^2\right)+\left((j+1)^2-m^2\right)^2\bigg) \\\\&=\frac{1}{30} j (48 j^4 + 255 j^3 + 500 j^2 + 330 j + 67) \\&\qquad -\frac{1}{30} (50-j) (48 j^4 - 1845 j^3 - 109750 j^2 + 1912330 j + 110451567) \\\\&=\frac{1}{15} (48 j^5 - 1995 j^4 - 8500 j^3 + 3700080 j^2 + 7417567 j - 2761289175):=F(j)\end{align}$$

Similarly as above, we see that $\displaystyle\lim_{x\to ((j+1)^2)^-}f'(x)=F(j)$ is increasing for $j\gt 0$ and $F(29)\lt 0\lt F(30)$. So, $\displaystyle\lim_{x\to (j^2)^-}f'(x)\gt 0$ for $31\le j\le 50$. It follows that if $x=31^2,32^2,\cdots, 50^2$, then $f(x)$ is not a local minima.

Hence, it follows that if $x=1^2,2^2,\cdots, 50^2$, then $f(x)$ is not a local minima. $\quad\blacksquare$