Finding the $n^{\text{th}}$ term

74 Views Asked by At

I have the following sequence:

$$1, 2 \cos⁡(x),~ 1+2 \cos⁡(2x),~ 2 \cos⁡(x)+2 \cos⁡(3x)….$$

I need to find the $n^{\text{th}}$ term, considering the $1^{st}$ term as $1$, $2^{nd}$ as $2 \cos(x)$ and so on.

We can represent it by a recurrence function as:

$$f(n) = f(n-2) + 2\cos((n-1) x), f(1) = 1, f(2) = 2\cos(x)$$

So what is the non-recursive version of the function, or how to approach to find one?

2

There are 2 best solutions below

0
On BEST ANSWER

For odd $n=2k+1$, we have $$ f_n = f_1+\sum_{j=1}^{k}\left( f_{2j+1} - f_{2j-1}\right)=1+2\sum_{j=1}^k \cos (2jx). $$ For even $n=2k$, we have $$ f_n = f_2+\sum_{j=2}^{k}\left( f_{2j} - f_{2j-2}\right)=2\sum_{j=1}^k \cos \left((2j-1)x\right). $$

0
On

Hint.

Try to solve

$$ Z_n = Z_{n-2}+2e^{i(n-1)x} $$

here $Z_n = Z_n^h+Z_n^p$ and

$$ Z_n^h-Z_{n-2}^h=0 $$

gives

$$ Z_n^h = C_1+C_2(-1)^n $$

and

$$ Z_n^p-Z_{n-2}^p = 2\lambda^n $$

gives

$$ Z_n^p = \frac{\lambda ^{n+2} \left((\lambda -1) (-1)^{2 n+1}+\lambda +1\right)}{\lambda ^2-1} $$

After that

$$ f_n = Re(Z_n) $$