2. The function $y=f(x)$ is such that for all values of $x$, the equality $f(x+1)=f(x)+2x+3$ holds. It is known that $f(0)=1$. Find $f(2018)$.
Solution. Rewrite the condition of the problem as $f(x+1)-f(x)=2 x+3$. Substituting sequentially instead of $x$ the numbers $0,1,2, \ldots, 2017$, we get the following equalities

$$
\begin{aligned}
& f(1)-f(0)=2 \cdot 0+3 \\
& f(2)-f(1)=2 \cdot 1+3 \\
& f(3)-f(2)=2 \cdot 2+3
\end{aligned}
$$

$$
f(2018)-f(2017)=2 \cdot 2017+3
$$

Add these equalities term by term: $f(2018)-f(0)=2 \cdot(0+1+2+\ldots+2017)+3 \cdot 2018$. Using the formula for finding the sum of an arithmetic progression, we get

$$
\begin{gathered}
f(2018)=1+2 \cdot \frac{1+2017}{2} \cdot 2017+3 \cdot 2018=1+2018 \cdot 2017+3 \cdot 2018= \\
=1+2 \cdot 2018+2018^{2}=2019^{2}=4076361
\end{gathered}
$$

Answer: $2019^{2}$ or 4076361.