Art of Problem Solving

2025 AMC 12A Problems/Problem 25

Polynomials $P(x)$ and $Q(x)$ each have degree $3$ and leading coefficient $1$, and their roots are all elements of $\{1,2,3,4,5\}$. The function $f(x) = \tfrac{P(x)}{Q(x)}$ has the property that there exist real numbers $a < b < c < d$ such that the set of all real numbers $x$ such that $f(x) \leq 0$ consists of the closed interval $[a,b]$ together with the open interval $(c,d)$. How many functions $f(x)$ are possible?

We are told that $f(x) = \frac{P(x)}{Q(x)}$, where $P$ and $Q$ are monic cubics with roots among $\{1,2,3,4,5\}$, and that \[\{x : f(x) \le 0\} = [a,b] \cup (c,d)\] for some $a < b < c < d$.

---

      1. Step 1. Sign analysis

Since $f(x)$ changes sign only at $a,b,c,d$, we must have - zeros at $a$ and $b$, - vertical asymptotes (poles) at $c$ and $d$.

Thus the sign chart is:

\[(+)\ a\ (−)\ b\ (+)\ c\ (−)\ d\ (+)\] (Error compiling LaTeX. Unknown error_msg)

so $f(x)$ is positive outside $[a,b]\cup(c,d)$ and nonpositive on those intervals.

---

      1. Step 2. General form

Because both $P$ and $Q$ are monic cubics, \[f(x) = \frac{(x-a)(x-b)(x-t)}{(x-c)(x-d)(x-t)}\] for some $t$ (possibly equal to one of the existing roots or poles). This ensures that $\deg P = \deg Q = 3$ and the sign pattern is controlled by $a,b,c,d$.

To avoid adding extra sign changes, the extra factor $\frac{x-t}{x-t}$ must not change sign, so $t$ must either be one of the poles ($c$ or $d$) or lie outside the intervals $[a,b]\cup(c,d)$.

---

      1. Step 3. Counting possibilities

We must choose four distinct numbers $a<b<c<d$ from $\{1,2,3,4,5\}$: \[\binom{5}{4} = 5\] giving these possible intervals: \[[1,2]\cup(3,4),\ [1,2]\cup(3,5),\ [1,2]\cup(4,5),\ [1,3]\cup(4,5),\ [2,3]\cup(4,5).\]

Now count possible $t$ for each:

| Case | $[a,b]\cup(c,d)$ | Possible $t$ | Count | |------|-------------------|---------------|--------| | 1 | $[1,2]\cup(3,4)$ | $3,4,5$ | 3 | | 2 | $[1,2]\cup(3,5)$ | $3,5$ | 2 | | 3 | $[1,2]\cup(4,5)$ | $3,4,5$ | 3 | | 4 | $[1,3]\cup(4,5)$ | $4,5$ | 2 | | 5 | $[2,3]\cup(4,5)$ | $1,4,5$ | 3 |

Total possibilities: \[3 + 2 + 3 + 2 + 3 = 13.\]

---

$\boxed{13}$ possible functions $f(x)$, corresponding to answer choice $\boxed{E}$.

Video Solution 1 by OmegaLearn

https://youtu.be/SPbTyq3Dz_0