I am solving non linear recursive relations and I stumbled upon this: $$x(n)*x(n+1)=3,\ x(0)=3$$ If you start calculating the values after $0$ you will notice that a pattern emerges: $$x(0) = 3$$ $$x(1) = 1$$ $$x(2) = 3$$ $$x(3) = 1$$ $$...$$ From this I concluded that $x(n) = (-1)^n + 2$
BUT! If you try to solve the problem more conservatively you will convert the relation to a linear one: $log_{3} (x(n)) + log_{3}(x(n+1)) = 1$ $Set\ g(n)=log_{3}(x(n)),\ g(0) = log_{3}(x(0))=1$
$g(n+1) + g(n) = 1 \Rightarrow g(n)=\frac{1}{2}*(-1)^n + \frac{1}{2} \Rightarrow x(n) = 3^{\frac{1}{2}*((-1)^n + 1)} $
The fact that $3^{\frac{1}{2}*((-1)^n + 1)} = (-1)^n + 2$ can also be confirmed by graphing the two functions. My question is: is there a way to go from the one to the other instead of just proving that they are equal?
You're not going to be able to manipulate one into the other because they're not the same function for non-integer input. For example, let $n = 1/2$ then
$$ (-1)^{1/2} + 2 = 2 + i $$
and
$$ 3^{\frac{(-1)^{1/2} + 1}2} = e^{\frac{1 + i}{2}\log 3} = 3^{1/2}[\cos(\tfrac{1}2\log 3) + i\sin(\tfrac{1}2\log 3)] \approx 1.47724 + 0.904296 i $$
If you don't know a lot about complex numbers you're going to just have to take my word for now.
Here's a simpler example:
$$ \cos(n \pi) = (-1)^n $$
for integer values of $n$. But $\cos(\frac12\pi) = 0$ and $(-1)^{1/2} = i$.
So if you have two functions that are equal for integer inputs but are unequal for non-integer inputs. At some point in "simplifying" you will want to use the fact that your inputs are integers. Here the property is that
$$ (-1)^n = \begin{cases} 1 & n \text{ is even} \\ -1 & n \text{ is odd} \end{cases}. $$
And because $(-1)^n$ is in some sense defined based on whether or not $n$ is even or odd, in order to simplify, you're going to want to separate your computation into two cases: when $n$ is even and when $n$ is odd.
Here when you separate the two cases it is easy to see that for even integers, both functions are equal to $3$ and for odd integers, equal to $1$. So they represent the same function on the integers.