Given $$y(0)=7$$ $$y(n)=2y(n-1)+7^14^n$$ My attempt so far: $$y(n)=2y(n-1)+7^14^n$$ $$=2^2y(n-2)+2^17^14^{n-1}+7^14^n$$ $$=2^3y(n-3)+2^27^14^{n-2}+2^17^14^{n-1}+7^14^n$$ $$=2^3y(n-3)+2^27^14^{n-2}+2^17^14^{n-1}+2^07^14^n$$ $$=2^iy(i)+2^{i-1}7^14^{n-i}+\dots$$ $$=2^ny(0)+2^{n-1}7^14^{n-n}+\dots$$ $$=7*2^n+n(2^{n-1}7)$$
However, if I calculate y(1) using the given y(n), I get 42 while I get 84 using the general term I found.
Wolframalpha suggest that the answer is
$$y(n) = 2^{n - 1} (c_1 + 24 (2^n - 1))$$
Which step of my attempt is wrong ?
$$ z_n = \cfrac{1}{2}z_{n-1} + 7 = \cfrac{1}{2^2}z_{n-2}+\left(1 + \cfrac{1}{2}\right)\cdot 7 = \cfrac{1}{2^3}z_{n-3}+\left(1 + \cfrac{1}{2} + \cfrac{1}{2^2}\right)\cdot 7 = \cdots $$
– dxiv Dec 13 '17 at 00:59$$ \begin{align} z_n &= \frac{1}{2^n} \cdot z_0+\left(1+\frac{1}{2}+\frac{1}{2^2}+\cdots+\frac{1}{2^{n-1}}\right) \cdot 7 \ &= \frac{1+2+2^2+\cdots+2^n}{2^n}\cdot 7 \ &= \frac{2^{n+1}-1}{2^n} \cdot 7 \end{align} $$
Then $;y_n = 4^n \cdot z_n = 2^n\cdot(2^{n+1}-1)\cdot7;$ which matches the WA result.
– dxiv Dec 13 '17 at 02:42which step of my attempt is wrongand that's been answered already, so I'll leave these as just comments. – dxiv Dec 13 '17 at 03:44