# 2020 AMC 12A Problems/Problem 25

## Problem

The number $a=\frac{p}{q}$, where $p$ and $q$ are relatively prime positive integers, has the property that the sum of all real numbers $x$ satisfying $$\lfloor x \rfloor \cdot \{x\} = a \cdot x^2$$ is $420$, where $\lfloor x \rfloor$ denotes the greatest integer less than or equal to $x$ and $\{x\}=x- \lfloor x \rfloor$ denotes the fractional part of $x$. What is $p+q$?

$\textbf{(A) } 245 \qquad \textbf{(B) } 593 \qquad \textbf{(C) } 929 \qquad \textbf{(D) } 1331 \qquad \textbf{(E) } 1332$

## Solution 1

Let $1 be the unique solution in this range. Note that $ck$ is also a solution as long as $ck < c+1$, hence all our solutions are $k, 2k, ..., bk$ for some $b$. This sum $420$ must be between $\frac{b(b+1)}{2}$ and $\frac{(b+1)(b+2)}{2}$, which gives $b=28$ and $k=\frac{420}{406}=\frac{30}{29}$. Plugging this back in gives $a=\frac{29 \cdot 1}{30^2} = \frac{29}{900} \implies \boxed{\textbf{C}}$.

## Solution 2

First note that $\lfloor x\rfloor \cdot \{x\}<0$ when $x<0$ while $ax^2\ge 0\forall x\in \mathbb{R}$. Thus we only need to look at positive solutions ($x=0$ doesn't affect the sum of the solutions). Next, we breakdown $\lfloor x\rfloor\cdot \{x\}$ down for each interval $[n,n+1)$, where $n$ is a positive integer. Assume $\lfloor x\rfloor=n$, then $\{x\}=x-n$. This means that when $x\in [n,n+1)$, $\lfloor x\rfloor \cdot \{x\}=n(x-n)=nx-n^2$. Setting this equal to $ax^2$ gives $$nx-n^2=ax^2\implies ax^2-nx+n^2=0 \implies x=\frac{n\pm \sqrt{n^2-4an^2}}{2a}$$ We're looking at the solution with the positive $x$, which is $x=\frac{n-n\sqrt{1-4a}}{2a}=\frac{n}{2a}\left(1-\sqrt{1-4a}\right)$. Note that if $\lfloor x\rfloor=n$ is the greatest $n$ such that $\lfloor x\rfloor \cdot \{x\}=ax^2$ has a solution, the sum of all these solutions is slightly over $\sum_{k=1}^{n}k=\frac{n(n+1)}{2}$, which is $406$ when $n=28$, just under $420$. Checking this gives $$\sum_{k=1}^{28}\frac{k}{2a}\left(1-\sqrt{1-4a}\right)=\frac{1-\sqrt{1-4a}}{2a}\cdot 406=420$$ $$\frac{1-\sqrt{1-4a}}{2a}=\frac{420}{406}=\frac{30}{29}$$ $$29-29\sqrt{1-4a}=60a$$ $$29\sqrt{1-4a}=29-60a$$ $$29^2-4\cdot 29^2a=29^2+3600a^2-120\cdot 29a$$ $$3600a^2=116a$$ $$a=\frac{116}{3600}=\frac{29}{900} \implies \boxed{\textbf{(C) }929}$$ ~ktong

## Video Solution 1 (Geometry)

This video shows how things like The Pythagorean Theorem and The Law of Sines work together to solve this seemingly algebraic problem: https://www.youtube.com/watch?v=6IJ7Jxa98zw&feature=youtu.be

## Video Solution 3 (by Art of Problem-Solving)

Created by Richard Rusczyk

## Remarks of Solution 2 and Video Solution 3

Let $f(x)=\lfloor x \rfloor \cdot \{x\}$ and $g(x)=a \cdot x^2.$

### Graph

We make the following table of values:

$$\begin{array}{c|c|c|clc} \boldsymbol{x} & \boldsymbol{\lfloor x \rfloor} & \boldsymbol{f(x)} & & \textbf{\ \ Equation} & \\ [1.5ex] \hline & & & & & \\ [-1ex] [0,1) & 0 & 0 & & y=0 & \\ [1.5ex] [1,2) & 1 & [0,1) & & y=x-1 & \\ [1.5ex] [2,3) & 2 & [0,2) & & y=2x-4 & \\ [1.5ex] [3,4) & 3 & [0,3) & & y=3x-9 & \\ [1.5ex] [4,5) & 4 & [0,4) & & y=4x-16 & \\ [1.5ex] \cdots & \cdots & \cdots & & \ \ \ \ \ \ \ \cdots & \\ [1.5ex] [m,m+1) & m & [0,m) & & y=mx-m^2 & \end{array}$$

We graph $f(x)$ by branches:

~MRENTHUSIASM (Graph by Desmos: https://www.desmos.com/calculator/ouvaiqjdzj)

### Claim

For all positive integers $n,$ the first $n$ nonzero solutions to $f(x)=g(x)$ are of the form $$x=m\left(\frac{1-\sqrt{1-4a}}{2a}\right),$$ where $m=1,2,3,\cdots,n.$

~MRENTHUSIASM

### Proof

Clearly, the equation $f(x)=g(x)$ has no negative solutions, and its positive solutions all satisfy $x>1.$Moreover, none of its solutions is an integer.

Note that the upper bounds of the branches of $f(x)$ are along the line $h(x)=x-1$ (excluded). To prove the claim, we wish to show that for each branch of $\boldsymbol{f(x),}$ there is exactly one solution for $\boldsymbol{f(x)=g(x)}$ (from the branch $\boldsymbol{x\in(1,2)}$ to the branch containing the larger solution of $\boldsymbol{g(x)=h(x)}$). In 8:07-11:31 of Video Solution 3 (Art of Problem-Solving), Mr. Rusczyk questions whether two solutions of $f(x)=g(x)$ can be in the same branch of $f(x),$ and he concludes that it is impossible in 16:25-16:43.

We analyze the upper bound of $f(x):$ Let $(c,c-1)$ be one solution of $g(x)=h(x).$ It is clear that $c>1.$ We substitute this point to find $a:$ \begin{align*} g(c)&=h(c) \\ ac^2&=c-1 \\ a&=\frac{c-1}{c^2}. \end{align*}

We substitute this result back to find $x:$ \begin{align*} g(x)&=h(x) \\ \left(\frac{c-1}{c^2}\right)x^2&=x-1 \\ \left(\frac{c-1}{c^2}\right)x^2-x+1&=0 \\ x^2-\left(\frac{c^2}{c-1}\right)x+\frac{c^2}{c-1}&=0 \ \ \ \ \ \ \ \ \ \ \ (*) \\ (x-c)\left(x-\frac{c}{c-1}\right)&=0 \\ x&=c,\ \frac{c}{c-1}. \end{align*} By the way, using the precondition that $x=c$ is a root of $(*),$ we can factor its left side easily by the Factor Theorem.

Now, we perform casework:

$\textbf{Case (1): }\boldsymbol{c=\frac{c}{c-1}>1\Longrightarrow c=2} \textbf{ (Trivial Case)}$

It follows that the graphs of $g(x)$ and $h(x)$ only intersect at $(2,1),$ which is not on the graph of $f(x).$ So, the equation $f(x)=g(x)$ has no solution in this case.

$\textbf{Case (2): }\boldsymbol{c>\frac{c}{c-1}>1\Longrightarrow c>2} \textbf{ and } \boldsymbol{1<\frac{c}{c-1}<2}$

It follows that for $g(x)=h(x),$ the smaller solution $x=\frac{c}{c-1}$ is in the interval $(1,2),$ and $g(x) holds for all $x\in\left(\frac{c}{c-1},c\right).$

By the Intermediate Value Theorem, for each branch of $f(x),$ where $x\in\left[c',c'+1\right),$ we have $g(x)$ in between the left output and the right "output", namely $0=f\left(c'\right) Therefore, for the equation $f(x)=g(x),$ there is exactly one solution for each branch of $f(x),$ where $x\in\left(\frac{c}{c-1},c\right).$ Now, the proof of the bolded sentence of paragraph 2 is complete.

$\textbf{Case (3): }\boldsymbol{\frac{c}{c-1}>c>1\Longrightarrow 11}.$

This case uses the same argument as $\text{Case (2)}.$ The smaller solution $x=c$ is in the interval $(1,2),$ and for each branch of $f(x),$ where $x\in\left(c,\frac{c}{c-1}\right),$ the equation $f(x)=g(x)$ has exactly one solution.

~MRENTHUSIASM