# non-homogeneous recurrence problem

#### SuperNova1250

Hello everyone,

I have this problem
$a_n + a_{n-1} + 6a_{n-2} = 5n(-1)^n + 2^n$

This is the given solution: $$\displaystyle a_n = (\sqrt{6})^n(C_1\cdot \sin\phi n + C_2\cdot \cos\phi n) + \frac{1}{3} \cdot 2^n + \left(\frac{5}{6}\cdot n + \frac{55}{36}\right)(-1)^n$$

I used the discriminant to find the zeros of characteristic polynomial but then I got this:

$$\displaystyle x_{1,2} = -1 \pm \frac{\sqrt{1-24}}{2}$$
and have no idea how to continue.:cry:

Last edited by a moderator:

#### v8archie

Math Team
That expression for $x_{1,2}$ is going to form the basis of your complementary solution (to the homogeneous equation), the $(\sqrt6)^n\big(c_1\sin (n\phi) + c_2 \cos (n\phi)\big)$, I guess. (The $\sqrt6$ is the norm of the complex roots). The rest of it you can get by the Method of Undetermined Coefficients using $A2^n + (Bn+C)(-1)^n$ as your trial solution.

I'm not convinced by your values for $x_{1,2}$.

Last edited:
1 person

#### SuperNova1250

Well the determinant's formula is $$\displaystyle x_{1,2} = \frac{-b\pm\sqrt{b^2-4ac}}{2a}$$

if I'm correct (btw, I did a mistake in the first post) regarding the determinant, where 1 should be in the numerator too.

However still, plugging in the discriminant I get the expression with negative square root, is this ok? and if
not how it is then?

Last edited by a moderator:

#### v8archie

Math Team
btw, I did a mistake in the first post) regarding the determinant, where 1 should be in the numerator too.

However still, plugging in the discriminant I get the expression with negative square root, is this ok?
That's the error I spotted. Your expression with the negative square root is OK. Since $|x_1| = |x_2| = \sqrt{6}$, can you make a guess as to what $\phi$ might be? If you are struggling with that, consider De Moivre's Theorem $$(\cos \theta + i\sin \theta)^n = \cos n\theta + i\sin n\theta$$

Last edited by a moderator:

#### SuperNova1250

Wait, wait, you used the absolute value on $x_1$ and $x_2$, and got square root of 6.

Can you please explain this part in detail, as the homogeneous part is the one I am struggling with?

I haven't gotten yet to the particular solution.

Last edited by a moderator:

#### v8archie

Math Team
$x_1$ and $x_2$ are complex numbers $a_1 + ib_1$ and $a_2 + ib_2$. What are the absolute values (or modulus, or norm) of these?

If you haven't yet met complex numbers, I don't know why you have this problem to solve.

#### SuperNova1250

I have, the answer I got with the discriminant was

$$\displaystyle \frac{-1 \pm \sqrt{1-24}}{2}$$

which is $$\displaystyle \frac{-1 \pm 23i}{2}$$

How to continue from here?

Last edited by a moderator:

#### v8archie

Math Team
That should be $$\frac{1 \pm i\sqrt{23}}{2}=\frac12 \pm i \frac{\sqrt{23}}2$$

#### SuperNova1250

Well.. and how does that become $$\displaystyle \sqrt{6}$$?

Last edited by a moderator:

#### SuperNova1250

Come on, can anybody solve this step by step? I am really struggling with this problem.