Fourier Cosine Series Coefficient Calculation: A_n = (2)(-1)^{n+1}(n≥1)

In summary: If n is even, then cos(n \pi x /2) will always be zero since it's the limit of the cosine series as n goes to infinity.
  • #1
TranscendArcu
285
0

Homework Statement



Screen_shot_2012_05_18_at_5_53_44_PM.png


The Attempt at a Solution


So after I have properly extended the series, I want to find the A_n coefficients. In the case of A_0 I get 1/2 -- good, great. That's what the book gets.

Now for the general A_n:

[itex]A_n = \frac{1}{2} \int^2_{-2} (1)cos(\frac{n\pi x}{2}) dx [/itex]
because, in the piecewise function, the portions from -2 to -1 and from 1 to 2 are zero, we can just write this as

[itex]A_n = \frac{1}{2} \int^1_{-1} (1)cos(\frac{n\pi x}{2}) dx [/itex]
[itex]= \frac{1}{2}(\frac{2}{n\pi} sin(\frac{n\pi x}{2}) |^1_{-1} = \frac{2}{n\pi} sin(\frac{n\pi}{2}) n ≥ 1[/itex]

and because integers n's will just cause the sin term to alternate between -1 and 1:

[itex] = \frac{(2)(-1)^{n+1}}{n\pi} n≥1[/itex], and this is my general term for the coefficients. But this isn't what the book gets, so what have I done wrong?
 
Physics news on Phys.org
  • #2
TranscendArcu said:

Homework Statement



Screen_shot_2012_05_18_at_5_53_44_PM.png


The Attempt at a Solution


So after I have properly extended the series, I want to find the A_n coefficients. In the case of A_0 I get 1/2 -- good, great. That's what the book gets.

Now for the general A_n:

[itex]A_n = \frac{1}{2} \int^2_{-2} (1)cos(\frac{n\pi x}{2}) dx [/itex]
because, in the piecewise function, the portions from -2 to -1 and from 1 to 2 are zero, we can just write this as

[itex]A_n = \frac{1}{2} \int^1_{-1} (1)cos(\frac{n\pi x}{2}) dx [/itex]
[itex]= \frac{1}{2}(\frac{2}{n\pi} sin(\frac{n\pi x}{2}) |^1_{-1} = \frac{2}{n\pi} sin(\frac{n\pi}{2}) n ≥ 1[/itex]

and because integers n's will just cause the sin term to alternate between -1 and 1:

[itex] = \frac{(2)(-1)^{n+1}}{n\pi} n≥1[/itex], and this is my general term for the coefficients. But this isn't what the book gets, so what have I done wrong?

If the period is 4, we need to know the values of f(x) between x = 2 and x = 4 (or, perhaps, between x = -2 and x = 0). What are those values?

RGV
 
  • #3
Since it says to use a cosine series, I presume that the question intends for us to use an "even" function extension for the piecewise. Thus, the values for f(x) = 0 between -2<x<-1 and f(x) = 1 for -1 < x < 0. Assigning f(x)'s extension in such a way makes the function even and thus permits us to find a cosine series.
 
  • #4
TranscendArcu said:
Since it says to use a cosine series, I presume that the question intends for us to use an "even" function extension for the piecewise. Thus, the values for f(x) = 0 between -2<x<-1 and f(x) = 1 for -1 < x < 0. Assigning f(x)'s extension in such a way makes the function even and thus permits us to find a cosine series.

OK, that seems fair. You say your answer differs from that in the book. What is the book's answer? Is it, perhaps, just a matter of some different normalization convention? I don't see anything obviously wrong with your computation.

RGV
 
  • #5
This is the books answer:

Screen_shot_2012_05_18_at_8_29_38_PM.png


my answer will be [itex]f(x) = \frac{1}{2} + \sum_{n=1}^∞ ( \frac{(2)(-1)^{n+1}}{n\pi}) cos(\frac{n\pi x}{2})[/itex]

But they seem to think that we're skipping some terms (hence the 2n - 1 things), but I don't have any terms zeroing so I don't need to make that adjustment.
 
  • #6
So I just tried to plot the first couple of terms in the series in MATLAB. I've attached the resulting graph in this post. As you can see, my answer isn't doing the right thing -- it's not correctly approximating the solution. Now, granted, this is only seven terms, but it doesn't seem to be doing very well. So I'm thinking that I must have a mistake somewhere in this work...

Screen_shot_2012_05_18_at_9_31_34_PM.png
 
  • #7
TranscendArcu said:
So I just tried to plot the first couple of terms in the series in MATLAB. I've attached the resulting graph in this post. As you can see, my answer isn't doing the right thing -- it's not correctly approximating the solution. Now, granted, this is only seven terms, but it doesn't seem to be doing very well. So I'm thinking that I must have a mistake somewhere in this work...

Screen_shot_2012_05_18_at_9_31_34_PM.png

For even n ≥ 2 we will have [itex] \int_{-1}^1 \cos(n \pi x /2)\, dx = 0[/itex] because in each interval (-1,0) and (0,1) the positive and negative areas cancel. For example, when n = 2 the areas from x = 0 to x = 1/2 and x = 1/2 to x = 1 are opposite.

RGV
 

Related to Fourier Cosine Series Coefficient Calculation: A_n = (2)(-1)^{n+1}(n≥1)

1. What is a Fourier Cosine Series?

A Fourier Cosine Series is a mathematical tool used to represent a periodic function as a sum of cosine functions with different frequencies. It is part of the broader field of Fourier analysis, which explains how any periodic function can be decomposed into a combination of simpler trigonometric functions.

2. How is a Fourier Cosine Series different from a Fourier Series?

A Fourier Cosine Series only uses cosine functions, while a Fourier Series uses both sine and cosine functions. This means that a Fourier Cosine Series can only represent even functions, while a Fourier Series can represent both even and odd functions.

3. What are the applications of Fourier Cosine Series?

Fourier Cosine Series have many practical applications in fields such as signal processing, image processing, and data compression. They are also used in physics and engineering to model and solve differential equations and to analyze the behavior of physical systems.

4. How is a Fourier Cosine Series calculated?

The coefficients of a Fourier Cosine Series are calculated using integration techniques. The integral of the function being represented is multiplied by the cosine function with the same frequency, and the result is divided by the period of the function. This process is repeated for each frequency in the series, and the coefficients are then used to construct the series.

5. What is the difference between a Fourier Cosine Series and a Fourier Transform?

A Fourier Cosine Series is used to represent a periodic function, while a Fourier Transform is used to represent a non-periodic function. Additionally, a Fourier Transform uses both sine and cosine functions, while a Fourier Cosine Series only uses cosine functions. The Fourier Transform also provides information about the frequency components of a function, while a Fourier Cosine Series only provides information about the cosine components.

Similar threads

  • Calculus and Beyond Homework Help
Replies
1
Views
386
  • Calculus and Beyond Homework Help
Replies
1
Views
288
  • Calculus and Beyond Homework Help
Replies
3
Views
466
  • Calculus and Beyond Homework Help
Replies
16
Views
617
  • Calculus and Beyond Homework Help
Replies
1
Views
575
  • Calculus and Beyond Homework Help
Replies
6
Views
446
  • Calculus and Beyond Homework Help
Replies
1
Views
349
  • Calculus and Beyond Homework Help
Replies
8
Views
385
  • Calculus and Beyond Homework Help
Replies
2
Views
408
  • Calculus and Beyond Homework Help
Replies
3
Views
362
Back
Top