Find the function $f(x)$. Let $f(x)$ be a polynomial function. If $f(x+2) - f(x) = 8x - 2$ and $f(0) = 5$, then what is $f(x)$?
I tried to replace $x$ with $0,2,4,\ldots $ for discovering some regular pattern but I have no idea after doing that.

You stated, that $f$ is a polynomial function, hence we can write $f$ as $f(x)=a_nx^n+a_{n-1}x^{n-1}+...+a_1x+a_0$ plugging that into your given equation we get
$$f(x+2)-f(x)=a_n(x+2)^n+a_{n-1}(x+2)^{n-1}+...+a_1(x+2)+a_0-(a_nx^n+a_{n-1}x^{n-1}+...+a_1x+a_0)$$
using the binomial formula, we can extend this to
$$a_n(x^n+2nx^{n-1}+...+2^{n-1}nx+2^n)+a_{n-1}(x^{n-1}+2(n-1)x^{n-2}+...+2^{n-2}(n-1)x+2^{n-1})+...+a_1(x+2)+a_0-(a_nx^n+a_{n-1}x^{n-1}+...+a_1x+a_0)$$
We see, that the $a_nx^n$ cancel each other out; if we look at the coefficient of $x^{n-1}$ we have $2na_n+a_{n-1}-a_{n-1}=2na_n$. This is nonzero, as $a_n$ as the leading coefficient can't be zero.
Thus your polynomial is of degree $2$. That means $f(x)=a_2x^2+a_1x+a_0$. Since $f(0)=5$, we know that $a_0=5$. Plugging what we know so far back into our original equation we get:
$$f(x+2)-f(x)=a_2(x+2)^2+a_1(x+2)+5-a_2x^2-a_1x-5=4a_2x+4a_2+2a_1=8x-2$$
which yields $a_2=2$ and thus $a_1=-5$ giving us the complete polynomial $f(x)=2x^2-5x+5$.
We can plug that back in to verify our solution.
