Solve the recurrence relation. Need some help x(n)= x(n-1) + 2*n + 3 ; Given x(0)=4;
I'm using backwards substitution
x(n-1)= [x(n-2) + 2(n-1) + 3] + 2*n+ 3
x(n-2)= [x(n-3) + 2(n-2) + 3] + x(n-2) + 2(n-1) + 3 + 2*n + 3 so on and so forth......
so i write the general expression as :
x(n) = x(n-i) + [something here] + i*3
but i am not sure because i'm getting terms like 2(n-3) + 2(n-2) + 2(n-1)+ 2(n) ...
do i write these terms as (2-i-1) ?
any help will be appreciated
 A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$

Indeed, you were going in the right track !!!.

\begin{align}
x_{n} & = x_{n - 1} + 2n + 3 =
x_{n - 2} + \bracks{2\pars{n - 1} + 3} + \pars{2n + 3}
\\[5mm] & =
x_{n - 3} + \bracks{2\pars{n - 2} + 3} + \bracks{2\pars{n - 1} + 3} +
\pars{2n + 3} = \cdots =\
\overbrace{\quad x_{0}\quad}^{\ds{=\ 4}} + \sum_{k = n}^{1}\pars{2k + 3}
\\[5mm] & =
4 + 2\,{n\pars{n + 1} \over 2} + 3n = n^{2} + 4n + 4 = \bbx{\pars{n + 2}^{2}}
\end{align}
A: make for your series the Ansatz $$x_n=A+Bn+Cn^2$$
