Find the value of $x$ so that $|x-1|+|2x-1|+|3x-1|+\dotsb +|119x-1|$ is minimum. Based on my trial-and-error method in Desmos, I am getting $x=\frac{1}{118}$; how do I get the correct answer?
-
Mathematica gives me a value of $49$ at $x=\frac1{85}$. – Math1000 Oct 23 '19 at 15:04
-
It is $$x=\frac{1}{85}$$ and the minimum value is given by $$49$$ – Dr. Sonnhard Graubner Oct 23 '19 at 15:05
-
The minimum value of $49$ is attained for all $\frac{1}{85}\le x\le \frac{1}{84}$. – TonyK Oct 23 '19 at 15:15
-
1@Andrei: that is a different expression (and not just because the number of terms is different). Look again. – TonyK Oct 23 '19 at 15:16
-
This is 2010 AMC 12 A 22. – wonderman Oct 23 '19 at 15:28
-
@TonyK The expression is different, but the answers provided there seem to offer techniques which will apply here, as well. For example, this answer seems to deal with the general case offered here. A question need not be a precise duplicate in order to be a duplicate. – Xander Henderson Oct 23 '19 at 15:36
1 Answers
At $x=\frac1n$ for an integer $n$ with $1\leq n\leq119$, the slope of $f$ increases by $2n$. For negative $x$, the slope is equal to $-1-2-\cdots-119=-7140$, and for $x>1$, the slope is $1+2+\cdots+119=7140$. We have to check for which $n$ the slope changes from negative to positive.
So we want to find the greatest $n$ such that $2\cdot119+2\cdot118+\cdots+2n\geq 7140$. The left-hand side is equal to $$ \frac{(2\cdot119+2n)(120-n)}{2}=14280+n-n^2 $$ and now we can just solve: $$ 14280+n-n^2\geq 7140\\ n^2-n-7140\leq 0\\ n\leq85 $$ So at $n=85$ the direction of the slope changes, so $x=\frac1{85}$ gives the minimum. The fact that we actually get an exact integer solution to the inequality means we can also choose $n=84$, as between those two points the slope is actually horizontal.
- 199,419