I do not understand how to go about solving the following form of non-homogeneous recurrence relations; $a_{n+1} - a_{n} = c_{_1}n+c_{_2}$.
I have the following question:
$a_{n+1} - a_{n} = 2n+3$
The solution to this equation is : $(n+1)^2$
I have tried for quite some time but no method I have attempted leads me to this solution.
My steps in solving:
$a_n = a_n^h + a_n^p \\ a_n = c(h) + A(p)\\
a_n^h = (h-1)=0 \\
h=1n$
$a_n^p = A2(n+1) +A2n = 2n +3 \\
A = \frac{3}{2} \\
c = -1/2 \\
p = 2n$
$a_n = c(h) + A(p)$
$a_n = \frac{-1}{2}n + 3n$
Any help would be much appreciated, and please do not down vote, I have attempted this question for quite some time now and have put a great deal of effort in my attempt to solve it and am here to learn. Thanks all.
Look for a particular solution of the shape $an^2+bn$. This will be added to the general solution of the homogeneous equation, which in this simple case is just an arbitrary constant $A$.
Substitute. We get $$a(n+1)^2+b(n+1)-an^2-bn=c_1n+c_2.$$ Simplify. We get $$2an+a+b=c_1n+c_2,$$ giving $a=\frac{c_1}{2}$ and $b=c_2-\frac{c_1}{2}$.
For your problem, this gives particular solution $n^2+2n$, not quite the $(n+1)^2$ you mentioned, but just as correct. The general solution is $A+n^2+2n$.
Added: In our case we have $c_1=2$ and $c_2=3$. These are given, since we are solving the recurrence $a_{n+1}-a_n=2n+3$. So from the above equations we have $a=\frac{c_1}{2}=1$ and $b=c_2-\frac{c_1}{2}=3-1=2$.
Thus the general solution of the inhomogeneous recurrence is $a_n=A +n^2+2n$. To evaluate $A$, we would need an initial condition. If that condition is $a_0=1$, then $A=1$ and the solution is $a_n=n^2+2n+1$, or equivalently $(n+1)^2$. Note that $(n+1)^2$ is also a particular solution of the inhomogeneous equation, since if $f(n)$ is a solution so is $f(n)+k$.