Determine all functions $f:\mathbb{Z}\rightarrow\mathbb{Z}$ with the property that \[f(x-f(y))=f(f(x))-f(y)-1\]holds for all $x,y\in\mathbb{Z}$.
Problem
Source: 2015 IMO Shortlist A2
Tags: IMO Shortlist, functional equation, Hi
07.07.2016 23:05
That was also Problem 5 in this year's German TSTST (VAIMO).
07.07.2016 23:15
The only functions that work are $f\equiv -1$ and $f(x)=x+1,\ \forall x\in \mathbb{Z}$. Let $P(x,y)$ be the assertion that $f(x-f(y))=f(f(x))-f(y)-1$. From $P(x,f(x))$, we get that there is an $a\in \mathbb{Z}$ s.t. $f(a)=-1$. From $P(x,a)$ we get $f(x+1)=f(f(x))$, so $f(f(f(x)))=f(f(x+1))=f(x+2)$. $P(f(x),x)$ yields $f(0)=f(f(f(x)))-f(x)-1\Leftrightarrow f(x+2)=f(x)+f(0)+1$. It's easy to show by induction that $f(2k)=f(0)+k(f(0)+1)\ (*)$ Looking at $P(f(8),f(4))$ and using $(*)$, we get $f(2f(0)+2)=3f(0)+2$. As $2f(0)+2$ is even we can use again $(*)$ to get $f(0)\in \{-1,1\}$. If $f(0)=-1$, by $(*)$ and induction we get $f(2k)=-1,\ \forall k\in \mathbb{Z}$. Also note $f(2k+1)=f(f(2k))=f(-1)$. From $P(1,0)$ we get $f(-1)=-1$, so $f(2k+1)=-1,\ \forall k\in \mathbb{Z}$, whence $f\equiv -1$. If $f(0)=1$, by $(*)$ and induction we get $f(2k)=2k+1,\ \forall k\in \mathbb{Z}$. Also note $f(2k+1)=f(2k-1)+f(0)+1=f(2k-1)+2$, so by induction $f(2k+1)=f(1)+2k\ (**)$ If $f(1)$ is odd, by $(**)$, $f(f(1))=f(1)+2\cdot \dfrac{f(1)-1}{2}=2f(1)-1$; $f(f(1))=f(2)=3$, so $f(1)=2$, contradiction. If $f(1)$ is even, by $(*)$, $f(f(1))=\dfrac{f(1)}{2}(f(0)+1)+f(0)=f(1)+1$; but $f(f(1))=f(2)=3$, so $f(1)=2$, whence $f(2k+1)=2k+2,\ \forall k\in \mathbb{Z}$, so $f(x)=x+1,\ \forall x\in \mathbb{Z}$.
07.07.2016 23:35
Let $A$ be the range of $f$, and let $A+1=\{a+1\mid a\in A\}$. The condition implies that for all $a,b\in A$, $a-b-1,a+b+1\in A$, so for all $m,n\in A+1$, $m+n,m-n\in A+1$. Hence, $A+1$ is the set of all integer multiples of some nonnegative integer $k$. If $k=0$, then $A=\{-1\}$, so $f(x)=-1$. We can check that this works. If $k>0$, let $g(x)=\frac{f(x)+1}{k}$. Since $A$ is the set of integers that are $-1\pmod{k}$, $g$ is a surjective map from integers to integers. Substituting, we have that $g(x-kg(y)+1)=g(kg(x)-1)-g(y)$. Since $g$ is surjective, we in fact have $g(x-kz+1)=g(kg(x)-1)-z$, where $z=f(y)$ can be any integer. Setting $z=0$, we have that $g(x+1)=g(kg(x)-1)$. Now, if $g(a)=g(b)$ for some $a\neq b$, then $g(a+1)=g(b+1)=g(kg(a)-1)$, so if $g$ is not injective then it is periodic for large inputs. But fixing $x$, for some constants $c$ and $d$ we have that $g(c-kz)=d-z$, so for sufficiently negative values of $z$, and thus sufficiently large values of $c-kz$, $g$ is unbounded, a contradiction. Hence, $g$ is injective, so we can conclude that $g(x+1)=g(kg(x)-1)\implies g(x)=\frac{x+2}{k}$. Since $g$ maps integers to integers, $k=1$, and we obtain a solution of $g(x)=x+2$ or $f(x)=x+1$, which works. Thus, our solutions are $f(x)=-1$ and $f(x)=x+1$.
08.07.2016 00:07
Here's an alternate solution. The only solutions are $f(x)=\boxed{x+1}$ and $f(x)=\boxed{-1}$. Let $P(x,y)$ be the assertion that \[f(x-f(y))=f(f(x))-f(y)-1.\]$P(x,f(x))$ implies that \[ f(x-f(f(x)))=-1, \]so $-1$ must be in the range of $f$. Let $f(a)=-1$ for some integral $a$. Then from $P(x,a)$ we get \[ f(x+1)=f(f(x)). \quad (\star). \]Now from $P(f(x)-1,x)$ we find that \begin{align*} f(-1)+1 &= f(f(f(x)-1)))-f(x) \\ &= f(f(x))-f(x) \\ &= f(x+1)-f(x), \end{align*}implying that $f(x+1)-f(x)$ is constant for all $x\in\mathbb{Z}$. Since the domain of $f$ is $\mathbb{Z}$, this means that $f(x)$ must be of the form $kx+c$ for some constants $k,c$. It remains to solve for $f$. From $(\star)$, we obtain \[ k(x+1)+c = k(kx+c)+c, \]so \[ k(x+1)=k(kx+c). \]If $k\not=0$, then \[ kx+c=x+1, \]meaning that $f(x)=x+1$. Otherwise, $f$ is constant, so from the hypothesis we get \[ c=c-c-1=-1,\]so $f(x)=-1$. Both of these functions satisfy the original condition, and so we have shown that $\boxed{-1\text{\;and\;}x+1}$ are indeed the only solutions to $f$. $\square$
08.07.2016 06:30
The only solutions are $f(n)=-1$ for all $n\in \mathbb{Z}$, and $f(n)=n+1$ for all $n\in \mathbb{Z}$. To verify that these are solutions, the first solution gives $-1=-1-(-1)-1$, which is true. The second solution gives $x-(y+1)+1=(x+1)+1-(y+1)-1$, which is also true. Now we will prove that these are the only soluitons. To start, take $y=f(x)$ in $(1)$, then we get $$f(x-f(f(x)))=f(f(x))-f(f(x))-1=-1 \enspace{........ (2)}$$So by (2), choose $y=x-f(f(x))$ gives $f(y)=-1$, so we have $$f(x+1)=f(x-f(y))=f(f(x))-f(y)-1=f(f(x))$$Applying this successively we obtain $$f(x+k)=f(f(x+k-1))=f(f(f(x+k-2)))=\cdots =f^{(k+1)}(x)\enspace\text{for all $x\in \mathbb{Z}, k\in\mathbb{N}$}\enspace{........ (3)}$$With this $(1)$ rewrites to $$f(x-f(y))=f(x+1)-f(y)-1$$ Now we claim that $f(-2)=-1$. Take $x=f(y)$, then using $(3)$ we get $$f(0)=f(f(y)-f(y))=f(f(y)+1)-f(y)-1=f(f(f(y)))-f(y)-1=f(y+2)-f(y)-1$$so take $y=-2$, $f(0)=f(0)-f(2)-1\Rightarrow f(-2)=-1$. So if we set $f(0)=a$, then $$f(y+2)-f(y)=a+1\enspace{........ (4)}$$Since $f(-2)=-1$, by induction, $f(2m)=a+m(a+1)$ for all $m\in \mathbb{Z}$. Likewise, if we set $f(1)=b$, then $f(2m+1)=b+m(a+1)$ for all $m\in \mathbb{Z}$. In particular, $f(2m+1)-f(2m)=b-a$ for all $m$. Now we give a method to determine $b$ in terms of $f(4)$. Set $x=b+1, y=1$, then $b=f(1)=f((b+1)-f(1))=f(b+2)-f(1)-1$, but $f(b+2)=f(f(f(b)))=f(f(f(f(1))))=f(4)$, so $b=f(4)-f(1)-1$. So we have $$b=\frac{f(4)-1}{2}\enspace{........ (5)}$$We split into $2$ cases. Case 1: $a\neq-1$. In view of $(3)$, if $a\neq -1$, and if $f(p)=f(p+k)$ for some $p\in \mathbb{Z}, k\in \mathbb{N}$, then for all $\ell\in \mathbb{N}$, we obtain $$f(p+\ell)=f^{(\ell+1)}(p)=f^{(\ell+1)}(p+k)=f(p+k+\ell)$$In particular, $f(p)=f(p+k)=f(p+2k)\Rightarrow k(a+1)=f(p+2k)-f(p)=0$, clearly a contradiction. So $f$ is injective. Take $x=y=2m$, we get $f(2m-a-m(a+1))=f(2m-f(2m))=f(2m+1)-f(2m)-1=b-a-1$, but if $a\neq 1$, then $2m-a-m(a+1)$ takes more than $1$ value, which is impossible since $f$ is injective. So $a=1$, and we get $f(2m)=2m+1$ for all $m\in \mathbb{Z}$. Now, in view of $(5)$, since $f(4)=5$, $b=\frac{f(4)-1}{2}=2\Rightarrow f(2m+1)=2+m(a+1)=2m+2$. So $f(n)=n+1$ for all $n\in \mathbb{Z}$, which had been verified to be a solution. Case 2: $a=-1$ Then $f(2m)=f(0)=-1$, and $f(2m+1)=f(1)=b$ for all $m\in \mathbb{Z}$. Then again in view of $(5)$, we get $b=\frac{f(4)-1}{2}=-1$, so $f(2m+1)=b=-1$, so $f(n)=-1$ for all $n\in \mathbb{Z}$, which is also verified to be a solution. So the only solutions are $f(n)=-1$ for all $n\in \mathbb{Z}$, and $f(n)=n+1$ for all $n\in \mathbb{Z}$. Q.E.D
08.07.2016 07:22
Let $P(x,y)$ be the assertion. $P(x,f(x))$ gives that there exists $a$ such that $f(a)=-1$. $P(x,a)$ gives \[f(x+1)=f(f(x))\]$P(f(x)-1,x)$ gives \[f(-1)=f(f(f(x)-1))-f(x)-1=f(f(x))-f(x)-1=f(x+1)-f(x)-1\longrightarrow f(x+1)-f(x)=f(-1)+1\]Thus $f$ is linear, so either $f$ is constant or injective. If $f$ is constant, it must clearly be identically $-1$, which works, and if it is injective we have that $x+1=f(x)$ which also works.
08.07.2016 15:54
Hello. This was also problem 3 in 2016 Greece Team Selection Test.
09.07.2016 07:42
We show $f$ is linear. $P(x,f(x))$ shows that there exists an $u$ such that $f(u)=-1$. $P(x,u)$ shows that $f(x+1)=f(f(x))$. This gives us $f(x-f(y))=f(x+1)-f(y)-1$. Now $x=f(y)-1$ gives $f(-1)=f(f(y))-f(y)-1=f(y+1)-f(y)-1$, so $f$ is linear as required. Now set $f(x)=ax+b$ and solve. $a(x+1)+b=a(ax+b)+b$, so $a=a^2$ and $a+b=ab+b$. This gives $a=1, b=1$ or $a=0$. If $a=0$, we easily see that $f(x) \equiv -1$. Therefore, the solution set is $f(x)=x+1$ and $f(x)=-1$. $\blacksquare$
09.07.2016 09:38
Let $P(x,y)$ denote the given assertion. By $P(x, f(x))$ we have $f(x-f(f(x)))=-1$. Thus there is a value $y$ such that $f(y)=-1$. Taking $P(x,y)$ with $f(y)=-1$ gives $f(x+1)=f(f(x))$. Suppose $f$ is one to one. Then we instantly get that $f(x)=x+1$. Else, suppose $f(a)=f(b)$ for $a, b$ distinct. We claim this gives $f(x)=-1$ for all $x$. Note $P(a,y)$ and $P(b,y)$ gives $f$ is periodic. Let the period be $p$, and suppose for the sake of contradiction we can take $y$ to be a value such that $f(y)\neq -1$. Then $P(x-1, y)$ gives $f(x-1-f(y))=f(x)-f(y)-1$. Thus, if $r$ is in the range of $f$, so is $r-f(y)-1$. Thus, for some integer $k$, $r$ and $r-kp$ are both in the range of $f$. But take $f(y)=r$ and $f(y')=r -kp$. $P(x,y)$ and $P(x, y')$ gives our contradiction, as $f$ has period $p$. Thus if $f$ is periodic then $f(x)=-1$ for all $x$.
11.07.2016 00:04
Was also Problem 2 on the UK Team selection test 2.
11.07.2016 13:38
This will be long. We have the following basic pieces of information. Setting $(x, y) \rightarrow (f(0), 0)$ yields $f(f(f(0))) = 2f(0) + 1. \quad (\textbf{I})$ Setting $(x, y) \rightarrow (0, f(0))$ yields $f(-f(f(0))) = -1. \quad (\textbf{II})$ Via $\textbf{(II)}$, setting $(x, y) \rightarrow (x, -f(f(0)))$ yields $f(x + 1) = f(f(x)). \quad (\textbf{III})$ We then attack with the following lemmas. Lemma 1: For every integer $n$, we have $f(n(f(0) + 1)) = (n + 1)f(0) + n$. Proof: We induct both ways, starting with the obviously true base case of $n = 0$ and going in the negative and positive direction. We go in the positive direction. If $n$ is not negative, setting $(x, y) \rightarrow ((n + 1)f(0) + n, n(f(0) + 1))$ yields, using $\textbf{(III)}$, $$f(0) = f(f((n + 1)f(0) + n)) - (n + 1)f(0) - n - 1$$$$\implies f((n + 1)f(0) + (n + 1)) = f((n + 1)(f(0) + 1)) = (n + 2)f(0) + (n + 1)$$which completes the inductive step. In the negative direction, setting $(x, y) \rightarrow (n(f(0) + 1) - 1, 0)$ yields, again using $\textbf{(III)}$, $$f((n - 1)f(0) + (n - 1)) = f(f(n(f(0) + 1) - 1)) - f(0) - 1$$$$\implies f((n - 1)(f(0) + 1)) = (n + 1)f(0) + n - f(0) - 1 = nf(0) + (n - 1)$$which completes the inductive step, proving Lemma 1. Lemma 2: We either have $f(0) = 1$ or $f(0) = -1$. Proof: Note that by $(\textbf{III})$, we have $f(f(0)) = f(1)$. Since $f(f(x)) = f(x + 1)$ for all integers $x$, we have that $f$ is periodic, for all $x \ge \min(f(0), 1)$ if $f(0) \ne 1$. For these $x$, $f$ is bounded. But from Lemma 1, $f$ must be unbounded for positive $x$ and for $f(0) \ne -1$. This is because, if $f(0)$ is nonnegative, both $n(f(0) + 1)$ and $f(n(f(0) + 1))$ are positive and strictly increasing as $n$ grows in the positive integers. Likewise, if $f(0) < -1$, both $n(f(0) + 1)$ and $f(n(f(0) + 1))$ are positive and strictly increasing as $n$ gets more negative, so either way, $f$ is unbounded in the positive integers if $f(0) \ne -1$. Since $f$ is periodic and unbounded in the positive integers for all $f(0)$ not equal to $1$ or $-1$, we cannot have $f(0)$ be any other value than $1$ or $-1$. END LEMMA: The solutions, and the only solutions, are $f(x) = x + 1$ and $f(x) = -1$. Proof: Setting $(x, y) \rightarrow (0, 0)$ yields $(\star) f(-f(0)) = f(f(0)) - f(0) - 1 = f(1) - f(0) - 1$ via $\textbf{(III)}$. Then setting $(x, y) \rightarrow (f(1) - 1, -f(0))$ yields via $\textbf{(III)}$, $$f(f(0)) = f(f(f(1) - 1)) - f(1) + f(0) \implies f(f(1)) = 2f(1) - f(0).$$We know $f(f(1)) = f(f(f(0))) = 2f(0) + 1$ from $\textbf{(I)}$ and $\textbf{(III)}$, so then $2f(1) = 3f(0) + 1$. If $f(0) = 1$, then $f(1) = 2$ and, with $(\star)$, $f(-1) = 0$. Then, plugging in $(x, y) \rightarrow (x, -1)$ yields that for all integers $x$, we need $f(x) = f(f(x)) - 1 \implies f(x + 1) = f(x) + 1$. From here we get that $f(0) = 1$ leads to the one solution $f(x) = x + 1$. If $f(0) = -1$, then $f(1) = -1$ and, with $(\star)$, $f(2) = -1$. Then, plugging in $(x, y) \rightarrow (x, -1)$ yields that for all integers $x$, we need $f(x + 1) = f(f(x))$. A quick induction starting with $x = 1$ yields that for all positive integers $x$, $f(x) = -1$. Now suppose $f(k) = a \ne -1$ for any $k < -1$. Setting $(x, y) \rightarrow (x, -1)$ yields that for all integers $x$, we need $f(x - a) = f(x + 1) - a - 1$. If we choose a positive integer $x = k > |a|$, then we have $k - a, k + 1$ are positive integers and $f(k - a) = f(k + 1) - a + 1 \implies -1 = -1 - a + 1$, which is a contradiction since we said $a \ne 1$. Thus, we have the one solution $f(x) = -1$ for all $x$. Since both solutions easily work when plugged back into the original equation, The answer is $$\boxed{f(x) = x + 1, f(x) = -1.}$$
17.10.2016 17:49
Good problem. Claim 1: There exist $a\in R$ such that $f(a)=-1$. Proof:Just see $P(x,f(x))$ Claim 2: $f(f(x))=f(x+1)$ Proof: $P(x,a)$ $\implies$ $f(x+1)=f(f(x))$ Claim 3: $f(f(f(x)))-f(x)=f(0)+1$ Proof: Just see $P(f(x),x)$ Claim 4: $f(x+2)=f(x)+f(0)+1$ Proof: Using "Claim 2" we get $f(f(f(x)))=f(f(x+1))=f(x+2)$ So $f(f(f(x)))-f(x)=f(0)+1=f(x+2)-f(x)$. Since we got $f(x+2)=f(x)+f(0)+1$ Easy to show that $f(x)=x+1$ and $f\equiv-1$ So solutions are $f(x)=x+1$ for all $x\in Z$ and $f\equiv -1$
03.02.2017 09:06
Claim 1: $-1$ is in the range of $f$. Proof: Taking $y=f(x)$ gives $f(x-f(f(x)) = -1$ for all $x$. $\spadesuit$ Claim 2: Over all $x$, the quantity $f(f(x)) - f(x)$ is constant. Proof. Let $a, b$ be integers. Taking $x=f(a)+f(b)$ and $y=a$ gives \[f(f(b)) = f(f(f(a)+f(b))) - f(a) - 1.\]Taking $x=f(a)+f(b)$ and $y=b$ gives \[f(f(a)) = f(f(f(a)+f(b))) - f(b) - 1.\]Comparing the two equations gives $f(f(a)) - f(a) = f(f(b)) - f(b)$, as claimed. $\spadesuit$ Finisher. Let $f(f(x)) - f(x) = k$ for some constant $k$. Then the given equation becomes \[f(x-f(y)) = f(x) - f(y) + (k-1)\]for all $x, y$. Using Claim 1, choose $y$ in the above equation such that $f(y) = -1$, giving \[f(x+1) = f(x) + k\]for all $x$. Since $f$ has domain $\mathbb{Z}$, we conclude that $f$ is of the form $f(x) = kx + c$ for some constants $k$ and $c$. In the original equation, we need \[k(x-ky-c)+c = k(kx+c) + c - ky - c - 1\]or \[kx - k^2y - ck + c = k^2x + ck - ky - 1.\]Comparing $x$ coefficients gives $k = k^2$, so $k \in \{0, 1\}$. If $k=0$, then $c = -1$, giving the solution $f(x) = -1$ for all $x$. If $k=1$, then $c = 1$, giving the solution $f(x) = x + 1$ for all $x$. It is easy to check that both these functions work. $\square$
03.02.2017 09:09
MSTang wrote: Claim 1: $-1$ is in the range of $f$. Proof: Taking $y=f(x)$ gives $f(x-f(f(x)) = -1$ for all $x$. $\spadesuit$ Claim 2: Over all $x$, the quantity $f(f(x)) - f(x)$ is constant. Proof. Let $a, b$ be integers. Taking $x=f(a)+f(b)$ and $y=a$ gives \[f(f(b)) = f(f(f(a)+f(b))) - f(a) - 1.\]Taking $x=f(a)+f(b)$ and $y=b$ gives \[f(f(a)) = f(f(f(a)+f(b))) - f(b) - 1.\]Comparing the two equations gives $f(f(a)) - f(a) = f(f(b)) - f(b)$, as claimed. $\spadesuit$ Finisher. Let $f(f(x)) - f(x) = k$ for some constant $k$. Then the given equation becomes \[f(x-f(y)) = f(x) - f(y) + (k-1)\]for all $x, y$. Using Claim 1, choose $y$ in the above equation such that $f(y) = -1$, giving \[f(x+1) = f(x) + k\]for all $x$. Since $f$ has domain $\mathbb{Z}$, we conclude that $f$ is of the form $f(x) = kx + c$ for some constants $k$ and $c$. In the original equation, we need \[k(x-ky-c)+c = k(kx+c) + c - ky - c - 1\]or \[kx - k^2y - ck + c = k^2x + ck - ky - 1.\]Comparing $x$ coefficients gives $k = k^2$, so $k \in \{0, 1\}$. If $k=0$, then $c = -1$, giving the solution $f(x) = -1$ for all $x$. If $k=1$, then $c = 1$, giving the solution $f(x) = x + 1$ for all $x$. It is easy to check that both these functions work. $\square$ It is somewhat similar to the solution I had for this problem.
27.03.2017 03:52
The answer is $f(x) \equiv x+1$ and $f(x) \equiv -1$, which both work. By setting $(x,y) = (9, f(9))$ we see $-1$ is in the range of $f$, and so we deduce that (by letting $f(y)=-1$) that \[ f(x+1) = f(f(x)). \] In what follows, let \[ S \overset{\text{def}}{=} \left\{ f(y) + 1 \mid y \in {\mathbb Z} \right\}. \]Now replacing $f(f(x))$ with $f(x+1)$ in the given, then using the $S$ notation, we obtain \[ f(x + s) = f(x) + s \]for all $s \in S$, noting that $0 \in S$. Thus $S$ is closed under addition/subtraction, meaning $S = n {\mathbb Z}$ for some $n \ge 0$ (namely $n = \gcd S$). We now consider three cases. First, if $n = 0$ then $f \equiv -1$. If $n = 1$, then $f(x) \equiv x+1$. Finally we contend $n > 1$ is impossible. Indeed, this means that $f(x) \equiv -1 \pmod n$ for all $x$. Thus we may select $a \equiv 0 \pmod n$ and $b \equiv 1 \pmod n$ such that $f(a) = f(b)$ whence \[ f(a+1) = f(f(a)) = f(f(b)) = f(b+1). \]Then continuing we find that $f(a+2) = f(b+2)$ and so on, so for sufficiently large $x$, we have $f(x) = f(x+d)$ where $d = |b-a| \equiv \pm 1 \pmod n$. Then $f(x) = f(x+nd) = f(x) + nd$ which is a contradiction.
11.08.2017 00:10
v_Enhance wrote: Thus $S$ is closed under addition, meaning $S = n {\mathbb Z}$ for some $n \ge 0$ (namely $n = \gcd S$). This is obviously wrong: an easy counterexample is $S = \{0, 100, 101, 102, \dots\}$. @below: I know, I'm just saying that there are sets of integers closed under addition that aren't multiples of $\mathbb{Z}$.
11.08.2017 02:07
CantonMathGuy wrote: v_Enhance wrote: Thus $S$ is closed under addition, meaning $S = n {\mathbb Z}$ for some $n \ge 0$ (namely $n = \gcd S$). This is obviously wrong: an easy counterexample is $S = \{0, 100, 101, 102, \dots\}$. The equation he used also implies it is closed under subtraction, so it's fine.
14.10.2017 22:45
Let $P(x,y)$ be assertion of $f(x-f(y))=f(f(x))-f(y)-1$ if $f(a)=f(b)$ $\Longleftrightarrow{a=b}$ and $f$ is injective ! $P(x,a)\longrightarrow$ $f(x-f(a))=f(f(x))-f(a)-1$ $P(x,b)\longrightarrow$ $f(x-f(b))=f(f(x))-f(b)-1$ ,,, then $f(f(x))-f(a)-1=f(f(x))-f(b)-1$, $f(a)=f(b)$ and $a=b$ Q.E.D !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! $f(x-f(y))=f(f(x))-f(y)-1$ $\Longleftrightarrow$ $f(x-f(y))-f(f(x))+f(y)=-1$* $P(x,0)\longrightarrow$ $f(x)=c$ after check-up implies that $\boxed{f(x)\equiv{-1}}$ $P(o,f(0))\longrightarrow$ $f(-f(f(o)))=f(f(0))-f(f(0))-1$ , $\boxed{f(-f(f(0)))=-1}$ $P(x,-f(f(0)))\longrightarrow$ $f(x-f(-f(f(0))))=f(f(x))-(-1)+1$ $\Rightarrow$ $\Rightarrow$ $f(x+1)=f(f(x))$ $\Rightarrow$ $\boxed{f(x)=x+1}$ * Thus ,$f(x)=-1$ and $f(x)=x+1$ ,which are solutions.
15.10.2017 14:03
nhusanboev wrote: Let $P(x,y)$ be assertion of $f(x-f(y))=f(f(x))-f(y)-1$ if $f(a)=f(b)$ $\Longleftrightarrow{a=b}$ and $f$ is injective ! Mwahhhhhhh ! Please explain more clearly ? And then explain how you could prove injectivity and, using it, find a non injective solution $f\equiv -1$
07.02.2024 09:27
Cusofay wrote: Fairly easy for an A2 $P(x,f(x)) \rightarrow \exists a$ s.t. $f(a)=-1$ $P(x,a) \rightarrow f(x+1)=ff(x)$ $P(f(x)-1,a) \rightarrow f(x)=x+c$ Plugging the expression above in the original equation gives us $f(x)=x+1$ is the only solution. Aren't you a bit surprised that, for a so "fairly easy for an A2" problem, the $147$ previous posts of this thread found another (second) solution while you find a unique one ?
07.02.2024 17:42
We claim the only functions that work are $f \equiv -1$ and $f(x) = x+1 \forall x \in \mathbb{Z}$. It is easy to see that both of these functions work, so now we prove that these are the only such functions. Let $P(x, y)$ denote the given assertion. $P(x, f(x)): f(x-f(f(x)) = -1$, i.e. there exists a value whose image is $-1$, say $\alpha$. $P(x, \alpha): \boxed{f(x+1) = f(f(x))}$. Subbing into the original equation, $f(x-f(y)) = f(x+1) - f(y) - 1$. $P(f(y) - 1, y): f(-1) = f(y+1) - f(y) - 1$, i. e. $f(x+1) - f(x)$ is constant $\implies \boxed{f \text{ is linear. }}$ Now let $f(x) = ax + b$. Subbing into $f(f(x)) = f(x+1)$, we get $a(x+1) = a(ax+b)$. If $a = 0$, then $f$ is constant and it can be checked that this constant has to be $-1$ from substitution. Else, $ax+b = x+1 = f(x)$, yielding us our solutions. $\square$
09.03.2024 18:17
OK, this looks kind of different from the main idea of the above solutions though it might be the same I'm not sure. The answers are $f(x)=-1$ for all $x\in \mathbb{Z}$ and $f(x)=x+1$ for all $x\in \mathbb{Z}$ . It’s easy to see that these functions satisfy the given equation. We now show these are the only solutions. We first make the following small observation. $P(x,f(x))$ gives \[f(x-f(f(x)))=-1\]for all $x\in \mathbb{Z}$ from which it is clear that there exists $x_0 \in \mathbb{Z}$ such that $f(x_0)=-1$. Then, we have the following key claim. Claim : $f$ is injective or constant $-1$. Proof : Say there exists $\alpha<\beta \in \mathbb{Z}$ such that $f(\alpha)=f(\beta)$. Then, $P(\alpha,x_0)$ and $P(\beta,x_0)$ yield, \[f(\alpha+1)=f(\alpha-f(x_0))=f(f(\alpha))-f(x_0)-1=f(f(\beta))-f(x_0)-1=f(\beta-f(x_0))=f(\beta+1)\]Thus, we have that $f(\alpha+1)=f(\beta+1)$ as well. Inducting on this, we can easily obtain that $f$ is then periodic, with period $T=\beta-\alpha$. Thus, there are only finitely many values $f$ can take. This implies that $f$ has a maximum and minimum value say $m$ and $M$ respectively. Let $x_m \in \mathbb{Z}$ such that $f(x_m)=m$ and $x_M \in \mathbb{Z}$ such that $f(x_M)=M$. Now, note that $P(x_m+f(x_m),x_m)$ gives, \begin{align*} f(f(x_m+f(x_m))) &= f(x_m)+f(x_m)+1\\ f(f(x_m+f(x_m))) &= 2m+1 \end{align*}But, since $m$ is the minimum of $f$, we must have $2m+1 \geq m$ which implies that $m\geq -1$. Similarly, looking at $P(x_M+f(x_M),x_M)$ yields that $M\leq -1$. But this implies that $f$ is constant -1, as claimed. Thus, in what proceeds we assume that $f$ is non-constant and hence injective. Then, $P(x,x_0)$ gives, \[f(f(x))=f(x-f(x_0))+f(x_0)+1=f(x+1)\]which since $f$ is injective implies that $f(x)=x+1$, as desired which gives the other solution. thus, all solutions to this functional equation are of the claimed forms and we are done. Remark : Funny thing is that this logic works even if $f$ were defined on the positive integers. Then, the only change would be that $f$ would be eventually periodic (beyond $\alpha$) and it is still bounded since there are finitely many positive integers less than $\alpha$. Everything that follows is valid - we obtain that there are no constant solutions in this case.
13.03.2024 23:30
Why is the last part so annoying The answers are $f \equiv -1$ and $f \equiv x+1$. First, setting $x=f(y)$ and $y=f(x)$ respectively, we have \begin{align} f(f(f(y))) &= f(y)+f(0) + 1 \\ f(x-f(f(x))) &= -1. \end{align}In particular, the second equation states that there exists a $u$ with $f(u) = -1$. Letting $y=u$, we have $f(x+1) = f(f(x))$ (which we will call $(3)$); combining $(3)$ an $(1)$, we have $$f(y+2) = f(f(f(y))) = f(y)+f(0) + 1.$$In particular, let $f(0) = a$ and $f(1) = b$. Then $f(2k) = a+k(a+1)$ and $f(2k+1) = b + k(a+1)$ are uniquely given. Claim. $a \in \{-1, 1\}$. Proof. Suppose otherwise. Then notice that for any $k$, $$f(k-ka-b) = f(2k-f(2k+1)) = -1.$$As $a \neq 1$, his means that infinitely many $x$ satisfy $f(x) = -1$. However, because $f(n), f(n+2), f(n+4), \dots$ is strictly monotonic for every $n$ as $a \neq -1$, this is impossible. $\blacksquare$ Now we have two cases. If $a = -1$, then $f(2k) = -1$ for and $f(2k+1) = f(1) = c$ for some constant $c$. I claim that $c=-1$; suppose otherwise. Setting $x=0$ and $y$ odd in the original, $$f(-f(y)) = c-f(y)-1 \iff f(-c) = -1$$so $c$ is even. Then, letting $x$ and $y$ be both odd, $$f(x-c) = f(c)-c-1 \iff -c = -c-2$$which is a clear contradiction. Hence we must have $c = -1$, which yields our first solution $\boxed{f \equiv -1}$. In the second case, $f(2x) = 2x+1$ for all integers $x$. Suppose that there exists a $k \neq 1$ such that $f(x) = x+k$ when $x$ is odd. Then, using $(3)$ with $x$ odd, we have $$x+2 = f(x+1) = f(f(x)) = f(x+k) \in \{x+k+1, x+2k\}$$which both imply $k=1$. Hence this case yields our second solution $\boxed{f \equiv x+1}$, completing the proof.
07.04.2024 22:23
I claim that the only solutions are $f(x)=-1\forall x\in \mathbb{Z}$ and $f(x)=x+1\forall x\in \mathbb{Z}$. We can show that these work; \[f(x-f(y))=-1,\]\[f(f(x))-f(y)-1=-1-(-1)-1=-1,\]\[\implies f(x-f(y))=f(f(x))-f(y)-1,\]and \[f(x-f(y))=f(x-(y+1))=x-y,\]\[f(f(x))-f(y)-1=f(x+1)-(y+1)-1=(x+2)-(y+1)-1=x-y,\]\[\implies f(x-f(y))=f(f(x))-f(y)-1,\]as desired! (1) Plugging in $(x,f(x))$ gives that \[f(x-f(f(x)))=f(f(x))-f(f(x))-1,\]\[\implies f(x-f(f(x))=-1,\]which means that $\exists k\in \mathbb{Z}$ such that $f(k)=-1$. We'll then use this to get the next equation. (2) Now plugging in $(x,k)$, where $f(k)=-1$ (which exists by (1)), we get that \[f(x-f(k))=f(f(x))-f(k)-1,\]\[\implies f(x+1)=f(f(x)),\]which becomes useful later. (3) Plugging in $(f(y),y)$ gives \[f(f(y)-f(y))=f(f(f(y)))-f(y)-1,\]\[\implies f(0)=f^3(y)-f(y)-1.\]Now, by (2) we have that \[f^3(y)-f(y)-1=f(f(f(y)))-f(y)-1=f(f(y+1))-f(y)-1=f(y+2)-f(y)-1,\]\[\implies f(y+2)-f(y)=f(0)+1,\]since $f(0)=f^3(y)-f(y)-1$. This means that $f(y+2)-f(y)$ must be constant, with common difference $f(0)+1$! Utilizing this condition, we get that \[f(2k)=(k+1)f(0)+k,\]and \[f(2k+1)=kf(0)+k+f(1),\]by arithmetic sequence formulas. Now if we let $x=2k$ and we plug this back into (1), we get that \[f(x-f(f(x))=f(x-f(x+1))=f(2k-f(2k+1)),\]\[\implies f(k-kf(0)-f(1))=f(2k-(kf(0)+k+f(1)))=-1.\]However, plugging in $x=2k+4$ also gives that \[f((k+2)-(k+2)f(0)-f(1))=f(k-kf(0)-f(1))=-1.\]Since $f(y+2)-f(y)=f(0)+1$, we get that \[0=f((k+2)-(k+2)f(0)-f(1))-f(k-kf(0)-f(1))\]\[=(f(0)+1)*\left(\frac{((k+2)-(k+2)f(0)-f(1))-(k-kf(0)-f(1))}{2}\right),\]\[\implies (f(0)+1)(f(0)-1)=0,\]which means that $f(0)=-1$ or $f(0)=1$. We'll take this in two cases. -- First if $f(0)=-1$, we get that $f(y+2)-f(y)=f(0)+1=0$, meaning that for all integers $k$, $f(2k)=f(0)=-1$ and $f(2k+1)=f(1)$. Now, note that since $f(f(x))=f(x+1)$, we have that \[f(f(1))=f(2)=-1.\]Now, if $f(1)$ is odd, this implies that $-1=f(f(1))=f(1)$ (because $f(2m+1)=f(1)$ for all integers $m$), implying that $f(1)$ must be $-1$. If $f(1)=2n$ is even, plugging in $(1,1)$ gives that \[f(1-f(1))=f(f(1))-f(1)-1,\]\[\implies f(1-2n)=f(2n)-f(1)-1,\]\[\implies f(1)=f(0)-f(1)-1,\]\[\implies 2f(1)=-2,\]meaning that $f(1)=-1$, a contradiction to our requirement that $f(1)$ was even. This means that if $f(0)=-1$, then our only solution is $f(x)=-1\forall x\in \mathbb{Z}$, which we already proved worked at the beginning. Finally, if $f(0)=1$, we have that $f(y+2)-f(y)=f(0)+1=2$. Therefore, by arithmetic sequence formulae, we get that \[f(2k)=2k+1,\]and \[f(2k+1)=2k+f(1),\]for all integers $k$. Now, if $f(1)=m$ for odd $m$, plugging $(1,1)$ into (1) gives us that \[-1=f(1-f(f(1)))=f(1-(f(1)-1+f(1)))=f(2-2f(1))=3-2f(1),\]since $f(2k+1)=2k+f(1)$. This means that $f(1)=2$, a contradiction to our requirement that $m$ is odd, which implies that $f(1)$ is even. Therefore, let $f(1)=m$ for some even $m$. Plugging $(1,1)$ into the original equation gives that \[f(1-f(1))=f(f(1))-f(1)-1,\]\[\implies 2-f(1)=(f(1)+1)-f(1)-1,\]\[\implies f(1)=2,\]which in turn means that $f(2k+1)=2k+f(1)=2k+2$ for all positive integers $k$. This, combined with the conditions for the even numbers gives that the only solution in this case is $f(x)=x+1\forall x\in \mathbb{Z}$, which we already showed worked earlier, finishing the problem.
22.06.2024 15:35
Let $P(x,y)$ denote the assertion $f(x-f(y)) = f(f(x))-f(y)-1$ $P(x,f(x))$ gives us $f(x-f(f(x))) = -1$ $------(1)$ $P(x+f(y),y)$ gives us $f(x) = f(f(x+f(y))) - f(x) -1$ $\implies f(x)+f(y)+1 = f(f(x+f(y))) = f(f(y+f(x)))$ $------(2)$ $P(x,x-f(f(x)))$ and $(1)$ give us $f(x+1)=f(f(x))$ $------(3)$ Putting $y=x$ in $(2)$, we get $f(f(f(x)+x))=2f(x)+1$ $------(4)$ Also putting $y=0$ in $(2)$, we get $f(f(f(x))) = f(x)+f(0)+1$ $------(5)$ Putting $x=-1$ in $(4)$ gives us $f(0) = 2f(-1)+1$ [This will be useful for the induction] Using $(3)$ and $(5)$, we get $f(x+2) - f(x) = f(0)+1=c$ $------(6)$ From here, we can induct (or use the telescopic sum) using $(6)$ by taking two cases of $x$ being even and odd. For even $x=2k$, we get $f(x) = (\dfrac{c}{2})x + (c-1)$ For odd $x=2k-1$, we get $f(x) = (\dfrac{c}{2})x + f(-1)+\dfrac{c}{2}$ which by putting $f(-1) = \frac{f(0)-1}{2} = \frac{c}{2} - 1$ gives us that $f(x) = (\dfrac{c}{2})x + (c-1), \forall x \in \mathbb{Z}$ which means that the function is injective for all integers $c \ne 0$. Injectivity directly gives us the solution $f(x) = x+1$ from $(3)$. And if $c=0$, then from the above formula for $f(x)$, we get $f(x) = -1, \forall x \in \mathbb{Z}$. Hence, the only two solutions for the equation are $f(x)=x+1$ and $f(x)=-1$. And we are done.
22.06.2024 17:10
ABCDE wrote: Determine all functions $f:\mathbb{Z}\rightarrow\mathbb{Z}$ with the property that \[f(x-f(y))=f(f(x))-f(y)-1\]holds for all $x,y\in\mathbb{Z}$. Let $P(x,y)$ be the assertion $$f(x-f(y))=f(f(x))-f(y)-1$$$$P(x,f(x))\implies f(x-f(f(x)))=-1$$Hence there exists $u\in\mathbb Z$ such that $f(u)=-1$. $$P(x,u)\implies f(f(x))=f(x+1)\qquad(*)$$$$\implies f(x-f(y))=f(x+1)-f(y)-1.$$Let the last equation be $Q(x,y)$. $$Q(f(x)-1,x)\implies f(-1)=f(f(x))-f(x)-1$$$$\implies f(x+1)-f(x)=f(-1)+1.$$Hence $f$ is linear. If $f$ is constant then $f\equiv -1$ since $-1\in\textrm{Im}(f)$. Otherwise, $f$ is injective and $(*)$ implies that $f(x)=x+1$, which is also a solution.
21.07.2024 20:48
The only solutions are $f(x)=-1$ and $f(x)=x+1$, which clearly work. We now show that there are no other solutions. Let $P(x,y)$ denote the assertion. Clearly, the only constant solution is $f(x)=-1$, so assume $f$ is nonconstant. By $P(x,f(x))$, we have that $f(x-f(f(x)))=-1$. Let $u=-f(f(0))$; then, $f(u)=-1$. From $P(x,u)$ we obtain $f(x+1)=f(f(x))$. Then, from $P(f(x)-1,x)$, we obtain $f(-1) = f(f(f(x)-1))-f(x)-1$. Since $f(x+1)=f(f(x))$, we have $f(f(f(x)-1)) = f(f(x)) = f(x+1)$. Thus, $f(x+1)-f(x) = f(-1)+1$. The right hand side is constant, so $f$ is linear. Since we assumed $f$ is nonconstant, $f$ is injective, and by $f(x+1)=f(f(x))$, we must have $f(x)=x+1$, as desired. $\blacksquare$
31.08.2024 08:32
The answer is $f(x) = \boxed{-1, x-1}$, which works. Denote the given assertion as $P(x,y)$. Notice that $P(x,f(x))$ yields \[f(x-f(f(x))) = -1,\] so there exists a value $k$ such that $f(k)=-1$. Then, consider $P(x,k)$: \[f(x+1) = f(f(x)).\] Plug this back into the original equation and denote the new assertion as $Q(x,y)$. Now, $Q(f(x)+k,x)$ yields \[f(k)+1 = f(x+k+2)-f(x).\] Setting $k=-1$ shows that each consecutive difference is constant. Hence, $f$ is linear. Finally, plugging in $f(x) = ax+b$ and solving gives the solution set.
10.09.2024 08:19
Setting $x=y+f(y)$ implies $f(f(y+f(y)))=2f(y)+1$. Setting $y=f(x)$ implies $f(x-f(f(x)))=-1$, setting here $x=y+f(y)$ and simplifying gives $f(f(y-1))=f(y)$, thus $f(f(x))=f(x+1)$ for all $x$. Now set $x=f(y)-1$. Note that $$f(f(f(y)-1))=f(f(y))=f(y+1),$$so we get $f(y+1)=f(y)+(1+f(-1))$. By induction $f(x)=f(0)+x(1+f(-1))$. Plugging back we get the only solutions are $f(x)=x+1$ for all $x$ and $f(x)=-1$ for all $x$.
13.10.2024 16:46
We claim that the only solutions are $f(x) \equiv -1$ and $f(x)=x+1$ for all $x$. Let $P(x,y)$ be the assertion. $P(x,f(x))$ gives us that $$f(x-f(f(x)))=-1 \forall x$$This implies that either $f(x) \equiv -1$ which we can check to be a working solution or that $x- f(f(x)) = c \forall x$ where c is a constant value and $f(c) = -1$. This means that $f(f(x)) = c+x$. Subtituting this in our original function we get that, $$f(x-f(y))=x-f(y) + c -1$$$c-1$ is a constant value, and then we can write $x-f(y) = z$. We see that $z$ can range through all integral values as we can fix $y=y_0$ and then we can vary the value of $x$ accordingly to produce all integer values, this means that $$f(x) = x+d \forall x$$where $d$ is a constant value. Substituting this function in our original function gives us that $d=1$. This means that $f(x)=x+1\forall x$ is also a solution which can be checked. Q.E.D
02.11.2024 22:44
needed a hint for the second claim (I am bad in FE )
08.11.2024 01:09
Here is probably the most awkward solution to this problem. We will show that the only solutions are $f\equiv -1$ and $f(x)=x+1$. From $P(x,f(x))$ we get that there is $a$ such that $f(a)=-1$. $P(x,a)$ gives \[f(f(x))=f(x+1)\]Now substitute this back into the given FE and let $Q(x,y)$ denote the new FE. If $f$ is injective, we get the solution $f(x)=x+1$. Now if there are $p\neq q$ such that $f(p)=f(q)$, subtracting $P(p,y)$ from $P(q,y)$ yields $f(p-f(y))=f(q-f(y)$. Let $S=\{x|f(y)=x\}$. Claim: $f\equiv -1$ or there is some positive integer in $S$. Proof: Suppose that $f\not\equiv -1$, then there are $n>m$ in $S$. Case 1. $n=m+1$. Take some $x$ and $y$ such that $f(x+1)=n$ and $f(y)=m$. $Q(n,m)$ gives that $0$ is in $S$. If $f(b)=0$, from $Q(x,b)$ we get $f(x)+1=f(x+1)$, hence $1$ is in $S$, which suffices. Case 2. $n>m+1$. Take $x$ and $y$ such that $f(x+1)=n$ and $f(y)=m$. $Q(x,y)$ gives the desired conclusion. $\square$ Now look back at $f(p-f(y))=f(q-f(y)$. Since there is a positive integer in $S$ and $-1\in S$, it's not hard to see that $f(n)=f(n+c)$ for all $n$, where $c=|p-q|\neq 0$. $Q(y+kc-1,y)$ gives \[-1=f(y+kc-1-f(y)), \ \forall y\]From now, the idea is to find a smaller period of $f$ and induct to get that $f$ has period $1$. Notice that if there are $x$ and $y$ such that $x-f(x)\not\equiv y-f(y)\pmod c$, then by picking suitable $k$s in the above we can arrive at $-1=f(\alpha)=f(\beta)$ with $|\alpha-\beta|\le c-1$ which gives a smaller period. Now suppose that $x-f(x)$ is constant modulo $c$. Looking at $f(f(x))=f(x+1)$ modulo $c$ gives that $f(x)\equiv x+1\pmod c$. Notice that this implies that $|S|=c$. From $Q(x,y)$ we get that $|S-S|=|S|=c$ (Here $S-S=\{x-y|(x,y)\in S\times S\}$). One can see that $|S-S|$ is at least $2|S|-1$ since we have $|S|-1$ positive and $|S|-1$ negative differences and we have $0$. Hence $c\le 1$, which implies that $f$ is constant. $\blacksquare$
17.12.2024 15:47
Nice one! Let $P(x,y)$ be the assertion $f(x-f(y))=f(f(x))-f(y)-1$ $P(x,f(x))\implies f(x-f(f(x)))=-1$, so there exists an $a$ such that $f(a)=-1$. $P(x,a)\implies f(f(f(x)))=f(f(x))\implies f(x+1)=f(f(x))$, if $f$ is injective then $\boxed{f(x)=x+1}$. $P(x,x)\implies f(x-f(x))=f(x+1)-f(x)-1$, also $f(x-f(x))= f(f(x-f(x)-1))=f(f(x-f(f(x))))=f(-1)$ so $f(x+1)-f(x)$ is constant giving $f$ to be linear. If $f$ is constant then $\boxed{f\equiv -1}$ otherwise $f$ is injective.
29.12.2024 04:48
The answers are $f \equiv -1$ and $f \equiv x+1$, which both work. Main Proof: Setting $y=f(x)$ yields $f(x-f(f(x)) = -1$, which we call $(1)$. Setting $x = f(y)$ shows $f(0) = f(f(f(y))) - f(y) - 1$, which we call $(2)$. But rearranging terms and applying $(1)$ yields \[-1=f(f(y) - f(f(f(y)))) = f(-1-f(0))\]i.e. for $c = f(0) + 1$, we have $f(-c) = -1$. Set $y=c$ in the original to get $f(x+1) = f(f(x))$. In other words, $(2)$ rearranges to \[f(y+2) - f(y) = f(0)+1.\]In other words, $f(2k) = ck+f(0)$ and $f(2k+1) = ck+f(1)$ for all integers $k$. Annoying Cleanup: The rest of the proof is suprisingly annoying. Suppose $c \neq 0$ for now; it follows that there are at most two values $x$ such that $f(x) = -1$. On the other hand, $(1)$ with $x = 2k$ yields $f(2k-ck-f(1)) = -1$. If $c \neq 2$, $2k-ck-f(1)$ can take on infinitely many values, hence we must have $c = 2$. It follows that $f(0) = 1$. Now let $r = f(1)$. I claim $r = 2$ or $r$ must be odd; this follows because $f(2k+2) = f(2k+r)$ by setting $x = 2k+1$, hence we cannot have $r$ any even number except for $2$. Now assume for the sake of contradiction that $r$ is odd. Setting $x = 2k+1$ and $y = 2\ell + 1$ in the original, \[2(k-\ell) - r + 2 = f(2k+1-2\ell - r) = 2k+2r-1 - 2\ell - r - 1 = 2(k-\ell) + r-2.\]It follows $r = 2$, contradiction. This case thus yields $f \equiv x+1$. Now assume $c = 0$. Then $f(0) = -1$, so $f(2k) = -1$ for all $k$. Setting $(x, y) = (0, 1)$ yields $f(-f(1)) = -1$, thus either $f \equiv -1$ on the odds too or $f(1)$ is even. But then by setting $x$ odd and $y = 1$, \[f(1) = f(x-f(1)) = f(f(x)) - f(1) - 1 = -f(1) - 2\]which yields $f(1) = -1$, contradiction. Thus $f \equiv -1$ in this case, and we are finally done. Remark: I just noticed I solved this problem before in a pretty similar way while also remarking on the annoying nature of the finish. Some things never change.