# If x_{1}=-1,\ x_{2}=1,\ X_{n}=3X_{(n-1)}-|2X_{(n-2)},\ \forall n\geq3. Find the gene

If $$\displaystyle{x}_{{{1}}}=-{1},\ {x}_{{{2}}}={1},\ {X}_{{{n}}}={3}{X}_{{{\left({n}-{1}\right)}}}-{\mid}{2}{X}_{{{\left({n}-{2}\right)}}},\ \forall{n}\geq{3}.$$ Find the general term $$\displaystyle{X}_{{{n}}}$$

• Questions are typically answered in as fast as 30 minutes

### Plainmath recommends

• Get a detailed answer even on the hardest topics.
• Ask an expert for a step-by-step guidance to learn to do it yourself.

l1koV
Step 1
The given recurrence relation is
$$\displaystyle{x}_{{{n}}}-{3}{x}_{{{n}-{1}}}+{2}{x}_{{{n}-{2}}}={0}$$
The characteristic equation is
$$\displaystyle{r}^{{{2}}}-{3}{r}+{2}={0}\Rightarrow{\left({r}-{1}\right)}{\left({r}-{2}\right)}={0}$$
has the roots $$\displaystyle{r}_{{{1}}}={1}$$ and $$\displaystyle{r}_{{{2}}}={2}$$
Step 2
Since the roots are distinct, the general solution is
$$\displaystyle{x}_{{{n}}}={c}_{{{1}}}{{r}_{{{1}}}^{{{n}}}}+{c}_{{{2}}}{{r}_{{{2}}}^{{{n}}}}$$
$$\displaystyle={c}_{{{1}}}{1}^{{{n}}}+{c}_{{{2}}}{2}^{{{n}}}$$
$$\displaystyle={c}_{{{1}}}+{c}_{{{2}}}{2}^{{{n}}}$$
Step 3
Plug the initial conditions to find the value of constants.
1) $$\displaystyle-{1}={x}_{{{1}}}={c}_{{{1}}}+{2}{c}_{{{2}}}$$
Also
2) $$\displaystyle{1}={x}_{{{2}}}={c}_{{{1}}}+{4}{c}_{{{2}}}$$
Step 4
Solving (1) and (2).
Subtract (1) from (2).
$$\displaystyle{2}{c}_{{{2}}}={2}\Rightarrow{c}_{{{2}}}={1}$$
From (1),
$$\displaystyle{c}_{{{1}}}=-{3}$$
Step 5
Thus the general solution becomes
$$\displaystyle{x}_{{{n}}}=-{3}+{2}^{{{n}}}$$
which is the general term.