TITLE: How would you solve this recurrence equation: $a_{n+1}-2a_{n}=6\cdot 5^n$ for $n\geq 1$
QUESTION [5 upvotes]: How would you solve $a_{n+1}-2a_{n}=6\cdot 5^n$ for $n\geq 1$ ?
I don't understand the text in my textbook. I Would like somebody to explain it to me.

REPLY [4 votes]: Using Generating Functions: Let $\displaystyle A(x)=\sum_{n\geq0}a_nx^n$. Then multiply your recurrence relation by $x^n$ and then take the sum it for $n\geq0$ to get
$$
\sum_{n\geq0}a_{n+1}x^n-\sum_{n\geq0}2a_nx^n=\sum_{n\geq0}6\cdot5^nx^n
$$
Now
$$
\begin{align}
\sum_{n\geq0}a_{n+1}x^n&=\frac{1}{x}\sum_{n\geq0}a_{n+1}x^{n+1}\\
&=\frac{1}{x}\sum_{n\geq1}a_{n}x^n\\
&=\frac{1}{x}\left(\sum_{n\geq0}a_{n}x^n-a_0\right)\\
&=\frac{1}{x}A(x)-\frac{a_0}{x}
\end{align}
$$
It is easy to see that
$$
\sum_{n\geq0}2a_nx^n=2A(x)
$$
and
$$
\sum_{n\geq0}6\cdot5^nx^n=6\sum_{n\geq0}(5x)^n=\frac{6}{1-5x}
$$
So you have
$$
\frac{1}{x}A(x)-\frac{a_0}{x}-2A(x)=\frac{6}{1-5x}
$$
If you solve this for $A(x)$, you get
$$
A(x)=\frac{6x}{(1-5x)(1-2x)}+\frac{a_0}{1-2x}
$$
Now observe that
$$
\begin{align}
\frac{6x}{(1-5x)(1-2x)}&=-\frac{2}{1-2x}+\frac{2}{1-5x}\\
&=-2\sum_{n\geq0}(2x)^n+2\sum_{\geq0}(5x)^n\\
&=\sum_{n\geq0}\left(-2^{n+1}+2\cdot5^n\right)x^n
\end{align}
$$
Also it is easy to see that
$$
\frac{a_0}{1-2x}=\sum_{n\geq0}a_02^nx^n
$$
Combining these, we have
$$
A(x)=\sum_{n\geq0}\left(-2^{n+1}+2\cdot5^n+a_02^n\right)x^n
$$
Therefore
$$
a_n=(a_0-2)2^n+2\cdot5^n
$$