Is $f(x) = mx + c$ the only set of solutions to $$f(x + 1) - f(x) = \text{constant}$$ where $m$, $c$, and $x$ are integers?
I was watching this video in Youtube (https://www.youtube.com/watch?v=uJqbHaFqjmI) and in the video he solves for the function $f$ by realizing that $f(x + 1) - f(x) = \text{constant}$. So $f(x) = mx + c$ and then solves for $m$ and $c$.
Even though these are valid solutions, I wonder if $mx + c$ is the only the only set of functions with that property.
More precisely, how do we know that there is no other function $g$ such that there doesn't exist a $m$ and $c$ such that for all $x$, $g(x) = mx + c$ but satisfies $g(x+1) - g(x) = constant$?
If ${g(x)}$ is a function with domain being integers, you can arrive at this conclusion inductively. For example:
$${g(1) - g(0) = c}$$
$${\Leftrightarrow g(1) = g(0) + c}$$
$${g(2) - g(1) = c}$$
$${\Leftrightarrow g(2) = g(1) + c = 2c + g(0)}$$
$${...}$$
$${g(n) = nc + g(0)}$$
Likewise, do the same thing and check for negative integers (you will get the same form):
$${g(-n) = -nc + g(0)}$$
Hence overall
$${\forall\ x \in \mathbb{Z}: g(x) = cx + g(0)}$$
Which is of the form ${g(x) = mx + c}$. So it has to be the case. Since all we have done is take the defining property that you are interested in, and from this inductively shown it must be able to be written in the form of ${g(x) = mx + c}$. Of course for rigour - you can write the whole induction argument out (check the base case, assume yadda yadda yadda)
EDIT: This of course only works if the domain of the function in question is ${\mathbb{Z}}$ (since we only checked the integer values, we cannot say anything about ${g}$ at non-integer values, if it's defined at non-integer values). As @Batominovski has pointed out - if the domain was the whole of ${\mathbb{R}}$ - there do exist non-linear solutions, and gave a really nice example. But yeah, in our case if ${g(x)}$ is a function with the domain being the set of integers with the property ${g(x+1)-g(x) = c}$, then indeed it must be of the form ${g(x) = mx + c}$.