How many real x satisfying 0 ≤ x ≤ 2 0 1 7 are there such that x sin ( π x ) is an integer?
Bonus: Can you come up with a simple formula for how many 0 ≤ x ≤ n there are such that x sin ( π x ) is an integer, where n is a positive integer?
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.
Good solution. Maybe you could add a picture of the graph of the function which is beautifully simple and clear visualisation of what you just described mathematically.
Log in to reply
I agree a graph makes this problem much, much easier to see. I added a picture just now to the bottom part
Good solution! The only important thing is to be careful about all those maxima between the roots. If you solve it (using calculus) you will find out that they correspond to the solutions of the equation pi x + tan(pi x) = 0. As you can see in your own plot, the x coordinates of the maxima approach n + 1/2 (the |sin(pi x)| maxima) as x increases. But for lower values of x the maximum between two roots doesn't correspond that much to the one of the function |sin(pi x)|. In this way it would be possible to have more integer values than the calculated.
Log in to reply
Nice job getting the exact form of the maxima!
I only touched on it briefly, but we can use the fact that ∣ x sin ( π x ) ∣ ≤ x for all x > 0 , to give an upper bound on what I defined to be f ( x ) . If x < n , then f ( x ) < n holds as well.
This is what allows me to say for certain that f ( x ) doesn't cross any more integers in that interval, since we show using tangents that it goes up and through n − 1 , but it can't actually cross n while satisfying the inequality
This problem can be approached by converting
x*sin(pi*x)=k
where k stands for an integer to
sin(pi*x)=k/x=y
. Then, one has to find how many times hyperbole k/x intercepts
sin(pi*x)
on a given interval from 0 to 2017. For k>0, the number of intercepts equals
2*Sum(i=1 to i=1008)2ni=2034144
. For k<0, the number of intercepts equals
2016 + 2*Sum(i=1 to i=1007)2ni=2032128
. For special case k=0, hyperbole becomes a line y=0 that intercepts
sin(pi*x)
2018-times. So overall the number of solutions is 2034144 + 2032128 + 2018 = 4068290.
Relevant wiki: Trigonometric Functions Problem Solving
For n > 0 consider the function f ( x ) = ∣ x sin ( π x ) ∣ on the interval ⟨ n − 1 , n ] .
On the first half of the interval, the function increases monotonously from f ( n − 1 ) = 0 to f ( n − 2 1 ) = n − 2 1 . Thus f ⟨ n − 1 , n − 2 1 ] = ⟨ 0 , n − 2 1 ] On the second half of the interval, the function decreases monotonously from f ( n − 2 1 ) = n − 2 1 to f ( n ) = 0 . Thus f ⟨ n − 2 1 , n ] = [ 0 , n − 2 1 ⟩ The first image contains n − 1 integers; the second image, n integers. Since the function is strictly monotonous on both parts, it is injective on each half interval, so that:
The interval ⟨ n − 1 , n ] contains 2 n − 1 values for x so that f ( x ) is an integer.
Removing the absolute value in the definition of f ( x ) does not change this conclusion for obvious reasons.
Thus on the interval ⟨ 0 , N ] we obtain n = 1 ∑ N 2 n − 1 = 1 + 3 + 5 + ⋯ = N 2 Finally, the problem asks for the number of integers in the image of the closed interval, [ 0 , N ] . We must therefore add one since f ( 0 ) = 0 . The answer is N 2 + 1 = 2 0 1 7 2 + 1 = 4 0 6 8 2 9 0 .
I'm being extremely nit-picky here, but be careful about when you say f ( x ) is monotonically decreasing on the second half of the interval. Its maximum is actually slightly after x = n − 2 1 . It doesn't change the outcome of the problem, but it might be worth noting.
Log in to reply
You are right! And a rookie mistake, too... Of course, the maximum M = f ( m ) still lies between n − 1 and n , so that the interval can be divided in
⟨ n − 1 , m ] , on which f is monotonous with image ⟨ 0 , M ] ,
[ m , n ⟩ , on which f is monotonous with image [ 0 , M ⟩ .
The same conclusion follows.
Log in to reply
Yep, f ( x ) = ∣ x sin ( π x ) ∣ ≤ x for x > 0 and so its impossible that we actually cross any more integers in that interval, since that would require passing through n while x < n .
Relevant wiki: Trigonometric Functions Problem Solving
First notice that x sin ( π x ) is zero whenever s i n ( π x ) is zero. This occurs when x is an integer so 2018 times from 0 to 2017 inclusive.
Then notice that x sin ( π x ) is equal to x whenever s i n ( π x ) is equal to 1 or -1. This occurs between each zero so the graph of f ( x ) = x sin ( π x ) must have two places with a height of -1 somewhere between x=1 and x=2. Then four integer intersections somewhere between x=2 and x=3. Then six integer intersections somewhere between x=3 and x=4. This pattern continues. To count the non-zero intersections we just need the sum: 2+4+6+8+...+4032. So, 2018+ ∑ n = 1 2 0 1 6 2 n =4068290
Problem Loading...
Note Loading...
Set Loading...
Relevant wiki: Trigonometric Functions Problem Solving
Let f ( x ) = ∣ x sin ( π x ) ∣ . Note that counting the number of x such that f ( x ) is an integer is the same as the original problem, since
x sin ( π x ) ∈ Z → ∣ x sin ( π x ) ∣ ∈ N ⊂ Z
Also, note the following properties of f ( x ) :
g ( x ) = x is tangent to f ( x ) if and only if x = n + 2 1 for some non-negative integer n ( 1 )
f ( x ) ≤ g ( x ) for all x ≥ 0 ( 2 )
f ( n ) = 0 for all integers n ( 3 )
Putting it all together, for n ≤ x ≤ n + 1 , we have that f ( x ) begins at 0 (3), goes up to some maximum n < M < n + 1 (1,2) and then returns back to f ( x ) = 0 when x = n + 1 (3)
From here, we know that if n is a non-negative integer, for each interval n < x < n + 1 we get that f ( x ) crosses 2 n integers, and that f ( n ) is also an integer.
Hence we get the 2 0 1 8 integers from 0 to 2 0 1 7 inclusive, as well as
n = 0 ∑ 2 0 1 6 2 n = 2 0 1 6 ( 2 0 1 7 ) = 4 0 6 6 2 7 2
The total is 4 0 6 6 2 7 2 + 2 0 1 8 = 4 0 6 8 2 9 0 .
Note: for completeness, we should show that f ( x ) between n < x < n + 1 is strictly increasing up until a maximum, and then strictly decreasing until it once again reaches 0 . I can't think of an easy way to show this without using calculus, however.
Bonus:
We get n + 1 from when x is an integer, and the rest come from the sum in our solution, which evaluates to n ( n − 1 )
n + 1 + ( n ) ( n − 1 ) = n 2 + 1
A graph to better understand solution:
Blue curve: f ( x ) = x
Red curve: f ( x ) = ∣ x sin ( π x ) ∣