1. ## recursive function

I have a recursive function and I seem to be having a problem deducing a general solution for it:
$u_{n+2} = u_{n+1}^2 + u_{n}^2-2$
The initial conditions are $u_{o} = 1, u_{1} = 1$
Some of the values are as followed:
$u_{o}=1, u_{1}=1,u_{2}=0,u_{3}=-1,u_{4}=-1,u_{5}=0,u_{6}=-1,u_{7}=-1,u_{8}=0$
My initial thought was that it was a periodic function. But I am as yet unable to begin to formulate a general solution,
Can anyone help. Thank you.

2. Originally Posted by riptorn70
I have a recursive function and I seem to be having a problem deducing a general solution for it:
$u_{n+2} = u_{n+1}^2 + u_{n}^2-2$
The initial conditions are $u_{o} = 1, u_{1} = 1$
Some of the values are as followed:
$u_{o}=1, u_{1}=1,u_{2}=0,u_{3}=-1,u_{4}=-1,u_{5}=0,u_{6}=-1,u_{7}=-1,u_{8}=0$
My initial thought was that it was a periodic function. But I am as yet unable to begin to formulate a general solution,
Can anyone help. Thank you.
Hi

Your initial thought is correct :
$u_{2}=0,u_{3}=-1,u_{4}=-1$
$u_{5}=0,u_{6}=-1,u_{7}=-1$
$u_{8}=0$ etc ...

3. Thank you running_gag for your input. I believe I may have the embroyo of a general solution, as followed: (do you think i'm on the right track)

$
u_{n} = 1, \mbox{ }n\leq 1
$

$
u_{n}=\left\{\begin{array}{cc}
0,&\mbox{ if } n\equiv 2 \bmod 3\\-1, & \mbox{ if } n\equiv 0 \bmod 3
\\-1, & \mbox{ if } n\equiv 1 \bmod 3\end{array}\right.
$

But due to the fact that it is periodic do you think I should be looking more to trigonometric functions for a more elegant solution i.e the sine and cosine functions. Any input or ideas would be appreciated. Thank you

4. Originally Posted by riptorn70
Thank you running_gag for your input. I believe I may have the embroyo of a general solution, as followed: (do you think i'm on the right track)

$
u_{n} = 1, \mbox{ }n\leq 1
$

$
u_{n}=\left\{\begin{array}{cc}
0,&\mbox{ if } n\equiv 2 \bmod 3\\-1, & \mbox{ if } n\equiv 0 \bmod 3
\\-1, & \mbox{ if } n\equiv 1 \bmod 3\end{array}\right.
$

But due to the fact that it is periodic do you think I should be looking more to trigonometric functions for a more elegant solution i.e the sine and cosine functions. Any input or ideas would be appreciated. Thank you
Maybe you could but I think that recursivity is a good way to demonstrate your idea
Let P(n) be $u_{3n+2} = 0, u_{3n+3} = -1, u_{3n+4} = -1$

P(0) is true since $u_{2} = 0, u_{3} = -1, u_{4} = -1$
It is easy to demonstrate that if P(k) is true then P(k+1) is true
Which demonstrates P(n) for every n

5. Great!! thank you for your input. The inductive reasoning is very helpful thankyou.