I've been trying to solve it using Power Series and Partial Fractions but got stuck with.
-
I assume by power series you mean generating function? What did you get with it? – Sil Aug 18 '20 at 20:00
-
It should yield to these methods.... – Angina Seng Aug 18 '20 at 20:01
-
1$\sum _{n=0}^{\infty }:-\frac{2}{3\left(2x-1\right)}+\frac{1}{3\left(x+1\right)}$ I got stuck at this point – david kokiashvili Aug 18 '20 at 20:04
-
@davidkokiashvili That looks correct, now use formula for sum of infinite geometric series $\frac{1}{1-q}=1+q+q^2+q^3+\dots$ on $\frac{2}{3}\frac{1}{1-2x}+\frac{1}{3}\frac{1}{1+x}$ (first with $q=2x$, second with $q=-x$) – Sil Aug 18 '20 at 20:10
-
See https://oeis.org/A001045 – lhf Aug 18 '20 at 20:26
1 Answers
Let $F(n) = x^n$. Then we have $x^n - x^{n-1} - 2x^{n-2} = x^{n-2}(x^2 - x - 2) = 0$. So in order to have solution(s) in the form of $Cx^n$ we should set $$x^2 - x - 2 = (x-2)(x+1)= 0 \implies x = 2 , -1$$ Combining these solutions, the general solution is $F(n) = a_12^n + a_2(-1)^n$. Using initial conditions we have $$a_1 + a_2 = 1$$ And $$2a_1 -a_2 = 1$$ Which leads to $F(n) = \frac{2}{3}2^n+\frac{1}{3}(-1)^n$. We can check that easily using WA. It's really like solving the differential equation $y'' - y' - 2y = 0$.
Edit: Actually we can also use unilateral $\mathcal{Z}-$transform (which is similar to Laplace transform). It's defined by $$X(z) = \sum_{n = 0}^{\infty}x[n]z^{-n}$$We can prove that $\mathcal{Z}\{x[n-1]\} = z^{-1}X(z) + x[-1]$ which leads to $\mathcal{Z}\{x[n-2]\} = z^{-2}X(z) + z^{-1}x[-1] + x[-2]$. So we have $$X(z) - (z^{-1}X(z) + x[-1]) - 2(z^{-2}X(z) + z^{-1}x[-1] + x[-2]) = 0$$ It's easy to compute $x[-1]$ and $x[-2]$ by extrapolating $$x[1] = x[0] + 2x[-1] \implies x[-1] = 0$$ $$x[0] = x[-1] + 2x[-2] \implies x[-2] = \frac{1}{2}$$ The result is $$X(z) = \frac{1}{1 - z^{-1} - 2z^{-2}}$$ Apply partial fraction decomposition $$\frac{1}{1 - z^{-1} - 2z^{-2}} = \frac{-1}{(z^{-1} + 1)(2z^{-1} - 1)} = \frac{1}{3}(\frac{1}{z^{-1} + 1}) - \frac{2}{3}(\frac{1}{2z^{-1} -1}) = \frac{1}{3}(\frac{1}{1 -(-1)z^{-1}}) + \frac{2}{3}(\frac{1}{1- (2)z^{-1}})$$ Also $\mathcal{Z}\{a^n u[n]\} = \frac{1}{1-az^{-1}}$ when $|z| \gt |a|$. Applying inverse transform to both sides $$x[n] = \frac{1}{3}(-1)^n u[n] + \frac{2}{3}2^n u[n]$$ Which is the same answer as previous.
- 4,379
-
-
-
@davidkokiashvili I've added another method. You can see that if you want. – S.H.W Aug 18 '20 at 21:57