<s>[INST] recursive sequence such as $x_{n+2}-2*x_{n+1}+4*x_{n}=0$ I have the recursive sequence such as $x_{n+2}-2*x_{n+1}+4*x_{n}=0$
We are looking for some solutions in the form $x_n=A* \lambda^n $
The equation becomes $A* \lambda ^{n+2}-2A \lambda ^{n+1}+4* A\lambda ^n=0   
 \longrightarrow P( \lambda)=\lambda ^2 - 2\lambda +4=0\longrightarrow \lambda_ {1/2}=1 \pm i\sqrt3=2 (\frac{1}{2} \pm i\frac{\sqrt3}{2})=2 (\cos\frac{\pi}{3} \pm i\sin\frac{\pi}{3})$.
$x_n=A \lambda_1^n+B \lambda_2^n=A 2^n(\cos\frac{n\pi}{3} + i\sin\frac{n\pi}{3})+B2^n(\cos\frac{n\pi}{3} - i\sin\frac{n\pi}{3})=2^n (A+B)(\cos\frac{n\pi}{3} )+ 2^n (A-B)i\sin\frac{n\pi}{3}=2^n (C)(\cos\frac{n\pi}{3} )+ 2^n (D)i\sin\frac{n\pi}{3}   \forall C,D \in R$
I don't understand why in the solution in my book there is
$x_n=2^n (C)(\cos\frac{n\pi}{3} )+ 2^n (D)\sin\frac{n\pi}{3}   \forall C,D \in R$ without the $i$
 [/INST] The sine term's coefficient needs to be real for $x_n$ to be real. If $x_n$ is allowed to be non-real complex, so are the coefficients.
</s>