Modelling a function for a fourier series

  • #1
565
2
when modelling a function for a Fourier series, what determines which function i select from the forcing function for an and bn?
eg
in the following would 1-t^2 be used in the an or bn formula?
http://users.on.net/~rohanlal/fourier2.jpg [Broken]
 
Last edited by a moderator:
  • #2
you would have to use both parts of f(t) when finding an and bn. all you need to do is break up the integrals that determine an and bn to the appropriate domains for each part of your function.
 
  • #3
but how do i determine which part of f(x) goes in the an and which in the bn formula?
 
  • #4
As Easty says, you have to use both the definitions of f(t) for both an and bn.
Meaning, an will be sum of two integrals :
-One going from -ve infinity to 0 and using the first definition of f(t)=1-t2.
-Second going from 0 to infinity, using the second definition of f(t)=1.

Likewise for bn.

Goodluck!
 
  • #5
The general expression for a Fourier series of a 2pi-periodic function is given by.

[tex]
f(x)=a_0+\sum_{n=1}^\infty (a_n \cos nx+b_n \sin nx)
[/tex]

So in general you will need to always calculate both a_n and b_n, however seeing as we integrate over a symmetric interval to determine the coefficients and we know that if we integrate an odd function over a symmetric interval we get 0. Therefore if f(t) is even f(t)sin(nt) is odd and b_n will be zero. Similarly if f(t) is odd f(t)cos(nt) will be odd and a_n will be zero. Your function is neither even nor odd.
 
  • #6
if an or bn are zero due to the function being even or odd then that means you don't use both parts of f(t) in the formula. How do i determine what part of f(t) i should use?
 
  • #7
if an or bn are zero due to the function being even or odd then that means you don't use both parts of f(t) in the formula. How do i determine what part of f(t) i should use?

Your f(t) is neither even nor odd. Therefore you must use both parts, as others have already told you.

Why don't you start by trying to write down a formula for [tex]a_n[/tex]. It will be a sum of two integrals, one for each part of f(t). If you get stuck, then show us what you are trying, and we'll let you know if something is wrong and/or suggest a next step.
 
  • #8
i understand that is the case for this problem but what about problems that have odd or even functions?
 
  • #9
Your question is answered in post #5. If that's not what you meant then please try to be more detailed.
 
  • #10
I want to find the Fourier series of the following function, an even function, meaning bn=0
http://users.on.net/~rohanlal/even.jpg [Broken]
what should i make f(x) in the a_n formula, X+L or L-X?
 
Last edited by a moderator:
  • #11
Ry122 said:
i understand that is the case for this problem but what about problems that have odd or even functions?

If this is true, I would like to see the formula for a_n and b_n of the previous problem since it works exactly the same as your new problem. Therefore I suspect that you did something awkward for the previous problem as well. Please show us your work.
 
Last edited:
  • #12
I haven't myself attempted these questions. I want an answer to my question before i bother trying.
Are you saying that you use both parts of f(x) even in even functions?
In the solution to my last posted problem, for a_n f(x) is made to equal L-X and the second part of the function is ignored (X+L).
 
  • #13
The general rules of this forum as far as I know ask you to attempt first, show us your attempt and we help you from there. My point is that in post 8 you claim to understand the question you ask in post 10. This seemed odd to me. Now seeing what you're doing in post 12 I know for sure you did not understand the previous problem either. That's why I think it's best to return to the original problem before continuing.

Either way the function f(x) is even indeed so b_n is 0. However the question states you have to Fourier transform f(x). The function you're transforming is g(x)=L-X, and [itex]f(x) \neq g(x)[/itex].

This is what you want to calculate:

[tex]
a_n=\frac{1}{L} \int_{-L}^L f(x) cos(\frac{n\pi x}{L})dx
[/tex]

[quote='Ry122]
Are you saying that you use both parts of f(x) even in even functions[/quote]

This is not only what I am saying, but also the formula for the Fourier coefficients.
 
Last edited:
  • #14
so this is wrong? this is a solution from my teacher. there's no X+L in there
http://users.on.net/~rohanlal/laplace.jpg [Broken]
 
Last edited by a moderator:
  • #15
Yes that's wrong, what you have there is the Fourier transform of the function g(x) in my previous post. In fact g(x) is odd so g(x) cos( Pi n x/L) is odd. You should really read post #5 again and use the data the assignment has given you. It gives you f(x), you have a formula to calculate a_n which includes the function f(x). So just plug f(x) into the formula and you can't go wrong.
 
  • #16
but this is from my lecturer, and he's repeated the same process in several problems so it can't be a mistake.
 
  • #17
Ok I reviewed it again it's the correct answer, but you didn't just ignore the x+L part. Did you come to this answer by copying the lecture notes or actually realizing that:

[tex]\frac{1}{L}\int_{-L}^0 (x+L) dx+\frac{1}{L} \int_0^L(L-x)dx =\frac{2}{L}\int_0^L (L-x) dx[/tex]?
 
  • #18
so what happens with it?
 
  • #19
The left side is how you integrate your function f(x). Your teacher notices that he can write this as 2 times the integral of the right hand side. This saves time. He does NOT ignore the L+x term. Do you see this?
 
  • #20
so it doesn't matter which part of f(x) you ignore, you can choose either part to be f(x) in a_n?
 
  • #21
Cyosis, the solution in #14 is correct.

[tex] \frac{1}{L} \int_{-L}^{L}f(x) cos(k_n x) dx = \frac{1}{L} \int_{-L}^{0}(x + L)cos(k_n x) dx + \frac{1}{L} \int_{0}^{L}(L - x)cos(k_n x) dx = \frac{2}{L} \int_{0}^{L}(L-x) cos(k_n x) dx [/tex]

EDIT: I see you already noticed.
 
  • #22
No, no and no. Your teacher does NOT ignore anything. Ignoring either side in this case would mean you're a factor 2 off.

Lets write out the full transform.

[tex]
\begin{align*}
a_n & = \frac{1}{L}\int_{-L}^L f(x)\cos(\frac{n \pi x}{L}) dx
\\
& =\frac{1}{L}\int_{-L}^0 (x+L) \cos(\frac{n \pi x}{L}) dx+\frac{1}{L} \int_0^L(L-x) \cos(\frac{n \pi x}{L})dx
& = \frac{2}{L}\int_0^L (L-x) \cos(\frac{n \pi x}{L}) dx
\end{align}
[/tex]

To dx. Yes it is. Seeing as he was talking about ignoring one part of the function I missed the two, however I still think it's a lousy move of a teacher to write it in that form right away, which to some may suggest you're ignoring a part of the function. This is not the case and is causing a lot of confusion in this particular case.
 
  • #23
i shouldn't have used the word ignore, what i meant to ask was does it matter which part of f(x) is chosen to be used in f(x) for a_n.
im asking if this is true
[tex]
\frac{1}{L} \int_{-L}^{L}f(x) cos(k_n x) dx = \frac{1}{L} \int_{-L}^{0}(x + L)cos(k_n x) dx + \frac{1}{L} \int_{0}^{L}(L - x)cos(k_n x) dx = \frac{2}{L} \int_{0}^{L}(x + L)cos(k_n x) dx
[/tex]
 
  • #24
No, that's not true. It would be true if the limits on your last integral were from -L to 0.

The point here is the both the integrals in the sum have the same value, so you can use twice the value of either one. Say you want to find the sum A + B, and you know that A = B = I. Then A + B = 2A = 2B.
 

Suggested for: Modelling a function for a fourier series

Replies
1
Views
579
Replies
26
Views
913
Replies
5
Views
1K
Replies
20
Views
803
Replies
1
Views
622
Replies
2
Views
599
Replies
9
Views
594
Back
Top