Let $c$ be a constant, and consider the following recurrence relation: $a_n + ca_{n-1} + a_{n-2} = 0$. I am asked to find the value of $c$ where the recurrence has a non constant polynomial solution.
I declared $f(x) = \sum_{n=0}^\infty a_n \cdot x^n$, multiplied the recurrence by $x^n$ and took the sum from $n=2$, and got that
$$\sum_{n=2}^\infty a_n \cdot x^n = -c \cdot \sum_{n=2}^\infty a_{n-1} \cdot x^n - \sum_{n=2}^\infty a_{n-2}x^n$$
$$\sum_{n=2}^\infty a_n \cdot x^n = -cx \cdot \sum_{n=2}^\infty a_{n-1} \cdot x^{n-1} - x^2 \cdot \sum_{n=2}^\infty a_{n-2}x^{n-2}$$
$$ f(x) - a_0 - a_1 x = -cx(f(x)-a_0) - x^2f(x)$$
$$ (1+cx+x^2)f(x) = a_0 cx + a_1 x + a_0 $$
$$f(x) = \frac {a_0 cx + a_1 x + a_0}{x^2 +cx + 1} $$
and here i cant see any restriction on $c$. Any $c$ looks fine to me, and no specific $c$ would make problems. Would love to get some help moving forward, or corrections if my way of solving this question is wrong. Thank you!
Hypothesis: $a_n=\sum_{i=0}^M b_i n^i$, $b_M \ne 0$.
It's simpler to write the recurrence as $a_{n+1} + ca_{n} + a_{n-1} = 0$ which leads to $\sum_{i=0}^M b_i (n+1)^i + c\sum_{i=0}^M b_i n^i + \sum_{i=0}^M b_i (n-1)^i=0$
$\sum_{i=0}^M b_i ((n+1)^i + (n-1)^i + c n^i) = 0$
The left side is an $M$'th degree polynomial. We want $b_i$ and $c$ such that it is zero for all $n$. Just focusing on the $n^M$ term of this expression:
$b_M (2n^M + c n^M) = 0$ which means $c = -2$.
At this point, $c=-2$ is shown to be a necessary condition. For this specific problem, it is easiest to come up with a working solution -- like $a_n=n$ -- to show that it is sufficient.