Functional equation with the property $P(x+1)=P(x)+2x+1$ 
Find all polynomials with real-valued coefficients for which the following property $$P(x+1)=P(x)+2x+1$$ holds for all $x \in \mathbb{R}.$

This seems to be a functional equation, so the initial approach would be to try some values. For $x=0$ we would have that $$P(1)=P(0)+1.$$
For $x=1$ $$P(2)=P(1)+3.$$
For $x=2$ $$P(3) = P(2)+5.$$
Now if I would know something about $P(0)$ that would seem to be helpful. If I assume that $P(0)=0$ I would get that
$$P(1)=1$$ $$P(2)=4$$ $$P(3)=9.$$
From here it would seem that $P(n)=n^2,$  however I’m not sure if I can make the assumption that $P(0)=0$ or can I?
 A: Let $P$ be a solution, and let $Q(x)=P(x)-x^2$. Then $Q(x+1)=Q(x)$. Thus, $Q(x)-Q(0)$ is zero at all integer values of $x$. A nonzero polynomial of degree $n$ has at most $n$ roots, hence $Q(x)-Q(0)=0$ identically, and $P(x)=x^2+P(0)$.
A: Get the second derivative from the both side of the equation. You will get:
$$
P'(x+1) - P'(x) = 2 \Rightarrow P''(x+1) = P''(x) 
$$
It means the second derivative is constant. Hence, $P''(x) = c$ and it means $P(x)$ is in the form of $c x^2 + bx + a$. Now we have:
$$
c(x+1)^2 + b(x+1) + a - cx^2-bx - a = 2x + 1 \Rightarrow c(2x+1)+b = 2x+1 
\Rightarrow c = 1, b = 0
$$
Therefore, $P(x) = x^2 + a$ ($a$ can be any value in $\mathbb{R}$).
A: You can solve even more general problem:
Problem. For given polynomial $Q(x)$ find all polynomials $P(x)$ such that $P(x+1)-P(x)=Q(x)$.
Solution. Firstly, note that if $Q(x)\equiv 0$, then the only solution is $P(x)\equiv c$ for some real $c$. Now, suppose that $Q(x)=q_mx^m+\ldots+q_1x+q_0$, where $q_i\in\mathbb{R}$ and $q_m\neq 0$. If $P(x)=p_kx^k+\ldots+p_1x+p_0$ and $p_k\neq 0$, then we have
$$
P(x+1)-P(x)=Q(x),
$$
which is equivalent to
$$
p_k((x+1)^k-x^k)+\ldots+p_1((x+1)-x)=q_mx^m+\ldots+q_1x+q_0,
$$
or
$$
\binom{k}{k-1}p_{k}\cdot x^{k-1}+\left(\binom{k}{k-2}p_{k}+\binom{k-1}{k-2}p_{k-1}\right)\cdot x^{k-2}+\ldots+\left(\binom{k}{0}p_{k}+\binom{k-1}{0}p_{k-1}+\ldots+\binom{1}{0}p_{1}\right)\cdot 1=q_mx^m+\ldots+q_1x+q_0
$$
Since it holds for all $x$ we have $m=k-1$ and the following linear system:
$$
\begin{cases}
\binom{k}{k-1}p_{k}&=q_{k-1}
\\
\binom{k}{k-2}p_{k}+\binom{k-1}{k-2}p_{k-1}&=q_{k-2}
\\
\ldots
\\
\binom{k}{0}p_{k}+\binom{k-1}{0}p_{k-1}+\ldots+\binom{1}{0}p_{1}&=q_0
\end{cases}
$$
From this system we can find $p_{k},p_{k-1},\ldots,p_{1}$. Hence, the resulting polynomial $P(x)$ will be unique up to constant $p_0$ (and that's because $P(x+1)-P(x)=(P(x+1)+c)-(P(x)+c)$).
Applying this for your problem we obtain that $P(x)=x^2+c$.
A: Big hint: suppose $P(0)=c$ and work towards proving $P(x)=x^2+c$
Solution:
$$P(x+1)=P(x)+2x+1$$
Well our initial assumption from the looks of it that $P(x)=x^2+c$, but we'll work towards proving it's the only solution. First of all:
$$P(x+1)-P(x)=2x+1$$
because $P$ is a polynomial, this directly means that $P(x)=ax^2+bx+c$, because of the well known method of differences (check it on brilliant wiki). It means that the second difference for the values of the polynomial is constant. (one can also know that by differentiating) So
$$a((x+1)^2-x^2)+b((x+1)-x)=2x+1$$
$$\iff 2ax+a+b=2x+1$$
Thus, by equating coefficients, $a=1$ and $b=0$
so
$$P(x)=x^2+c$$
for all $c \in \mathbb{R}$
A: Suppose $\deg P=n$. Then we can write
$$P(x)=\sum_{k=0}^{n}a_kx^k.$$
From the functional equation,
$$\sum_{k=0}^{n}a_k(x+1)^k=1+2x+\sum_{k=0}^{n}a_kx^k.$$
Using the property of binomial coefficients $$m>n\Rightarrow {n\choose m}=0,\tag{1}$$
we have $$P(x+1)=\sum_{k=0}^{n}a_k\sum_{j=0}^{n}{k\choose j}x^j=\sum_{j=0}^{n}\alpha_jx^j,$$
where $$\alpha_j=\sum_{k=0}^{n}{k\choose j}a_k.\tag{2}$$
Comparing coefficients, we have that 
$$\begin{align}
\alpha_0&=1+a_0,\\
\alpha_1&=2+a_1,\\
\alpha_j&=a_j\qquad j\ge 2.
\end{align}$$
Then from $(2)$, we have 
$${0\choose 2}a_0+{1\choose 2}a_1+{2\choose 2}a_2+{3\choose 2}a_3+...+{n\choose 2}a_n=a_2.\tag{3}$$
We have that $(3)$ implies $a_j=0$ for all $j\ge 3$, because ${0\choose 2}={1\choose 2}=0$ from $(1)$. Therefore, $\deg P=2$ and we have 
$$\alpha_j=\sum_{k=0}^{2}{k\choose j}a_k.$$
Thus 
$$\begin{align}
1+a_0=&\alpha_0=a_0+a_1+a_2\\
2+a_1=&\alpha_1=a_1+2a_2.
\end{align}$$
Thus we are left with the system of equations
$$\begin{align}
1=&a_1+a_2\\
2=&2a_2,
\end{align}$$
which has the solution $(a_0,a_1,a_2)=(a_0,0,1)$, meaning that $a_0$ can be any constant. Thus we have
$$P(x)=x^2+a_0$$
for any $a_0\in\Bbb R$.
A: Suppose the polynomial $P$ is of degree $n$, and write $P(x)=a_0x^n+a_1x^{n-1}+\cdots$ (i.e., not bothering to write down more than the first two terms). Then
$$P(x+1)=a_0(x+1)^n+a_1(x+1)^{n-1}+\cdots=a_0x^n+(na_0+a_1)x^{n-1}+\cdots$$
so $P(x+1)-P(x)=na_0x^{n-1}+\cdots$. Now if $P(x+1)-P(x)=2x+1$, we must have $n-1=1$ and $na_0=2$, which is to say $n=2$ and $a_0=1$. 
At this point we write  $P(x)=x^2+bx+c$ and see that 
$$P(x+1)=(x^2+2x+1)+b(x+1)+c=(x^2+bx+c)+(2x+1)+b$$
It follows that $P(x+1)=P(x)+2x+1$ holds if and only if $b=0$. So $P(x)=x^2+c$
