Difference equation, special solution

96 Views Asked by At

I have the difference equation:

$x_{n+2} - \frac{1}{2}x_{n+1} + \frac{1}{8}x_{n} = \cos(\frac{n\pi}{2})$

I am guessing the special solution is on the form:

$A\cos(\frac{n\pi}{2}) + B\sin(\frac{n\pi}{2})$

I haven't encountered an equation on this form before, I am used to special solutions on the form of say:

$An + B$

Any tips on how to procede?

2

There are 2 best solutions below

0
On BEST ANSWER

Substitute particular solution $x_n=A\cos(\frac{n\pi}{2}) + B\sin(\frac{n\pi}{2})$ into the equation: $$A\cos(\frac{n+2}{2}\pi) + B\sin(\frac{n+2}{2}\pi)-\frac{1}{2}A\cos(\frac{n+1}{2}\pi)-\frac{1}{2}B\sin(\frac{n+1}{2}\pi)+\frac{1}{8}A\cos(\frac{n\pi}{2})+\frac{1}{8}B\sin(\frac{n\pi}{2})=\cos(\frac{n\pi}{2}),$$ $$-A\cos(\frac{n}{2}\pi)-B\sin(\frac{n}{2}\pi)+\frac{1}{2}A\sin(\frac{n}{2}\pi)-\frac{1}{2}B\cos(\frac{n}{2}\pi)+\frac{1}{8}A\cos(\frac{n\pi}{2})+\frac{1}{8}B\sin(\frac{n\pi}{2})=\cos(\frac{n\pi}{2}),$$ from where we get $$-7A-4B=8,$$ $$-7B+4A=0,$$ and finally $A=-\frac{56}{65}$, $B=-\frac{32}{65}$.

Now, homogeneous equation $x_{n+2}-\frac{1}{2}x_{n+1}+\frac{1}{8}x_{n}=0$ with characteristic equation $x^2-\frac{1}{2}x+\frac{1}{8}=(x-\frac{1}{2})^2$, has solution $x_n=C(\frac{1}{2})^n+D n (\frac{1}{2})^n$.

The general solution is the sum of particular solution with the solution of the homogeneous equation.

0
On

Did I do it wrong when I presumed the following for the homogeneous equation:

$x_{n+2} - \frac{1}{2}x_{n+1} +\frac{1}{8}x_{n} = 0$

$r^2 - \frac{1}{2}r + \frac{1}{8} = 0$

Using $\dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a}$ leads to the roots: $r_{1} = \frac{1}{4} - \frac{i}{4}$ and $r_{2} = \frac{1}{4} + \frac{i}{4}$

from there we get: $X_{n} = E(\frac{1}{4} + \frac{i}{4})^{n} + \bar E(\frac{1}{4} - \frac{i}{4})^{n}, E \in \mathbb{C}$