Solving a Difference Equation.

229 Views Asked by At

Consider the following difference equation:

$y(n+2) -4y(n) = 2^{n+3} - 1, \quad n \geq 0$.

Here is my try: First we must find the solution of the homogenous difference equation, we do this by solving the characteristic equation: $r^2 - 4 = 0 \implies r_1 = 2, r_2 = -2.$

Thus our solution to the homogenous equation is $y_H(n) = A2^n + B(-2)^n$, which subsequently give the general solution $y(n) = A2^n + B(-2)^n + u^*$, where $u^*$ is a particular solution of the given difference function. To find a particular solution we consider the general form $u^* = 2^{n+3} + C$. Then we find

$2^{n+5} + C - 4 \cdot (2^{n+3} + C) = 2^{n+3} - 1 \implies -3 \cdot 2^{n+3} + 4 -3C = 2^{n+3} - 1 \implies C = \frac{4 \cdot 2^{n+3} - 5}{ -3}$

This thus eventually gives us the following general solution: $y(n) = A2^n + B(-2)^n + 2^{n+3} + \frac{4 \cdot 2^{n+3} - 5}{ -3}$

But this seems rather odd to me, the solution's manual uses the annihilator method but I do not understand that. Am I on the right track?

3

There are 3 best solutions below

1
On

Since the right-hand side has a term that is proportional to a homogenous solution, we attempt a particular solution of the form $A+Bn2^n$. Proceeding, we find that the particular solution $y_p$ is given by

$$y_p(n)=1/3+n2^n$$

3
On

[Repost from the chat] It suffices to try $an2^n + b$. Two approaches to get that.

First, the annihilator method, which considers the left-shift operator $\tau\colon(u_n)\mapsto (u_{n+1})$. The picture solution you sent factorizes the left-hand term using $\tau$, as well as the equation satisfied by the right-hand term. Those two factorizations have (in total) two non-common roots: $-2$ and $1$, as well as the common root $2$. Therefore, it searches for solutions as linear combinations of $(-2^n)$, $1^n$, and $(an+b)2^n$. As you have pointed out, we already know $2^n$ and $(-2)^n$ to be homogeneous solutions (since the left-hand term factorizes with roots $2$ and $-2$). We can thus focus on an expression of the form $an2^n + c1^n$.

A second approach consists in using an analog of the Z-transform as suggested by @Mark Viola. An analog of the Z-transform associates to a sequence $(u_n){n\in\mathbb{Z}}$ the power series $\sum u_n x^n$. The sequence equation corresponds to $(\frac 1 {x^2} - 4) f(x) = \frac 8 {1-2x} - \frac 1 {1-x}$ for the transform $f$. By re-arranging we get $f$ as a rational function (the quotient of two polynomials). We can then consider its partial fraction decomposition (i.e with irreducible polynomials) by classical methods, or with a mathematical software, what can make this method faster than the above. Each fraction can easily be expressed as a power series, which provides a particular solution by looking at the power series coefficients of this function (inverse transform).

2
On

I'll try a simpler approach. I believe this is the annihilator method. Basically, starting with

$$ y(n) = 4y(n-2) + 2\cdot2^n - 1, \quad n \geq 0,\ y_0,\ y_1 $$

Since you've already determined that 2^n is a characteristic root, we can assume a solution of the form

$$ y_n=f_n+an2^n+b $$

The annihilator method is then to substitute this into the above recurrence and choose $a,b$ such that we left with only homogeneous recurrence with $f_0=y_0-b$ and $f_1=y_1-2a-b$. Following through, I find that $a=1$ and $b=1/3$, in agreement with @MarkViola. However, it is important to pay attention to the modified initial conditions on the homogeneous equation

$$ f_n=4f_{n-2} $$