0

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

Guess a solution -- $Acos(n\pi/2)+Bsin(n\pi/2)$ where A and B are constants

How do I go about this?

Any help is appreciated

Milo Brandt
  • 60,888
  • I edited your post; check that the equations are still right, since I had to guess about what you intended a bit. – Milo Brandt Oct 31 '14 at 22:31

1 Answers1

0

Using the solution you have guessed and substituting into the LHS gives $$\Bigl(A\cos\frac{(n+2)\pi}2+B\sin\frac{(n+2)\pi}2\Bigr) -\frac12\Bigl(A\cos\frac{(n+1)\pi}2+B\sin\frac{(n+1)\pi}2\Bigr) +\frac18\Bigl(A\cos\frac{n\pi}2+B\sin\frac{n\pi}2\Bigr)\ .$$ Now use trig properties to simplify, for example $$\cos\frac{(n+2)\pi}2=\cos\Bigl(\frac{n\pi}2+\pi\Bigr)=-\cos\frac{n\pi}2$$ and $$\cos\frac{(n+1)\pi}2=\cos\Bigl(\frac{n\pi}2+\frac\pi2\Bigr)=-\sin\frac{n\pi}2\ .$$ Then equate coefficients of LHS and RHS.

David
  • 82,662