I am having trouble solving this recurrence relation: $$a_{n+1}=a_n+3n^2-2 \quad , \quad a_0=3$$ The solution will be $a_n=a_n^h+a_n^p$ where $a_n^h$ is the solution of the homogeneous problem and $a_n^p$ is a particular solution of the non-homogeneous problem.
I know how to solve the homogeneous problem $(a_{n+1}-a_n=0)$; its solution is $a_n^h=A$. But I am having trouble finding the particular solution for the non-homogeneous problem. Could someone help me please?
Here, $a_{n+1}=a_n+3n^2-2 , \; a_0 = 3$
$\implies a_{n+1}-a_n=3n^2-2 \\ \implies \sum\limits_{k=0}^{n-1} a_{k+1}-a_k = \sum\limits_{k=0}^{n-1} (3k^2-2) \\ \implies a_n - a_0 = \dfrac{(n-1)n(2n-1)}{2} - 2n\\ \implies a_n = 3 + \dfrac12 n(2n^2-3n-3)$