AMC 12 problem 1

Algebra Level 5

Define a function as, f ( x , m ) = n = 1 m n x 1 \displaystyle f\left( x,m \right) =\sum _{ n=1 }^{ m } \left| nx-1 \right| .

Find the minimum value of f ( x , 119 ) f\left( x,119 \right) .


This problem is rephrased from an AMC 12 test a few years back.


The answer is 49.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Austin Antonacci
Jan 18, 2016

The AMC provides a short answer and a few possibilities here . I wrote my solution in an attempt to be very complete and to leave out as few logical gaps as possible, so it is quite long.

In a graphing sense, each of these absolute values that we sum together has a slope of n n which is negative for x < 1 n x < \frac { 1 }{ n } and positive for 1 n < x \frac { 1 }{ n } < x . These slopes compile together, so the slope at x = 0 x=0 is n = 1 m n \sum _{ n=1 }^{ m }{ n } or, more simply put, m ( m + 1 ) 2 \frac { m\left( m+1 \right) }{ 2 } . The lowest point in the function will be the end of the last negative-sloped section, which will not pose much of a problem for us because there should exist a point to the left of which the function has exclusively negative (or zero-valued) slopes and to the right of which the function has exclusively positive (or zero-valued) slopes. How do we determine the x x -value of this point?

Note that this point will lie on 1 a \frac { 1 }{ a } for some integer a a . This is because we are searching for the end of a negative-sloped region, and the sudden changes in slope only occur at points where the absolute values change from negative to positive (which happens on 1 a \frac { 1 }{ a } for any positive integer a m a \le m ).

As I briefly mentioned, the sum of the first m m integers is m ( m + 1 ) 2 \frac { m\left( m+1 \right) }{ 2 } . If the slope is negative at a point x x on the function, then the sum of all the slopes which are negative is greater than the sum of those which are positive. We want to find the greatest x x value where the slope is still negative. The slope of the linear part directly preceding a "changing point" x x is given by

m ( m + 1 ) 2 1 x ( 1 x + 1 ) 2 1 x ( 1 x + 1 ) 2 \frac { m\left( m+1 \right) }{ 2 } -\frac { \frac { 1 }{ x } \left( \frac { 1 }{ x } +1 \right) }{ 2 } -\frac { \frac { 1 }{ x } \left( \frac { 1 }{ x } +1 \right) }{ 2 }

so long as 1 x m \frac{1}{x} \le m

The first part is the maximum possible slope. There are two x x parts because a slope that becomes positive both leaves the negative side and adds to the positive side. The x x parts can be simplified, but I wanted to demonstrate why there are two of them rather than jumping to something without a denominator.

From here, we remember that we are looking for the maximum value x x for which the slope is still negative, so we set up the inequality (now simplified):

m ( m + 1 ) 2 1 x ( 1 x + 1 ) 0 \frac { m\left( m+1 \right) }{ 2 } - \frac{1}{x}\left( \frac{1}{x}+1 \right) \le 0

The whole one over x x thing bothers me, so I'm going to get rid of it. First, I readjust my inequality:

m ( m + 1 ) 2 1 x ( 1 x + 1 ) \frac { m\left( m+1 \right) }{ 2 } \le \frac{1}{x}\left( \frac{1}{x}+1 \right)

Then I call a new variable, perhaps v v , to represent the denominator of x x and thus also the value of 1 x \frac{1}{x} . Note that the equality must be switched, because we are searching for a v v that maximizes x x , but as v v increases, x x decreases.

m ( m + 1 ) 2 v ( v + 1 ) \frac { m\left( m+1 \right) }{ 2 } \ge v\left( v+1 \right)

Now it's a matter of numbers. Using m = 119 m = 119 , we see that this becomes

7140 v ( v + 1 ) 7140 \le v\left( v+1 \right)

Now we are searching for the smallest v v that satisfies this inequality. A good place to start would be the approximated square root of 7140 7140 , then work your way up until you just exceed (or equal) 7140 7140 with v ( v + 1 ) v\left( v+1 \right) . This method yields v = 84 v=84 . Now to evaluate the precise value of f ( 84 , 119 ) f\left( 84,119 \right) , we set up some summations:

[ n = 1 84 1 n 84 ] + [ n = 85 119 n 84 1 ] \left[ \sum _{ n=1 }^{ 84 }{ 1-\frac { n }{ 84 } } \right] +\left[ \sum _{ n=85 }^{ 119 }{ \frac { n }{ 84 } -1 } \right]

Which we simplify to

84 84 [ 85 ] 2 [ 84 ] + 119 [ 120 ] 2 [ 84 ] 84 [ 85 ] 2 [ 84 ] 35 = 49 84-\frac { 84\left[ 85 \right] }{ 2\left[ 84 \right] } +\frac { 119\left[ 120 \right] }{ 2\left[ 84 \right] } -\frac { 84\left[ 85 \right] }{ 2\left[ 84 \right] } -35 = \boxed{49}

In fact, this result can be generalized with m m .

m ( m + 1 ) 2 q m + q 1 ; q = 1 + 1 + 2 m ( m + 1 ) 2 \frac { m\left( m+1 \right) }{ 2q } -m+q-1;\quad q=\left\lceil \frac { -1+\sqrt { 1+2m\left( m+1 \right) } }{ 2 } \right\rceil

Where the brackets on the q q part represent the ceiling function. This returns the next integer above the input if the input is not an integer and it returns the input if the input is already an integer.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...