2
$\begingroup$

I'm studying how to solve linear constant coefficients difference equations but I have some troubles with a step of the procedure. Consider the system \begin{equation} \begin{cases} y[n]+y[n-1]-6 y[n-2]=x[n] \\ y[-1]=1 \\ y[-2]=-1 \end{cases} \end{equation} Firstable, I stated that $y[n]= y_p [n] + y_h[h]$, that is the sum of the particular and the homoogeneus solution. I found out that the homogeneus solution is $ y_h[n] = c _1 (-3 ) ^ n + c_2 2 ^ n $, whereas, supposing that $x$ has the particular form $x[n] = 8 u[n] $ (and so $y[n ] = \beta x[n]$), the particular solution turns out to be $ y_p [n] = - 2u [n]$. So I can write the whole solution as $y[n ] = y_{\text {h}}[n]+y_{\text {p}}[n]=c_{1}(-3)^{n}+c_{2}(2)^{n}-2 u[n] $. Evaluating the system for $n = 0,1 $, I obtained \begin{equation*} \begin{cases} y[1]+y[0]-6 y[-1]=8 u[1] \\ y[0]+y[-1]-6 y[-2]=8 u[0] \end{cases} \implies \begin{cases} c_1 = -\frac{9}{5} \\ c_2 = \frac{24}{5} \end{cases} \end{equation*} However, I tried to find these two coefficients in another way, namely, imposing the two conditions: \begin{equation} \begin{cases} y [-1 ] = 1\\ y[-2 ] =-1 \end{cases} \implies \begin{cases} c_{1}(-3)^{-1}+c_{2}(2)^{-1}-2u [-1] = -\frac{1}{3}c_1 + \frac{1}{2}c_2 = 1 \\ c_1 (-3 )^ {-2 } + c_2 (2) ^ {-2} -2u[-2] = \frac{1}{9}c_1 + \frac{1}{4} c_2 = -1 \end{cases} \end{equation} and from this system I got $c_1 = -\frac{27}{5}$, $c_2 = - \frac{8}{5} $, that is different from the previous values. Maybe it's a stupid mistake, but I can't understand why I obtain a different result. If someone would like to give me an explanation, it would be appreciated.

$\endgroup$

1 Answer 1

0
$\begingroup$

Your first solution is correct. The other approach you suggested for solving the problem is also correct, and it is even a bit less tedious than the first route you chose, but the result is wrong because your particular solution is wrong. Note that $y_p[n]=-2u[n]$ does not solve the given difference equation for all $n\ge 0$, simply because $y_p[-1]=y_p[-2]=0$ and, consequently, the difference equation is not satisfied for $n=0$ and $n=1$.

I would just get rid of the unit step in the particular solution and would write

$$y_p[n]=-2$$

This particular solution satisfies the given difference equation for all $n\ge 0$, and we don't care about other values of $n$.

With that particular solution, you can simply evaluate the complete solution

$$y[n]=c_1(-3)^n+c_22^n-2$$

for $n=-1$ and $n=-2$ and obtain two equations which can be solved for $c_1$ and $c_2$:

$$\begin{align}-\frac13 c_1+\frac12 c_2-2&=1\\\frac19c_1+\frac14c_2-2&=-1\end{align}$$

This gives the same result as the one obtained by your first method in an even more straightforward way.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.