How to solve this recurrence?

71 Views Asked by At

$ E_{n}=2E_{n-1}+ 2^{n-1} $

Can anyone help me to solve this recurrence? Is there a general way to think about recurrence?

2

There are 2 best solutions below

0
On

\begin{align*} E_1&=2 E_0 + 2^0\\ E_2&=2 E_1 + 2^1=4 E_0+ 2^1+2^1\\ E_3&=2 E_2 + 2^2=8 E_0+ 2^2+2^2+2^2 \end{align*}

2
On

A general solution is of the form: $$E_n=c2^n + n2^{n-1},$$ where $c$ is any real constant.

I found one solution, the $n2^{n-1}$ part, by an educated guess, which I realize probably isn't that helpful for you. Then given one solution, I solved the recurrence, $$B_n=2B_{n-1}$$ to get get the $c2^n$ part. Observe that adding the two together still gives a solution to your recurrence.