All MicroEvals
The function $f$ satisfies the functional equation \[f(x) + ...
Create MicroEval

The function $f$ satisfies the functional equation \[f(x) + ...

Prompt

The function $f$ satisfies the functional equation \[f(x) + f(y) = f(x + y) - xy - 1\]for all real numbers $x$ and $y.$ If $f(1) = 1,$ then find all integers $n$ such that $f(n) = n.$ Enter all such integers, separated by commas.

Answer guidance

Correct answer: 1,-2 Solution: Setting $x = y = 0,$ we get \[2f(0) = f(0) - 1,\]so $f(0) = -1.$ Setting $y = 1,$ we get \[f(x) + 1 = f(x + 1) - x - 1,\]so \[f(x + 1) - f(x) = x + 2.\]Thus, \begin{align*} f(2) - f(1) &= 1 + 2, \\ f(3) - f(2) &= 2 + 2, \\ f(4) - f(3) &= 3 + 2, \\ &\dots, \\ f(n) - f(n - 1) &= (n - 1) + 2. \end{align*}Adding all the equations, we get \[f(n) - f(1) = 1 + 2 + 3 + \dots + (n - 1) + 2(n - 1) = \frac{(n - 1)n}{2} + 2n - 2 = \frac{n^2 + 3n - 4}{2},\]so \[f(n) = \frac{n^2 + 3n - 2}{2}\]for all positive integers $n.$ Setting $x = -n$ and $y = n,$ where $n$ is a positive integer, we get \[f(-n) + f(n) = f(0) + n^2 - 1.\]Then \[f(-n) = n^2 - f(n) + f(0) - 1 = n^2 - \frac{n^2 + 3n - 2}{2} - 2 = \frac{n^2 - 3n - 2}{2}.\]Thus, the formula \[f(n) = \frac{n^2 + 3n - 2}{2}\]holds for all integers $n.$ We want to solve $f(n) = n,$ or \[\frac{n^2 + 3n - 2}{2} = n.\]Then $n^2 + 3n - 2 = 2n,$ or $n^2 + n - 2 = 0.$ This factors as $(n - 1)(n + 2) = 0,$ so the solutions are $n = \boxed{1,-2}.$

Drag to resize
Drag to resize
Drag to resize
Drag to resize