Finding a fourier series for a cosine function

Click For Summary

Homework Help Overview

The discussion revolves around finding the Fourier series for a piecewise-defined function, specifically a cosine function defined on the interval from -π to π. The original poster presents their work on calculating the Fourier coefficients and expresses uncertainty about the correctness of their approach and the subsequent steps.

Discussion Character

  • Exploratory, Mathematical reasoning, Assumption checking

Approaches and Questions Raised

  • The original poster attempts to calculate the Fourier coefficients c₀ and cₙ using integrals, questioning the validity of their results. Some participants point out the need to consider the piecewise nature of the function when calculating these coefficients. Others suggest re-evaluating the integrals and the impact of the function's definition on the calculations.

Discussion Status

Participants are actively engaging with the original poster's calculations, providing feedback and suggesting revisions. There is ongoing exploration of the implications of the piecewise definition on the Fourier coefficients, with some participants offering clarifications and prompting further examination of the integrals involved.

Contextual Notes

There is a noted complexity due to the function being defined differently over the specified intervals, which affects the calculations of the Fourier coefficients. The original poster is also uncertain about how to proceed with the second part of the problem regarding the sum for specific values of x.

Susanne217
Messages
311
Reaction score
0
Hi I have been working on a example and have worked it out as this


Homework Statement



[tex]f(x) = \( \left( \left \begin{array}{ccc}0 & \mathrm{for} & -\pi < x \leq 0 \\ cos(x) & \mathrm{for} & 0 < x < \pi\end{array}[/tex]

where f is defined on the interval [tex]]-\pi,\pi[[/tex].

Find the corresponding Fourier series for f.

and writ the sum for [tex]x = p \cdot \pi[/tex] where [tex]p \in \mathbb{Z}[/tex]

Homework Equations



Complex Fourier series is defined as

[tex]\sum_{n=-\infty}^{\infty} c_{n} \cdot e^{i\cdot n \cdot t}[/tex]

where [tex]c_{n} = \frac{1}{2\pi} \int_{-\pi}^{\pi} f(t) \cdot e^{-i \cdot n \cdot t} dt[/tex]

The Attempt at a Solution



First I find [tex]c_{0} = \frac{1}{2\pi} \int_{-\pi}^{\pi} cos(t) dt = [\mathrm{sin(t)}]_{\mathrm{t} = -\pi}^{\pi} = 0[/tex]

Next I find

[tex]c_{n} = \frac{1}{2\pi} \int_{-\pi}^{\pi} (cos(t) \cdot cos(n \cdot t) - cos(t) \cdot sin(n \cdot t) \cdot i) dt[/tex]

[tex]c_{n} = [\frac{{sin(n-1)\cdot t}}{2 \cdot (n-1)} + \frac{{sin(n11)\cdot t}}{2 \cdot (n+1)}-(\frac{{cos(n-1)\cdot t}}{2 \cdot (n-1)} - \frac{{cos(n+1)\cdot t}}{2 \cdot (n+1)}) \cdot i]_{t=-\pi}^{\pi} = \frac{sin(n+1)\cdot \pi}{2\cdot(n+1)}[/tex]

which I then multiply by [tex]\frac{1}{2\pi}[/tex] from which I get

[tex]c_{n} = \frac{sin(n+1)}{2(n+1)}[/tex]

Where I end up with the Fourier series

[tex]\sum_{n=-\infty}^{\infty} \frac{sin(n+1)}{2(n+1)} \cdot e^{i \cdot n \cdot x}[/tex]

Have I got it right? I fairly new to Fourier series so I would be very happy if someone would reflect on my work and comment it please.

p.s. Not sure about question two. Do I insert the value of into the sum?

Thank you

Best Regards

Susanne
 
Physics news on Phys.org
remember that [itex]c_0=\frac{1}{2 \pi} \int_{-\pi}^{\pi} f(t) dt[/itex]

but [itex]f(t)[/itex] is not constnat on the interval [itex][-\pi,\pi][/itex]...

and so [itex]c_0=\frac{1}{2 \pi} \int_{-\pi}^{\pi} f(t) dt=\frac{1}{2 \pi} \int_{-\pi}^0 0 dt + \frac{1}{2 \pi} \int_0^{\pi} \cos{t} dt=\frac{1}{2 \pi} \int_0^{\pi} \cos{t} dt=\frac{1}{2 \pi} \sin{t} |_{0}^{\pi}=0[/itex] which is what you got.

but you'll have to do the same when calculating [itex]c_n[/itex] which will probably change things.
 
latentcorpse said:
remember that [itex]c_0=\frac{1}{2 \pi} \int_{-\pi}^{\pi} f(t) dt[/itex]

but [itex]f(t)[/itex] is not constnat on the interval [itex][-\pi,\pi][/itex]...

and so [itex]c_0=\frac{1}{2 \pi} \int_{-\pi}^{\pi} f(t) dt=\frac{1}{2 \pi} \int_{-\pi}^0 0 dt + \frac{1}{2 \pi} \int_0^{\pi} \cos{t} dt=\frac{1}{2 \pi} \int_0^{\pi} \cos{t} dt=\frac{1}{2 \pi} \sin{t} |_{0}^{\pi}=0[/itex] which is what you got.

but you'll have to do the same when calculating [itex]c_n[/itex] which will probably change things.

Hi

following your line of thought I then get

[tex]c_{n} = \frac{1}{2\pi} \int_{\pi}^{pi} cos(t) \cdot cos(n \cdot t) - (cos(t) \cdot sin(n \cdot t) \cdot i) dt = \frac{1}{2\pi} \int_{\pi}^{0} cos(t) \cdot cos(n \cdot t) - (cos(t) \cdot sin(n \cdot t) \cdot i) dt + \frac{1}{2\pi} \int_{0}^{pi} cos(t) \cdot cos(n \cdot t) - (cos(t) \cdot sin(n \cdot t) \cdot i) dt[/tex]

where

[tex]c_{n} = (\frac{-1}{2(n+1)\cdot \pi}-\frac{1}{2(n-1)\cdot \pi}) \cdot sin(n \cdot \pi)[/tex]

does that look better?

Best Regards
Susanne
 
[itex]c_n=\frac{1}{2 \pi} \int_{-\pi}^{\pi} f(t) e^{-int} dt=\frac{1}{2 \pi} \int_{-\pi}^{0} 0 dt + \frac{1}{2 \pi} \int_{0}^\pi} \cos{t} e^{-int} dt[/itex]

do you understand why that is?

so [itex]c_n=\frac{1}{2 \pi} \int_{0}^\pi} \cos{t} e^{-int} dt=\frac{1}{2 \pi} \int_{0}^\pi} \cos{t} \( \cos{nt}-i \sin{nt} \)[/itex]
as the first term disappears entirely
 
latentcorpse said:
[itex]c_n=\frac{1}{2 \pi} \int_{-\pi}^{\pi} f(t) e^{-int} dt=\frac{1}{2 \pi} \int_{-\pi}^{0} 0 dt + \frac{1}{2 \pi} \int_{0}^\pi} \cos{t} e^{-int} dt[/itex]

do you understand why that is?

so [itex]c_n=\frac{1}{2 \pi} \int_{0}^\pi} \cos{t} e^{-int} dt=\frac{1}{2 \pi} \int_{0}^\pi} \cos{t} \( \cos{nt}-i \sin{nt} \)[/itex]
as the first term disappears entirely

Hi again yes the reason why that term disappears it do to basic calculus.

I have tried the new version of [tex]c_{n}[/tex]

and I get

[tex]c_n = (\frac{-1}{4(n+1)\cdot \pi} - \frac{1}{4(n-1)\cdot \pi}) \cdot sin(n\pi) + \frac{cos(n\cdot \pi) -1}{2 \cdot n \cdot \pi} \cdot i[/tex]

Hopefully this looks better?

Best Regards
Susanne
 
Last edited:
hmmm.
first of all i meant to put a bracket in my last line:

[itex]c_n=\frac{1}{2 \pi} \int_0^{\pi} \cos{t} (\cos{nt}-i \sin{nt}) dt[/itex]

then it's just integrating by parts.

i'll assume you managed that ok.

you have [itex]c_n=(\frac{-1}{4(n+1) \cdot \pi}-\frac{1}{4(n-1) \cdot \pi}) \cdot \sin{(n \pi)} + \frac{\cos{(n \cdot \pi)}-1}{2 \cdot n \cdot \pi} \cdot i[/itex]

but [itex]\sin{n \pi}=0[/itex] and [itex]\cos{n \pi}=(-1)^n[/itex] which will simplify things i hope...
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
1
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K