Help solving fourier cosine series related problem

In summary, Homework Equations state that you should use a change of variables to make the problem easier. You should use the interval [-2,2] to work with and try to find a function that takes on the argument of (-1)^(n+1)/(2n+1). You should solve the odd part and then the even part.
  • #1
RJLiberator
Gold Member
1,095
63

Homework Statement


3.jpg


I am doing #9.

Homework Equations

The Attempt at a Solution


I've been looking at a lot of similar problems on the internet. The main difference between this one and them is that this one has an interval of [0,4] while they often have intervals of [0,pi] or [-pi,pi]

In my class, we discussed using change of variables to make it into some form.

I thought maybe I could work with [-2,2] and call it an even function letting [-2,2] f(x) = 1.

But I didn't get anywhere with this.

It's, once again, one of these problems where once I get the first step, I feel like I will be off to the races. The answer to this problem is:
(4/pi)∑[(-1)^(n+1)/(2n-1)]*[cos[(2n-1)*pi*x/4]]
 
Physics news on Phys.org
  • #2
Here's some of my further work.

We wish to represent this as a cosine series.

f(x) = 1 = ∑a_n*cos(n*pi*x/L)

a_n = 2/L integral from 0 to L of f(x) * cos(n*pi*x/L)dx
= 2/L integral from 0 to L cos(n*pi*x/L) dx
= (2/L)*(L/(n*pi))*[sin(n*pi*x/L)] from 0 to L

= 2/L *L/(n*pi) * sin((n*pi)-0)

The problem here is, is that sin(n*pi) is always equal to 0.

:/
 
  • #3
I think I am on to something.

So, in my post above, I solved only half of the problem (I think) from 0 to 2.

But, f(x) = -1 from 2 < x < 4
so we solve the other half, similarly

2/L *L/(n*pi) * sin((n*pi)-sin(n*pi/2))
= 2/(n*pi)*(-sin(n*pi/2))

Here, sin(n*pi/2) is either 1 or -1 (when odds) or 0 (when even)

So if we add the two (or subtract, not sure which one yet) solutions together we get
0 +/- (-2/(n*pi))(-1)^n
where n is odd

the sum starts to look like the answer from the book when we make the switch from n to 2n+1 for the summation so that all n values become odd.

2/pi ∑[(-1)^(n+1)/(2n+1)]*[cos[(2n+1)*pi*x/4]]

Answer from book:
4/pi∑[(-1)^(n+1)/(2n-1)]*[cos[(2n-1)*pi*x/4]]

Not sure if this is at all correct, but it's looking closer and closer like the solution. Not sure how I got 2/pi instead of 4/pi and the - and + signs are killing me.
 
  • #4
RJLiberator said:
Here's some of my further work.

We wish to represent this as a cosine series.
Doesn't the problem ask you for a sine series? You want to extend the function for x<0 so that f(-x) = f(x).

f(x) = 1 = ∑a_n*cos(n*pi*x/L)

a_n = 2/L integral from 0 to L of f(x) * cos(n*pi*x/L)dx
= 2/L integral from 0 to L cos(n*pi*x/L) dx
= (2/L)*(L/(n*pi))*[sin(n*pi*x/L)] from 0 to L

= 2/L *L/(n*pi) * sin((n*pi)-0)

The problem here is, is that sin(n*pi) is always equal to 0.

:/
This is right for the cosine series, but you're assuming here that ##n\ne 0##. You need to consider that case separately.
 
  • Like
Likes RJLiberator
  • #5
Oh, you're doing #9. Never mind. ;)
 
  • Like
Likes RJLiberator
  • #6
If n equals 0 we have sin(n*pi) = 0 and an n in the denominator. That's no good!

a_0 = 2/pi based on
1/pi* integral from 0 to 2 of 1

(from the definition of cosine a_0)Was I correct in my latest post suggesting that I should also look at the 2 <x < 4 part and add/subtract that to the 0 part ?
 
  • #7
Remember ##a_0## is the average value of the function, so in this case, you expect ##a_0=0##. For a constant function f(x)=1, you would have gotten ##a_0=1##.

To answer your question, yes, you have to integrate over the entire cycle.
$$a_n = \frac 2L \int_0^4 f(x)\cos\left(\frac{2\pi n}{L} x\right)\,dx = \frac 2L \int_0^2 f(x)\cos\left(\frac{2\pi n}{L} x\right)\,dx + \frac 2L \int_2^4 f(x)\cos\left(\frac{2\pi n}{L} x\right)\,dx$$ You just need to evaluate the integral piecewise since f(x) is defined piecewise.
 
  • Like
Likes RJLiberator
  • #8
Are you sure that the cosine function takes on the argument of (2*pi*n*x / L) instead of just pi*n*x/L ?

I have not seen that on other websites :eek:.
 
  • #9
In the second term, I would think L aka the length, would be equal to 2 and not 4.
If this is true, then we have 0 + 0 and this doesn't make any sense to me.
However, If L = 4 then I am on my way to the solution, but I don't understand why it would equal 4.
 
  • #10
RJLiberator said:
Are you sure that the cosine function takes on the argument of (2*pi*n*x / L) instead of just pi*n*x/L ?

I have not seen that on other websites :eek:.
I made a mistake. You're right. For the general Fourier series, you're expanding in multiples of the fundamental frequency ##\frac{2\pi}{T}##, where ##T## is the period.

Here, the function is defined from 0 to ##L##, but you're extending it to an even function defined on ##[-L,L]## so ##T=2L##.
 
  • Like
Likes RJLiberator
  • #11
Ah, so L does equal 2 but since we are extending it, 2*2 = 4 and now I can solve it.

:).
 
  • #12
No, ##L=4## and ##T=8##. Look at the interval the original function is defined on.
 
  • Like
Likes RJLiberator

Related to Help solving fourier cosine series related problem

1. What is a Fourier cosine series?

A Fourier cosine series is a representation of a periodic function as a sum of cosine functions with different amplitudes and frequencies. It is used in mathematics and engineering to analyze and approximate periodic functions.

2. How do you solve a Fourier cosine series problem?

To solve a Fourier cosine series problem, you need to first find the coefficients of the cosine terms by using the Fourier cosine series formula. Then, you can plug in the values of the coefficients and the frequency into the formula to get the final solution.

3. What is the difference between a Fourier cosine series and a Fourier sine series?

A Fourier cosine series represents a function using cosine functions, while a Fourier sine series represents a function using sine functions. In a cosine series, the function is assumed to be an even function, while in a sine series, the function is assumed to be an odd function.

4. How is a Fourier cosine series used in real life?

A Fourier cosine series is used in various real-life applications, such as signal processing, data compression, and image analysis. It is also used in solving differential equations and in harmonic analysis.

5. What are some common challenges in solving Fourier cosine series problems?

Some common challenges in solving Fourier cosine series problems include choosing the appropriate frequency range, dealing with discontinuities or singularities in the function, and dealing with complex coefficients. It is also important to understand the properties and limitations of Fourier series to correctly interpret the results.

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
365
  • Calculus and Beyond Homework Help
Replies
3
Views
467
  • Calculus and Beyond Homework Help
Replies
1
Views
292
  • Calculus and Beyond Homework Help
Replies
1
Views
328
  • Calculus and Beyond Homework Help
Replies
1
Views
578
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
412
  • Calculus and Beyond Homework Help
Replies
1
Views
389
  • Calculus and Beyond Homework Help
Replies
16
Views
620
  • Calculus and Beyond Homework Help
Replies
5
Views
455
Back
Top