# Basic Spectral Analysis proof help

• A
• Ma Xie Er
In summary, the proof shows that the sum of cosines can be rewritten as a sum of complex exponentials, which can then be simplified using De Moivre's theorem. However, this does not work for j=0 and j=n/2, and it is not clear why it works for other values of j.

#### Ma Xie Er

I'm reading "Time Series Analysis and Its Applications with R examples", 3rd edition, by Shumway and Stoffer, and I don't really understand a proof. This is not for homework, just my own edification.

It goes like this:
Σt=1n cos2(2πtj/n) = ¼ ∑t=1n (e2πitj/n - e2πitj/n)2 = ¼∑t=1ne4πtj/n + 1 + 1 + e-4πtj/n = n/2.

I'm don't see how the last equality follows. I think, somehow, that the e4πtj/n and e-4πtj/n terms cancel out, but how?

Any ideas?

Ma Xie Er said:
I think, somehow, that the e4πtj/n and e-4πtj/n terms cancel out, but how?
They don't need to cancel out if they are each 0 on their own.

Dale said:
They don't need to cancel out if they are each 0 on their own.

How are they zero on their own? If this is by De Moivre's theorem, then that doesn't apply to non-integers powers, i.e. (cos(x)+isin(x))n ≠(cos(nx) + i sin(nx)) for n ∉ℤ.

Ma Xie Er said:
How are they zero on their own?
Why don't you try it by hand for small n. Try writing out the sum for n=4.

Last edited:
Dale said:
Why don't you try it by hand for small n. Try writing out the sum for n=4.
Yes, I can see that, for n=4, j=1, but it doesn't work for j=2, n=4.
t=14 e4π i t 2/4 =∑t=14 eπ i (2t) = (-1)2 + (-1)4 + (-1)6 + (-1)8 ≠ 0.

Umm. Doesn't ##j=\sqrt{-1}## always?

Dale said:
Umm. Doesn't ##j=\sqrt{-1}## always?

No. n is a positive integer, and j= 1, ..., [[n/2]], where [[n/2]] is the floor or greatest integer function of n/2.

Dale said:
Umm. Doesn't ##j=\sqrt{-1}## always?
This text denotes i as √(-1)

Here's a link to the text http://www.stat.pitt.edu/stoffer/tsa3/tsa3.pdf. I was trying to solve Problem 2.10 on pg 77 (pg 87 of pdf). I don't quite understand footnote9, which is why I posted. I'm completely new to Fourier decomposition, so I'm having a hard time with this.

Ma Xie Er said:
This text denotes i as √(-1)
Oh, then your summand is written wrong. You wrote.
$$\sum _{t=1}^n e^{4\pi t j/n} + 1 + 1 + e^{-4\pi t j/n}$$
but it should be
$$\sum _{t=1}^n e^{4\pi i t j/n} + 1 + 1 + e^{-4\pi i t j/n}$$

I'm not sure that fixes the proof, but it is important to write the problem clearly.

OK, so I don't think that they individually sum to 0, but you can recombine them to get
$$\sum _{t=1}^n \cos(4\pi t j/n) + 2$$

Dale said:
OK, so I don't think that they individually sum to 0, but you can recombine them to get
$$\sum _{t=1}^n \cos(4\pi t j/n) + 2$$

I think ##e^{ix}-e^{-ix}= 2 cos(x)##. In this case, ##e^{4 \pi t j/n}+ e^{- 4 \pi t j/n} = 2 cos(4 \pi t j/n)##, so shouldn't it be ##\sum_{t=1}^n 2 (1 + cos(4 \pi t j/n)## ?

And after this I'm still not sure how the series sums to 0.

Right now I agree with you on that. It doesn't appear to work for j = n/2

Just looked at the textbook. It specifically excludes the cases j = 0 and j = n/2. I think it works for all other j.

Oops. You I forgot that case.

For ##j=1,.,,[[n/2]]-1##, I still don't see why it's true.

## What is Basic Spectral Analysis?

Basic Spectral Analysis is a method of analyzing and interpreting data from a spectrum, which is a representation of a signal as it varies with frequency or wavelength. It involves breaking down a complex signal into its individual components to better understand its characteristics and behavior.

## What is the purpose of Basic Spectral Analysis?

The purpose of Basic Spectral Analysis is to identify the different frequencies or wavelengths present in a signal, and to determine their amplitude, phase, and other characteristics. This can help in understanding the underlying physical processes that produce the signal, and can also be used for applications such as noise reduction, pattern recognition, and signal filtering.

## What are the key steps in performing Basic Spectral Analysis?

The key steps in performing Basic Spectral Analysis include acquiring a spectrum, pre-processing the data to remove any noise or unwanted signals, applying a mathematical algorithm such as the Fourier transform to convert the signal into its frequency domain representation, and then interpreting the results to identify the components of the signal.

## What types of signals can be analyzed using Basic Spectral Analysis?

Basic Spectral Analysis can be applied to a wide range of signals, including audio, video, images, and other types of data. It is commonly used in fields such as physics, engineering, medicine, and finance to analyze and interpret various signals and phenomena.

## What are some common tools and software used for Basic Spectral Analysis?

Some common tools and software used for Basic Spectral Analysis include MATLAB, Python, R, and various specialized software packages such as SpectraLab and PicoScope. These tools provide a range of functions and algorithms for acquiring, processing, and analyzing spectral data, and can be customized for various applications and research needs.