# Math Help - Finding Function for a recurrance relation

1. ## Finding Function for a recurrance relation

I need help find a function for the following recurrence relation

h $_{n}$=2*h $_{n-1}$+2*h $_{n-2}$

It's getting to big and messy for me to recognize any pattern.

2. I am assuming you have some initial condtions?. Something like

$h_{n}=0, \;\ h_{1}=1$ or something like that.

You can write it as $h^{2}-2h-2=0$

Solving, we see $h=\sqrt{3}+1, \;\ h=1-\sqrt{3}$

Then, $h_{n}=a(\sqrt{3}+1)^{n}+b(1-\sqrt{3})^{n}$

Now apply your initial condtions to find a and b.

3. h $_{1}$=3
h $_{2}$=8

4. In that event, you have two equations to solve for a and b. Just use your conditions.

$a(\sqrt{3}+1)+b(1-\sqrt{3})=3$

$a(\sqrt{3}+1)^{2}+b(1-\sqrt{3})^{2}=8$

5. Originally Posted by hockey777
I need help find a function for the following recurrence relation

h $_{n}$=2*h $_{n-1}$+2*h $_{n-2}$

It's getting to big and messy for me to recognize any pattern.
This is a linear constant coefficient homogeneous difference equation. You treat it like a linear constant coefficient homogeneous ODE.

Take trial solution $h_n=\mu^n$, substitute this into the recurrence to get a quadratic equation for $\mu$. Solve the quadratic to get two basic solutions, form a general solution as a linear combination of these two solutions.

RonL