# Trigonometric Fourier series

Show 40 post(s) from this thread on one page
Page 1 of 2 12 Last
• Sep 17th 2010, 08:46 AM
4Math
Trigonometric Fourier series
Hi,

I have the following $\displaystyle 2\pi$-periodic function:

$\displaystyle \displaystyle f(t)=\left\{\begin{array}{lll}{\pi} ,\,\,0 < t < 1\\{}\\0 ,\,\, 1 < t< 2\pi-1\\{}\\{\pi} ,\,\, 2\pi-1 < t< 2\pi\end{array}\right$

$\displaystyle \displaystyle{c_{0}={\frac{1}{2\pi}\int_{-\pi}^{\pi}f(t)dt$ (1)$\displaystyle \displaystyle\implies$

$\displaystyle \displaystyle\implies\displaystyle{c_{0}={\frac{1} {2\pi}(\int_{0}^{1}{\pi}dt+{\int_{2\pi-1}^{2\pi}{\pi}dt)$

Is this integral to compute $\displaystyle c_{0}$ correct using (1)? If not what are the limits? Any help or guidance would be appriciate it.
• Sep 17th 2010, 08:51 AM
Ackbeet
Hmm. I'd say your expression for $\displaystyle c_{0}$ should be

$\displaystyle \displaystyle{c_{0}=\frac{1}{2\pi}\int_{0}^{2\pi}f (t)\,dt.}$

• Sep 17th 2010, 09:11 AM
4Math
Quote:

Originally Posted by Ackbeet
Hmm. I'd say your expression for $\displaystyle c_{0}$ should be

$\displaystyle \displaystyle{c_{0}=\frac{1}{2\pi}\int_{0}^{2\pi}f (t)\,dt.}$

$\displaystyle \displaystyle\implies\displaystyle{c_{0}={\frac{1} {2\pi}(\int_{0}^{2\pi-1}{\pi}dt+{\int_{2\pi-1}^{2\pi}{\pi}dt)={\pi}$

Is it correct now? Isn't the first value of the function is $\displaystyle \pi$ between the limits 0 to 1 and the value is 0 between $\displaystyle 1 < t< 2\pi-1$

Kind regards
• Sep 17th 2010, 09:15 AM
Ackbeet
No, no. Re-read my earlier post more carefully:

Quote:

• Sep 17th 2010, 10:23 AM
4Math
Quote:

Originally Posted by Ackbeet
No, no. Re-read my earlier post more carefully:

Ok, sorry. My last post didn't seem correct at all.

$\displaystyle \displaystyle{c_{0}=\frac{1}{2\pi}\int_{0}^{2\pi}f (t)\,dt.}$

$\displaystyle \displaystyle\implies\displaystyle{c_{0}={\frac{1} {2\pi}(\int_{0}^{1}{\pi}dt+{\int_{2\pi-1}^{2\pi}{\pi}dt)=1$
• Sep 17th 2010, 10:25 AM
Ackbeet
Looks good to me.
• Sep 19th 2010, 09:22 AM
4Math
I have computed $\displaystyle a_{k}$ and was wondering if this is correct.

$\displaystyle \displaystyle a_{k} = \frac{2}{T} \int_{P}^{} \cos (k\Omega t) \ dt$

$\displaystyle \displaystyle\Omega=\frac{2\pi}{T}\implies T=2\pi\implies \Omega=1$

$\displaystyle \displaystyle a_{k} = \frac{2}{2\pi} ({\pi}(\int_{0}^{1} \cos (kt) \ dt+{\int_{2\pi-1}^{2\pi}\cos (kt) \ dt)=$...

The first integral...
$\displaystyle \displaystyle\int_{0}^{1} \cos (kt) \ dt=\frac{sin(k)}{k}$

The second integral...

$\displaystyle \displaystyle{\int_{2\pi-1}^{2\pi}\cos (kt) \ dt=\frac{1}{k}(sin({2\pi} k)-sin({2\pi}k-k))$

$\displaystyle \displaystyle sin({2\pi} k)=0$

$\displaystyle \displaystyle-sin({2\pi}k-k)=sin({2\pi} k) cos(k)-cos({2\pi} k) sin (k)$

$\displaystyle \displaystyle cos({2\pi} k)=1$

...therefore is the second integral equals...

$\displaystyle \displaystyle{\int_{2\pi-1}^{2\pi}\cos (kt) \ dt=\frac{sin(k)}{k}$

and I get...

$\displaystyle \displaystyle a_{k} = 2 \frac{sin(k)}{k}$

That concludes that the trigonometric Fourier series for the given function above is...
$\displaystyle \displaystyle1+2 \sum_{k=1}^{\infty} \frac{\sin k}{k}$
• Sep 20th 2010, 02:05 AM
Ackbeet
I agree with your computations of $\displaystyle a_{k}$. And since you're dealing with an even function, your $\displaystyle b_{n}=0$ for all $\displaystyle n$. However, when you construct your Fourier Series, the result should have $\displaystyle t$'s in it! The formula you want, in your case, is

$\displaystyle \displaystyle{f(t)=\frac{a_{0}}{2}+\sum_{k=1}^{\in fty}a_{k}\cos(kt)}.$
• Sep 20th 2010, 04:16 AM
4Math
Since the function is even shouldn't $\displaystyle c_{0}$ be as followed? In other words I should double the integral?

$\displaystyle \displaystyle{c_{0}=\frac{1}{2\pi}\int_{0}^{2\pi}f (t)\,dt$

$\displaystyle \displaystyle\implies\displaystyle{c_{0}={\frac{2} {2\pi}(\int_{0}^{1}{\pi}dt+{\int_{2\pi-1}^{2\pi}{\pi}dt)=2$
• Sep 20th 2010, 05:22 AM
Ackbeet
You're confusing yourself, I think. Constructing a trigonometric Fourier series is a two-step process (depending on how you count steps):

1. Compute the coefficients $\displaystyle a_{k}$ and $\displaystyle b_{k}$, including $\displaystyle a_{0}.$ That is, compute

$\displaystyle \displaystyle{a_{0}=\frac{1}{2\pi}\int_{0}^{2\pi}f (t)\,dt,$

$\displaystyle \displaystyle{a_{k}=\frac{1}{\pi}\int_{0}^{2\pi}f( t)\,\cos(kt)\,dt,$ and

$\displaystyle \displaystyle{b_{k}=\frac{1}{\pi}\int_{0}^{2\pi}f( t)\,\sin(kt)\,dt.$

2. Write out the representation of the function as

$\displaystyle \displaystyle{f(t)=a_{0}+\sum_{k=1}^{\infty}\left[a_{k}\cos(kt)+b_{k}\sin(kt)\right]}.$

Note: the wiki has a slightly different account. Consult it to see how the factors work.

I've seen you do some good work on computing the coefficients, but I have not seen you do step 2 correctly yet.
• Sep 20th 2010, 06:38 AM
4Math
Quote:

Originally Posted by Ackbeet
You're confusing yourself, I think. Constructing a trigonometric Fourier series is a two-step process (depending on how you count steps):

1. Compute the coefficients $\displaystyle a_{k}$ and $\displaystyle b_{k}$, including $\displaystyle a_{0}.$ That is, compute

$\displaystyle \displaystyle{a_{0}=\frac{1}{2\pi}\int_{0}^{2\pi}f (t)\,dt,$

$\displaystyle \displaystyle{a_{k}=\frac{1}{\pi}\int_{0}^{2\pi}f( t)\,\cos(kt)\,dt,$ and

$\displaystyle \displaystyle{b_{k}=\frac{1}{\pi}\int_{0}^{2\pi}f( t)\,\sin(kt)\,dt.$

Are the limits always $\displaystyle [0,2\pi]$ ? I mean in the formulas for $\displaystyle {a_{0},a_{k}$ and $\displaystyle b_{k}$ .

I have to be honest that I am confused. The reason for that is everywhere I look the formulas for $\displaystyle {a_{0}$,$\displaystyle a_{k}$and $\displaystyle b_{k}$ are different.

For instance these two expressions are not the same to me:

(1)$\displaystyle \displaystyle{f(t)=\frac{a_{0}}{2}+\sum_{k=1}^{\in fty}a_{k}\cos(kt)+b_{k}\sin(kt)}$ $\displaystyle \displaystyle\neq$

(2)$\displaystyle \displaystyle\neq$ $\displaystyle \displaystyle{f(t)=a_{0}+\sum_{k=1}^{\infty}\left[a_{k}\cos(kt)+b_{k}\sin(kt)\right]}$
I noted also the expressions from wiki and when I apply these I should get the same result but I don't. For example:

$\displaystyle \displaystyle{c_{0}=\frac{1}{\pi}\int_{0}^{2\pi}f( t)\,dt={\frac{1}{\pi}(\int_{0}^{1}{\pi}dt+{\int_{2 \pi-1}^{2\pi}{\pi}dt)=2$ Should I apply this result to (1)?

But when I computed the $\displaystyle {c_{0}$ above:

$\displaystyle \displaystyle{c_{0}=\frac{1}{2\pi}\int_{0}^{2\pi}f (t)\,dt}={\frac{1}{2\pi}(\int_{0}^{1}{\pi}dt+{\int _{2\pi-1}^{2\pi}{\pi}dt)=1$ should I apply (2) for this result?

Thank you
• Sep 20th 2010, 09:22 AM
Ackbeet
For a $\displaystyle 2\pi$-periodic integrable function $\displaystyle f(t)$, you have

$\displaystyle \displaystyle{f(t)=\frac{1}{2\pi}\int_{P}f(x)\,dx+ \frac{1}{\pi}\sum_{k=1}^{\infty}\left[\left(\int_{P}f(x)\,\cos(kx)\,dx\right)\cos(kt)+\l eft(\int_{P}f(x)\,\sin(kx)\,dx\right)\sin(kt)\righ t].}$

Here the notation

$\displaystyle \displaystyle{\int_{P}}$

just means integrate over one period. The endpoints of the interval $\displaystyle [a,b]$ over which you integrate are unimportant, except that you must have $\displaystyle b-a=2\pi.$ Also, you'll notice that I've used a dummy variable for the integrations so as not to collide with the $\displaystyle t$ of $\displaystyle f(t).$

The stuff inside the parentheses are "essentially" the Fourier coefficients. Different authors put the $\displaystyle 1/\pi$ in different places, depending on their preferences. So the key to remember is that those factors are there somehow, and that the cosine integrals get multiplied by the cosine terms, and the same for the sin integrals.

Does this clear things up a bit?
• Sep 20th 2010, 10:47 AM
4Math
Quote:

Originally Posted by Ackbeet

The endpoints of the interval $\displaystyle [a,b]$ over which you integrate are unimportant, except that you must have $\displaystyle b-a=2\pi.$

Is it the interval $\displaystyle [a,b]$ for the given function? In this case the function starts at 0 and finishes at $\displaystyle 2\pi$. Or does $\displaystyle b-a=2\pi$ apply for each integral?

Quote:

Does this clear things up a bit?
Yes, a bit Thank you.
• Sep 20th 2010, 10:51 AM
Ackbeet
In your case, simply choose a = 0, b = 2pi. You have a 2pi-periodic function. That means you can choose the 2pi-wide interval that you want to use. So pick the easiest one: [0,2pi]. All of the integrals in the big equation I wrote above must be 2pi-wide. That's the important thing: you capture one period in each interval. Nothing else matters. I would just pick the same interval for all three integrals: it's the easiest thing to do.
• Sep 20th 2010, 11:47 AM
4Math
So the trigonometric Fourier series for the given function is:

$\displaystyle \displaystyle{f(t)=a_{0}+\sum_{k=1}^{\infty}\left[a_{k}\cos(kt)+b_{k}\sin(kt)\right]}\implies$

$\displaystyle \displaystyle\implies{f(t)=1+2 \sum_{k=1}^{\infty}\left\frac{sin(k)}{k}\cos(kt)}$

Your explanation made it much more clear and I can see that the different ways the authors write $\displaystyle {a_{0}, a_{k}$ and $\displaystyle b_{k}$ all relate to each other, thanks to your two last posts. Thank you very much.
Show 40 post(s) from this thread on one page
Page 1 of 2 12 Last