Art of Problem Solving

2025 AMC 12A Problems/Problem 25

Problem

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 ordered pairs of polynomials $(P, Q)$ are possible?

$\textbf{(A)}~7 \qquad \textbf{(B)}~9 \qquad \textbf{(C)}~11 \qquad \textbf{(D)}~12 \qquad \textbf{(E)}~13$

Why MAA got this wrong

If you look at solution 2, they overcounted the second case, essentially saying that $f$ had $2$ choices because it could equal $c$ or $d$, so the intended answer was $3 + 5 \cdot 2 = 13.$ However, there is actually only $1$ choice for $f$ because it doesn't matter what variable we choose $f$ to equal; both polynomial combinations result in the same function.

Desmos graph showing how these functions are exactly the same: https://www.desmos.com/calculator/w6sk67ly1i

~grogg007

Solution 1

None of the answer choices on the official test (which asked for the number of possible functions $f(x)$) were correct, but choice E would be correct if this problem asked for the number of pairs of functions $(P(x), Q(x))$.

Let $R(x) = \frac{P(x)}{Q(x)}$. Since $R(x) \leq 0$ on $[a, b]$ but not for values slightly less than $a$ or slightly more than $b$, $P(x) = 0$ at $x = a$ and $x = b$. Therefore, $P(x) = (x-a)(x-b)(x-r)$ for some $r \in \{1, 2, 3, 4, 5\}$.

Since $R(x) \leq 0$ on $(c, d)$ but not at $x = c$ or $x = d$, $R(x)$ is not continuous at $x = c$ or $x = d$. Therefore, $R(x)$ must be undefined at $x = c$ and $x = d$, that is, $Q(x) = 0$ at $x = c$ and $x = d$. So $Q(x) = (x-c)(x-d)(x-s)$ for some $s \in \{1, 2, 3, 4, 5\}$.

Therefore, $R(x) = \frac{(x-a)(x-b)(x-r)}{(x-c)(x-d)(x-s)}$. Notice that $\frac{(x-a)(x-b)}{(x-c)(x-d)} \leq 0$ only on $[a, b]$ and $(c, d)$. Therefore, $\frac{x-r}{x-s}$ must be positive for all $x \notin \{a, b, c, d, r, s\}$. This only happens if $r = s$.

Thus $R(x) = \frac{(x-a)(x-b)(x-r)}{(x-c)(x-d)(x-r)}$, which is the same as $\frac{(x-a)(x-b)}{(x-c)(x-d)}$ except that it is undefined at $x = r$. Thus $R(x)$ satisfies the desired property as long as $r \notin [a, b] \cup (c, d)$.

Note that each quintuple $(a, b, c, d, r)$ defines a unique pair of functions $(P(x), Q(x))$.

If $(a, b, c, d) = (1, 2, 3, 4)$, $r$ can be $3$, $4$, or $5$.

If $(a, b, c, d) = (1, 2, 3, 5)$, $r$ can be $3$ or $5$.

If $(a, b, c, d) = (1, 2, 4, 5)$, $r$ can be $3$, $4$, or $5$.

If $(a, b, c, d) = (1, 3, 4, 5)$, $r$ can be $4$ or $5$.

If $(a, b, c, d) = (2, 3, 4, 5)$, $r$ can be $1$, $4$, or $5$.

Therefore, there are $\boxed{(\textbf{E})\ 13}$ possible pairs of functions $(P(x), Q(x))$.

-j314andrews

Solution (credit to Sohil Rathi's video solution, pi_is_3.14 / OmegaLearn)

This is the solution to the original problem, which asked for the number of possible functions, not pairs of polynomials.

First, consider the problem if it were talking about two second degree polynomials. We can see that the function \[f(x) = \frac{(x-a)(x-b)}{(x-c)(x-d)}\] by itself satisfies the condition of dropping below the x axis over $[a,b] \cup (c,d).$ Now, we need to add one extra $(x-n)$ term each to the numerator and denominator.

Case 1: $f(x) = \frac{(x-a)(x-b)(x-f)}{(x-c)(x-d)(x-f)}$ for some other value $f$ not equal to $a, b, c,$ or $d.$

Note that $f$ cannot be between $a$ and $b$ or between $c$ and $d$ because this would create a hole in the interval. So the only possibilities are:

  • $a = 1, b = 2, c = 3, d = 4, f = 5$
  • $a = 1, b = 2, c = 4, d = 5, f = 3$
  • $a = 2, b = 3, c = 4, d = 5, f = 1$

This gives us $3$ valid functions so far.


Case 2: $f(x) = \frac{(x-a)(x-b)(x-f)}{(x-c)(x-d)(x-f)}$ where $f$ is $c$ or $d.$

If $f$ equals $c$ or $d$ the resulting function is essentially equivalent to $f(x) = \frac{(x-a)(x-b)}{(x-c)(x-d)}$ because a hole would already exist, so we can safely cancel the $(x-f)$ terms. It doesn't matter whether we choose $f$ to equal $c$ or $d$ because the function will still be the same. There are $\binom{5}{4} = 5$ ways to select the values for $a, b, c,$ and $d$ and $1$ way to choose which value $f$ equals, giving $5 \cdot 1 = 5$ valid functions for this case.


The correct answer is $5 + 3 = \boxed{\textbf{(F) } 8}.$

~grogg007, original solution by OmegaLearn/ Sohil Rathi

i tried my best to show what I think was Sohil's thought process, but please feel free to edit this if you can explain it better :)

Video Solution by OmegaLearn

https://youtu.be/SPbTyq3Dz_0

See Also

2025 AMC 12A (ProblemsAnswer KeyResources)
Preceded by
Problem 24
Followed by
Last Problem
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
All AMC 12 Problems and Solutions

These problems are copyrighted © by the Mathematical Association of America.