I'm studying this topic in advance and I'm working on textbook problems. The problem is simple :
Solve the following recurrence relation
a) $a(n+1)-a(n)=2n+3$, $n$ is greater than or equal to $0$ and $a(0)=1$
b) $a(n+1)-a(n)=3n^2-n$, $n$ is greater than or equal to $0$ and $a(0)=3$
The answer in the back of the text says:
a) $a(n)=(n+1)^2$, $n$ greater than or equal to $0$
b) $a(n)=3+n(n-1)^2$, $n$ greater than or equal to $0$
I'm new to this topic and I want to know a efficient way to solve this problem. It is also good if you explain only one of them but step by step explanation to answer would be very much appreciated.
Recurrences of the form $$ a_{n+1} = a_n + f(n) $$ are so common that they have a specialized notation, namely $$ a_n = a_0 + \sum_{k=0}^{n-1} f(k) $$
Note that this is not a solution, merely a different notation for the same problem -- if you write out the formal meaning of what the $\sum$ notation stands for, you get exactly the original recurrence back.
However, you probably already know some techniques for dealing with finite sum; for example the first one $$ a_n = 1 + \sum_{k=0}^{n-1} 2k + 3 $$ is just the sum of a finite arithmetic sequence, which equals the number of terms times the average of the first and last term (Gauss's trick), so we get $$ a_n = 1 + n\frac{2\cdot 0 + 3 + 2(n-1) + 3}{2} = n^2 + 2n + 1$$ which you may be able to recognize as the square of $n+1$.
In the second recurrence you have $g(n)=\sum_k f(k)$ where $f$ is a second-degree polynomial. What I do with such things is to remember that $g$ in that case is always a polynomial one degree higher, and then I find its coefficients by expanding $g(n+1)=g(n)+f(n)$, simplifying, and then equating terms of the same degree in $n$.
Somewhere there's probably a nice canned formula that allows one to compute the coefficients of $g$ directly from those of $f$, but I don't care to go around remembering it -- it's not that often I have to sum polynomial progressions.