Finding \sum_{n=0}^{N-1} Cos (nx)

  • MHB
  • Thread starter ognik
  • Start date
  • Tags
    Cos
In summary, if you want to find cos(nx) using the geometric series method, you sum the series from n=1 to N-1, then take the real part. If you want to find cos(nx) using the real part method, you take the sum from n=1 to N-1.
  • #1
ognik
643
2
Hi - going in circles about a step in an example, to find $ \sum_{n=0}^{N-1} Cos (nx) $

The book says we find \(\displaystyle \sum_{n=0}^{N-1} \left( e^{ix} \right)^n = \frac{1-e^{iNx}}{1-e^{ix}}\) , then take the real part.

But I see $ \sum_{n=0}^{N-1} \left( e^{ix} \right)^n $ as a geometric series with a=1, $ r= e^{ix}$ and n=N-1 and \(\displaystyle S_n = \frac{1-r^n}{1-r} = \frac{1-e^{i(N-1)x}}{1-e^{ix}}\)

If I take the sum from n=1 to N I still don't get their result, 'cos then the 1st term would be $e^{ix}$ instead of 1

What am I missing with that N-1 slight of hand please?
 
Physics news on Phys.org
  • #2
Try $n = N$, the formula for a geometric partial sum is:

$S_n = \sum\limits_{k=0}^{n-1} ar^k$

there's no "index sleight-of-hand".
 
  • #3
Hi - I know that if I just use n=N it works, but the series is only summed to N-1? This would add an extra term...
 
  • #4
ognik said:
Hi - going in circles about a step in an example, to find $ \sum_{n=0}^{N-1} Cos (nx) $

The book says we find \(\displaystyle \sum_{n=0}^{N-1} \left( e^{ix} \right)^n = \frac{1-e^{iNx}}{1-e^{ix}}\) , then take the real part.

But I see $ \sum_{n=0}^{N-1} \left( e^{ix} \right)^n $ as a geometric series with a=1, $ r= e^{ix}$ and n=N-1 and \(\displaystyle S_n = \frac{1-r^n}{1-r} = \frac{1-e^{i(N-1)x}}{1-e^{ix}}\)

If I take the sum from n=1 to N I still don't get their result, 'cos then the 1st term would be $e^{ix}$ instead of 1

What am I missing with that N-1 slight of hand please?

Remember that $\displaystyle \begin{align*} \mathrm{e}^{\mathrm{i}\,n\,\theta} \equiv \cos{ \left( n\,\theta \right) } + \mathrm{i} \sin{ \left( n\,\theta \right) } \end{align*}$, so that means

$\displaystyle \begin{align*} \sum_{n = 0}^{N - 1}{ \left( \mathrm{e}^{\mathrm{i}\,x} \right) ^n } &= \sum_{n = 0}^{N-1}{ \left[ \cos{ \left( n\,x \right) } + \mathrm{i}\sin{ \left( n\,x \right) } \right] } \\ \frac{1 - \left( \mathrm{e}^{i\,x} \right) ^N }{ 1 - \mathrm{e}^{\mathrm{i}\,x} } &= \sum_{n = 0}^{N-1}{ \cos{ \left( n \,x \right) }} + \mathrm{i} \sum_{n = 0}^{\infty}{ \sin{ \left( n \,x \right) } } \\ \frac{1 - \left[ \cos{ \left( N \,x \right) } + \mathrm{i}\sin{ \left( N\,x \right) } \right] }{1 - \left[ \cos{(x)} + \mathrm{i}\sin{(x)} \right] } &= \sum_{n = 0}^{N-1}{ \cos{ \left( n\,x \right) } } + \mathrm{i} \sum_{n = 0}^{\infty}{ \sin{ \left( n\,x \right) } } \\ \frac{\left[ 1 - \cos{( \left( N\,x \right) } - \mathrm{i}\sin{ \left( N \, x \right) } \right] \left[ 1 - \cos{(x)} + \mathrm{i}\sin{(x)} \right]}{\left[ 1 - \cos{(x)} \right] ^2 + \left[ \sin{(x)} \right] ^2} &= \sum_{n = 0}^{N-1}{ \cos{ \left( n\,x \right) } } + \mathrm{i} \sum_{n = 0}^{\infty}{ \sin{ \left( n\,x \right) } } \end{align*}$

Cleaning up the left hand side so that you can read off its real and imaginary parts will enable you to answer the question.
 

FAQ: Finding \sum_{n=0}^{N-1} Cos (nx)

What is the purpose of finding the sum of "Cos (nx)"?

The purpose of finding the sum of "Cos (nx)" is to calculate the total value of the cosine function for a given range of values. This can be useful in a variety of mathematical and scientific applications, such as signal processing, vibration analysis, and Fourier series calculations.

How is the sum of "Cos (nx)" calculated?

The sum of "Cos (nx)" can be calculated using various mathematical techniques, such as trigonometric identities, series expansions, or numerical methods. The most common method is to use the formula for the sum of a geometric series, which is Sn = a(1-r^n)/(1-r), where a is the first term and r is the common ratio. In this case, a = 1 and r = Cos (x), giving us the formula for the sum of "Cos (nx)" as (1-Cos (x)^N)/(1-Cos (x)).

What is the significance of the upper limit "N" in the sum of "Cos (nx)"?

The upper limit "N" represents the number of terms in the series being summed. As "N" increases, the more accurate the sum will be, as it takes into account more terms of the cosine function. However, as "N" approaches infinity, the sum will only converge if the value of "x" is within a certain range, typically between -pi and pi. Beyond this range, the sum may diverge or oscillate, making it more difficult to accurately calculate the sum.

Can the sum of "Cos (nx)" be used for any value of "x"?

No, the sum of "Cos (nx)" is only valid for certain values of "x", specifically between -pi and pi. This is because the cosine function is a periodic function with a period of 2pi, meaning it repeats itself every 2pi units. Therefore, any values of "x" outside of this range will result in a different sum or may not converge at all.

How is the sum of "Cos (nx)" used in real-world applications?

The sum of "Cos (nx)" has various applications in fields such as physics, engineering, and mathematics. It can be used to analyze periodic signals in electrical circuits, study the motion of vibrating systems, and approximate other functions using Fourier series. It is also used in the field of digital signal processing to filter out unwanted frequencies and enhance specific frequency components in a signal.

Similar threads

Replies
5
Views
2K
Replies
3
Views
1K
Replies
5
Views
445
Replies
9
Views
1K
Replies
2
Views
2K
Replies
4
Views
2K
Replies
16
Views
3K
Back
Top