\documentclass[11pt]{scrartcl}
\usepackage{evan}

\begin{document}
\title{H3170234}
\subtitle{Evan Chen}
\author{Twitch Solves ISL}
\date{Episode 136}
\maketitle

\section*{Problem}
Solve over $\ZZ$ the functional equation
\[ f(2x+f(y))+f(f(2x))=y. \]

\section*{Video}
\href{https://www.youtube.com/watch?v=nyKKvc87dg8&list=PLi6h8GM1FA6yHh4gDk_ZYezmncU1EJUmZ}{\texttt{https://youtu.be/nyKKvc87dg8}}

\section*{External Link}
\url{https://aops.com/community/p28861167}

\newpage

\section*{Solution}
The answers are
\[
  f(x) = \begin{cases}
    a - x & x \equiv 0 \pmod 2 \\
    b - x & x \equiv 1 \pmod 2
  \end{cases}
\]
where $a$ and $b$ are either both even, or $a = b$.
It can be checked that all of these work, so we prove they're the only solutions.

Let $P(x,y)$ be the given assertion.
\begin{itemize}
  \ii $P(0,0) \implies f(f(0)) = 0$.
  \ii $P(0,t) \implies f(f(t)) = t$.
  \ii $P(1,f(z)) \implies f(z+2)=z-2$.
\end{itemize}
The last equation $f(z+2) = z-2$ implies $f$ takes the above form for some $a$ and $b$
(in fact, $a=f(0)$ and $b=f(1)+1$, but we don't need this particular expression).
so we'd be done if we could show the parity condition.
If $a$ is odd, then plug in $x=0$ to deduce $a=b$;
if $b$ is odd, plug in $x=1$ to deduce $b=a$.
This finishes the problem.

\end{document}
