I need help find a function for the following recurrence relation
h$\displaystyle _{n}$=2*h$\displaystyle _{n-1}$+2*h$\displaystyle _{n-2}$
It's getting to big and messy for me to recognize any pattern.
I am assuming you have some initial condtions?. Something like
$\displaystyle h_{n}=0, \;\ h_{1}=1$ or something like that.
You can write it as $\displaystyle h^{2}-2h-2=0$
Solving, we see $\displaystyle h=\sqrt{3}+1, \;\ h=1-\sqrt{3}$
Then, $\displaystyle h_{n}=a(\sqrt{3}+1)^{n}+b(1-\sqrt{3})^{n}$
Now apply your initial condtions to find a and b.
This is a linear constant coefficient homogeneous difference equation. You treat it like a linear constant coefficient homogeneous ODE.
Take trial solution $\displaystyle h_n=\mu^n$, substitute this into the recurrence to get a quadratic equation for $\displaystyle \mu$. Solve the quadratic to get two basic solutions, form a general solution as a linear combination of these two solutions.
RonL