1
$\begingroup$

$y_{n+3} − 3 y_{n+1} + 2 y_n = (−2)^n$ I get the solution to be $y_n = A(-2)^n + Bn + C + \frac{1}{9}n(-2)^{n-1}$ but wolfram alpha gets $y(n) = c_1 (-2)^n+c_2+c_3 n+\frac{1}{27} 2^{n-1} e^{i \pi n} (4-3 n)$

Explanation required.

Help is much appreciated.

2 Answers 2

4

Your answers are the same.
Observe that $e^{i\pi n}=\cos(\pi n)+i\sin(\pi n)=\cos(\pi n)=(-1)^n$. Hence, you have: $\begin{align*} y(n)& = c_1 (-2)^n+c_2+c_3 n+\frac{1}{27} 2^{n-1} e^{i \pi n} (4-3 n) \\ & = c_1 (-2)^n+c_2+c_3 n+\frac{1}{27} (-2)^{n-1} (3n-4) \\ & = c_1 (-2)^n+c_2+c_3 n+\frac{1}{9} n (-2)^{n-1} - \frac{4}{27} (-2)^{n-1} \\ & = \left( c_1+\frac{2}{27}\right)(-2)^n+c_3 n+c_2+\frac{1}{9} n (-2)^{n-1} \end{align*}$ The last line is your solution.

  • 0
    @Alan: you should accept answers that you like, so people would know that you got what you were looking for.2012-01-16
0

HINT $\ $ yours $\rm\: =\: \left\: =\: \left\: =\: $ alpha, for $\rm\ c = 2/27\:.$