Let $a,b,c\in\mathbb{Z}$, $1<a<10$, $c$ is a prime number and $f(x)=ax^2+bx+c$. If $f(f(1))=f(f(2))=f(f(3))$, find $f'(f(1))+f(f'(2))+f'(f(3))$

My attempt: \begin{align*} f'(x)&=2ax+b\\ (f(f(x)))'&=f'(f(x))f'(x)\\ f'(f(x))&=\frac{(f(f(x)))'}{f'(x)}\\ \end{align*}

  • 1
    $\begingroup$ Clarification : in the " find ... " part, is it $f'(f(2))$ or $f(f'(2))$? $\endgroup$ Jan 7, 2021 at 7:09
  • $\begingroup$ @TeresaLisbon It's $f(f'(2))$. $\endgroup$
    – Ken
    Jan 7, 2021 at 7:12
  • $\begingroup$ Thank you for the clarification. $\endgroup$ Jan 7, 2021 at 7:12
  • 1
    $\begingroup$ In case that gives you some insight, Mathcad reduces your problem to $b=-4a$ and $c=2+\frac{7a}{2}$. Enumerating $a$ from $2$ to $9$ yields you the only prime $c$ that gives an integer $b$, which means $(a,b,c)=(6, -24, 23)$, and finally $f'(f(1))+f(f'(2))+f'(f(3))=95$. Quick brute-force search through $c \in (first \; 1000 \; primes)$ and $-10000<b<10000$ returns no other valid solutions. $\endgroup$
    – Thehx
    Jan 7, 2021 at 9:29
  • $\begingroup$ @Thehx How is $c=2+7a/2$ obtained? $\endgroup$
    – cosmo5
    Jan 7, 2021 at 9:58

2 Answers 2


(Edited to add details)

Due to the symmetry of vertical parabola, for distinct $x_1, x_2,$ $f(x_1)=f(x_2) \Rightarrow x_1+x_2=-b/a$ and $f'(x_1)+f'(x_2)=0$

For a quadratic, w cannot have $f(x_1)=f(x_2)=f(x_3)$ for distinct three $x_i$ since this would imply, $f(x)−f(x_1)$ has three distinct roots. There arise three conditions of arguments being pairwise equal.

$f(f(1))=f(f(2))=f(f(3)) \Rightarrow$ following cases :

  • $f(1)=f(2) \Rightarrow 1+2=-b/a$.

Now $f(1) \neq f(3)$. But $f(f(1))=f(f(3))$. $\Rightarrow f(1)+f(3)=-b/a=3$

Here $f(1)+f(2) \neq -b/a$ since $f(1),f(2)$ are identical. Similarly,

  • $f(2)=f(3) \Rightarrow 2+3=-b/a$$f(1) \neq f(3) \Rightarrow f(1)+f(3)=-b/a=5$
  • $f(1)=f(3) \Rightarrow 1+3=-b/a$$f(1) \neq f(2) \Rightarrow f(1)+f(2)=-b/a=4$

But $f(1)+f(3)=10a+4b+2c$ is even. So only the third case holds: $f(1)=f(3)$ and $f'(1)+f'(3)=0$.

Thus $b=-4a$. $f(x)=ax^2-4ax+c \Rightarrow f'(x)=2a(x-2)$

Also $f'(f(x)) = (ay^2-4ay+c)'=2a(y-2)y'=2af'(x)(f(x)-2)$

Evaluating, $f'(f(1))+f(f'(2)+f'(f(3))=c$

where $a,c$ have been computed as below.

Remark :

Inspired from the other answer, even the numerical value of $c$ can be calculated. Subbing $f(x)=ax^2-4ax+c$ into $f(f(1))=f(f(2))$, one obtains $$c=\dfrac{7a+4}{2}$$

Quickly checking for $a\in \{2,4,6,8\}$, $c=23$ a prime, only for $a=6$.

  • 1
    $\begingroup$ I believe your statement about $f'(f(1))+f(f'(2))+f'(f(3))=c$ is wrong. For $a=6, b=-24, c=23$, said sum equals $95$, not $23$. Other than that, I like how you approached this one, good job! $\endgroup$
    – Thehx
    Jan 7, 2021 at 11:11
  • $\begingroup$ @Thehx it's quite possible I made a mistake and am not able to find it - I regularly do. I'll let others also calculate the same and correct me. I have duly upvoted your answer. $\endgroup$
    – cosmo5
    Jan 7, 2021 at 11:15
  • $\begingroup$ I tried following your steps, but I have questions. (a) from $f(f(1))=f(f(2))$ you jump to $f(1)=f(2)$, which disturbs me since $f$ is not yet proven bijective (well duh, it is not bijective) — and could get us to losing some solutions. Still, if we instead write $f(f(1))=f(f(2)) \Rightarrow f(1)+f(2) = -b/a $, just as you said first, we're good, and will get to the same set of conditions of $b=-Ka$. The last line is wrong or unfinished (did you not copy the entire latex?). The right formula should be $f'(f(1))+f(f'(2))+f'(f(3))=2a^2+7a+2$ $\endgroup$
    – Thehx
    Jan 7, 2021 at 11:46
  • $\begingroup$ @Thehx, For a quadratic, one can't have $f(x_1)=f(x_2)=f(x_3)$ for distinct three $x_i$ since this would imply, $f(x)-f(x_1)$ has three roots. So I have taken three conditions of arguments being pairwise equal. Please see the edit. For the last line I believe we're only differing on sign $36+23+36=95$ while $-36+23+36=23$ $\endgroup$
    – cosmo5
    Jan 7, 2021 at 12:50
  • $\begingroup$ Just please replace $f'(f(1))+f(f'(2)+f'(f(3))=c$ with $f'(f(1))+f(f'(2)+f'(f(3))=2a^2+\frac{7a}{2}+2$. In my earlier comment I forgot to divide $7a$ by two, but please remove that misleading $f'(f(1))+f(f'(2))+f'(f(3))=c$. It does not equal c, period. In terms of $c$ it equals $25c-480$, but not just $c$. Sorry to keep pointing it out. $\endgroup$
    – Thehx
    Jan 7, 2021 at 17:45

Okay here's the outline of how you solve this.

first, you write down the system of equations $$ 0=f(f(2))-f(f(1))=(3a+b)*(b+5a^2+3ab+2ac) \\ 0=f(f(3))-f(f(2))=(5a+b)*(b+13a^2+5ab+2ac) $$ and this leaves you with four possibilities:

(a) $(3a+b=0)$ and $(5a+b=0)$ which is impossible since $a \ne 0$

(b) $(3a+b=0)$ and $(b+13a^2+5ab+2ac=0)$ in which case we obtain $b=-3a$, then our second condition turns into $2ac-2a^2-3a=0$, which further yields $c=a+\frac{3}{2}$, and we see no acceptable solutions here since both $a$ and $c$ are asked to be integers.

(c) $(b+13a^2+5ab+2ac=0)$ and $(b+5a^2+3ab+2ac=0)$ which, if we subtract one of the equations from the other, gives us $b=-4a$ and, shortly after, $p=\frac{7a+4}{2}$, and we can just check the values of $a$ from $2$ to $9$ to find the only solution at $a=6, b=-24, c=23$.

(d) $(5a+b=0)$ and $(b+5a^2+3ab+2ac=0)$, in which case we get $b=-5a$, the second condition simplifies to $10a-2c+5$, which gives us $c=5a+\frac{5}{2}$, and we also see that $c$ will never be integer if $a$ is integer, and $a$ is always integer.

This leaves us with the only acceptable solution found in (c). As I already mentioned above, putting $(a,b,c)=(6,-24,23)$ into $f'(f(1))+f(f'(2))+f'(f(3))$ gives you $95$.

  • $\begingroup$ Considering one more case $f(3)=f(1) \implies 4a+b=0$ that'll ease your work. $\endgroup$ Jan 7, 2021 at 10:18
  • $\begingroup$ Yes, $c=23$. But the sum $f'(f(1))+f(f'(2))+f'(f(3))$ equals $95$. $\endgroup$
    – Thehx
    Jan 7, 2021 at 10:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .