I found the answer to the same exact qustion here: https://dsp.stackexchange.com/questions/49327/proof-of-linearity
I have the following difference equation:
$y[n] - 4y[n-1] + 4y[n-2] = 20x[n] + 10x[n-1]$
and I need to know whether it's linear or not.
I know I need to take a linear combination of inputs and check whether the output is the linear combination of their individual outputs. But it's difficult to do here because there are recursive calls to $y$.
I saw somewhere on here (I can't find that question now) that if you insulate $y$ and continue to express each $y[n-k]$, you will get an expression of $y[n]$ as $\sum a_{k}x[n-k]$ and that way it's easy to prove linearity.
Is this correct and enough of a proof or is there some way to prove the linearity of the equation better?
You didn't state your assumptions, but I'm interpreting $n\mapsto y[n]$ as unknown function and $n\mapsto x[n]$ as given function.
Your equation is a condition on functions $$y:\>{\mathbb N}_{\geq0}\to{\mathbb R},\qquad n\mapsto y[n]\ .\tag{1}$$ This condition has the form $${\cal L}(y)[n]=c[n]\qquad \forall n\geq 2\ ,\tag{2}$$ where ${\cal L}$ is defined by $${\cal L}(y)[n]:=y[n]-4y[n-1]+4y[n-2]\qquad(n\geq2)\ ,$$ and $c:\>n\to c[n]$ is given in some way. The operation ${\cal L}$ is linear on the space $Y$ of functions $(1)$, i.e., $${\cal L}(\alpha y+\beta z)=\alpha{\cal L}(y)+\beta{\cal L}(z)$$ for all $y$, $z\in Y$ and arbitrary $\alpha$, $\beta\in{\mathbb R}$. On account of this the condition $(2)$ is a linear difference equation for $y\in Y$. The following is then automatically true: If $c=p+q$ then a solution of ${\cal L}(y)=c$ can be found by solving ${\cal L}(y)=p$ and ${\cal L}(y)=q$ separately and adding these two together.