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 $$


$$ 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.

  • $\begingroup$ Thank you! Would graphing the functions and using the z axis as the complex plane reveal the trig function? am I only seeing the points are which cos goes through the RxR plane when I graph it as a real function? $\endgroup$ – Mario Drouga Jan 13 at 5:05
  • 1
    $\begingroup$ @Mario Possibly. Personally I find it easier to plot the real part and complex parts separately just in the xy-plane. For instance $(-1)^x = e^{x \log(-1)} = e^{\pi x i} = \cos(\pi x) + i \sin(\pi x)$. Converting $3^{\frac{(-1)^x + 1}2}$ to a real and imaginary part will be a lot messier. $\endgroup$ – Trevor Gunn Jan 13 at 5:29

This is of the same type of situation as saying that $2$ and $1 + 1$ are the same. They are different expressions for the same value.

In your case, let $f\left(n\right) = \left(-1\right)^n + 2$, for $n \ge 0 \text{ and } n \in N$. For even values of $n$, the value is $1 + 2 = 3$ and for odd values of $n$, the value is $-1 + 3 = 1$.

Similarly, let $h\left(n\right) = 3^{\frac{\left(-1\right)^n + 1}{2}}$. For $n$ being even here, the value of $\left(-1\right)^n = 1$, so the function becomes $3^{\frac{\left(1 + 1 \right)}{2}} = 3^1 = 3$. With odd values of $n$, $\left(-1\right)^n = -1$, so the function becomes $3^{\frac{\left(-1 + 1\right)}{2}} = 3^0 = 1$.

As you can see, the $2$ functions always have the same value for all non-negative values of $n$. They are just different ways to express the set of results. However, I prefer $f\left(n\right) = \left(-1\right)^n + 2$ as, to me at least, it's simpler to understand and use.

  • $\begingroup$ You've proven that both functions are equal. Can you manipulate the form of function h(n) to get function f(n)? $\endgroup$ – Mario Drouga Jan 13 at 4:13
  • $\begingroup$ @MarioDrouga I'm not quite sure what you mean by "manipulate". How would you, for example, propose to "manipulate" $1 + 1$ to show it's the same as $2$? $\endgroup$ – John Omielan Jan 13 at 4:17
  • $\begingroup$ What if you haven't arrived to the solution of f(n)? Would you be able to simplify g(n) enough to get you to f(n)? $\endgroup$ – Mario Drouga Jan 13 at 4:19
  • 1
    $\begingroup$ @MarioDrouga The most basic of "simplifications" are the numeric values themselves, just like $2$ is usually consider simpler than $1 + 1$. With the set of values you got, there are very many different ways to represent them, with you just using $2$. In general, don't worry about determining more than $1$ way to specify results, much less figuring out how to go directly from one to another. Instead, you would normally just try to find a relatively simple & straightforward way to represent your results & use this, with the understanding that it's not the one & only unique way to do it. $\endgroup$ – John Omielan Jan 13 at 4:22

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.