Non-homogenous Difference Equation with $f(n) = 2^n$

39 Views Asked by At

I'm struggling to solve $$y_n + 5y_{n-1} - 14y_{n-2} = 2^n$$

I've solved the first part: $${y_n}^{(h)} = A(-7)^n + B(2)^n$$

But struggling solving the particular solution.

I tried:

$${y_n}^{(p)} = Mk^n$$

$$Mk^n + 5(Mk^{n-1}) -14(Mk^{n-2}) = 2^n$$ $$\iff k^n(M+5Mk^{-1}-14Mk^{-2}) = 2 ^n$$ $$k = 2$$ $$M + \frac{5M}{2} - \frac{14M}{4} = 1 \iff 0 \ne 1$$ Next I tried with: $${y_n}^{(p)} = Mk^n \cdot n$$ $$Mk^n \cdot n + 5Mk^{n-1}(n - 1) - 14Mk^{n-2}(n-2) = 2^n$$ $$k^n(Mn + 5Mnk^{-1}-5Mk^{-1} -14Mnk^{-2} + 28Mk^{-2}) = 2^n$$ I don't know how to proceed from here. Can you help?

2

There are 2 best solutions below

5
On BEST ANSWER

Your last line is $$k^n(Mn + 5Mnk^{-1}-5Mk^{-1} -14Mnk^{-2} + 28Mk^{-2}) = 2^n$$

As before, you have to take $k=2$.

Your equation can therefore be rewritten as $$ Mn(1+5/2-14/4)-5M/2+28M/4=1. $$ Since $1+5/2-14/4=0$, you see that the coefficient before $Mn$ is $0$ and there remains $-5M/2+28M/4=1$, hence $M=2/9$.

0
On

Using the variation of constants method. Assuming

$$ y_n = A_n(-7)^n+B_n 2^n $$

after substituting into the difference equation we have

$$ 2(-7)^n(7A_n-5A_{n-1}+2A_{n-2})-2^n 7(2B_n+5B_{n-1}-7B_{n-2}-2) = 0 $$

so choosing now

$$ 7A_n-5A_{n-1}+2A_{n-2}=0\\ 2B_n+5B_{n-1}-7B_{n-2}=2 $$

we have after solving

$$ A_n = C_1\left(-\frac 27\right)^n+C_2\\ B_n = -\frac {1}{81}(2-9n)+\left(-\frac 72\right)^n C_3+C_4 $$

then choosing $C_1=C_2=C_3=C_4=0$ we have finally

$$ A_n = 0\\ B_n = -\frac {1}{81}(2-9n) $$