The period, angular frequency of a piecewise function

Click For Summary

Homework Help Overview

The problem involves analyzing a piecewise function defined over intervals, determining its period and angular frequency, and calculating specific definite integrals related to Fourier coefficients. The subject area encompasses periodic functions and Fourier analysis.

Discussion Character

  • Exploratory, Conceptual clarification, Mathematical reasoning, Problem interpretation

Approaches and Questions Raised

  • Participants discuss the periodicity of the function and its behavior across different intervals defined by integer values of k. There is confusion regarding the implications of the notation and the evaluation of integrals based on the defined function.

Discussion Status

The discussion is ongoing, with participants exploring various interpretations of the function's properties and the implications of the integral calculations. Some have provided insights into the function's graphical representation and periodic nature, while others question the relevance of certain parameters in the integrals.

Contextual Notes

Participants note that the problem is part of an introductory course on Fourier methods, which may influence their understanding and approach to the homework. There is also mention of the potential complexity introduced by the variable n in the integral expressions.

TheSodesa
Messages
224
Reaction score
7

Homework Statement


The function ##f## is defined as follows:
\begin{equation*}
f(t) =
\begin{cases}
1, \text{ when } 2k < t < (2k+1),\\
0, \text{ when } t = k,\\
2, \text{ when } (2k-1) < t < 2k, & k \in \mathbb{Z}\\
\end{cases}
\end{equation*}

What is the period ##T## of the function ##f##? How about angular frequency? Calculate the following definite integrals:
<br /> a_n = \frac{2}{T}\int_{0}^{T} f(t) \cos (n \omega t) dt <br /> \text{ and }<br /> b_n = \frac{2}{T}\int_{0}^{T} f(t) \sin (n \omega t) dt,<br />
where ##n = 0,1,2, \ldots##

Homework Equations


Angular freguency:
\begin{equation}
\omega = 2 \pi f = \frac{2 \pi}{T}
\end{equation}

The Attempt at a Solution


I should preface this by saying, that something in me thinks this should be a simple problem, and that I'm just confused by the notation used.

Anyways, I started by cataloging how the function should behave with different values of ##k \in \mathbb{Z}##:
\begin{array}{ | l | c | c | c | c | c | c |}
\hline
k & 2k-1 & 2k & 2k+1 & f(t), (2k-1) < t < 2k & f(t), t = k & f(t), 2k < t < (2k+1)\\
\hline
0 & -1 & 0 & 1 & 2 & 0 & 1\\
1 & 1 & 2 & 3 & 2 & 0 & 1\\
2 & 3 & 4 & 5 & 2 & 0 & 1\\
3 & 5 & 6 & 7 & 2 & 0 & 1\\
4 & 7 & 8 & 9 & 2 & 0 & 1\\
\hline
\end{array}
It looks like ##f## will repeat in intervals of ##2##, since whenever ##k## is increased by ##1##, the domain of ##f## is shifted by ##2## to the right, and within that new domain ##f## is defined identically. Now here's the first thing that confuses me: I know I can test for periodicity by plugging ##t+T## in place of ##t## in ##f(t)##. However, here it wouldn't create a nice expression that simplified into the original through trig symmetry or some other trick. How can I show in writing, that what I stated above is true, or is the above intuitive realization enough for a proof?

Moving on, assuming the period was 2 implies that ##\omega = \frac{2 \pi}{2} = \pi##. Which leads us into the integration part of the problem, where another confusing thing occurs. Evaluating the integral seems simple enough: just split it into two parts between ##0## and ##T = 2## based on how ##f## is defined. However, in the assignment it is stated that ##n \in {0} \cup \mathbb{N}##. Does this mean I need to evaluate the integral infinitely many times, since the expression contains an ##n## that gains all of those values? Of course not, but I have no idea what this means in practise.

Help a derp, please?
 
Physics news on Phys.org
The first task is to draw the graph of ##f##. Can you describe in 1-2 simple sentences what ##f## looks like?

PS I don't like the definition as it's too loose. Personally, I would define it differently.
 
PeroK said:
The first task is to draw the graph of ##f##. Can you describe in 1-2 simple sentences what ##f## looks like?
I did this in GeoGebra, and it looks like a step function that has a period of 2, except that the function is zero when ##t \in \mathbb{Z}## and varies between 2 and 1 between the integers.

Maybe I should do a Matlab implementation of the picture because of GG limitations...
 
TheSodesa said:
I did this in GeoGebra, and it looks like a step function that has a period of 2, except that the function is zero when ##t \in \mathbb{Z}## and varies between 2 and 1 between the integers.

Could I sketch the function based on your description? If I hadn't seen the formula? It's a good idea to be precise in mathematics.

By the way, setting ##f(t) =0## on a finite (or countable) set of points will make no difference to any integrals.
 
PeroK said:
Could I sketch the function based on your description? If I hadn't seen the formula? It's a good idea to be precise in mathematics.

By the way, setting ##f(t) =0## on a finite (or countable) set of points will make no difference to any integrals.

Alright, let's try again. Let ##k \in \mathbb{Z}##. Between -1 and 0, ##f(t) = 2## and between 0 and 1 ##f(t) = 1##. The function repeats this pattern ad infinitum with what seems to be a period of 2, shifting between the values 2 and 1 while being zero when ##t = k##.

Is this any better?
 
TheSodesa said:
Alright, let's try again. Let ##k \in \mathbb{Z}##. Between -1 and 0, ##f(t) = 2## and between 0 and 1 ##f(t) = 1##. The function repeats this pattern ad infinitum with what seems to be a period of 2, shifting between the values 2 and 1 while being zero when ##t = k##.

Is this any better?

Okay, so you've got ##f(t)## figured out. What about ##\cos(n\omega t)##?
 
PeroK said:
Okay, so you've got ##f(t)## figured out. What about ##\cos(n\omega t)##?
Since we have now established, that our period seems to be 2, our angular frequency ##\omega = \pi \Rightarrow \cos (n \omega t) = \cos (n \pi t)##. Here ##n \pi## increases the frequency by multiples of ##\pi##, while dividing the period by the same factor. Cosine of ##t## has a period of ##2 \pi##, so ##\cos (n \pi t) = \cos (n \pi t + \frac{2\pi}{n\pi}) = \cos (n \pi t + \frac{2}{n})##.

In other words, unless ##n = 0##, in which case ##cos(n\pi t) = 1##, ##\cos (n \pi t)## is just the usual cosine function with it's frequency increased, meaning it is squished in the ##t##-direction.
 
I'm not sure I see the point of this question. If ##T=2## you just have to integrate over ##(0,1)## and ##(1,2)## on which ##f(t)## is constant.
 
PeroK said:
I'm not sure I see the point of this question. If ##T=2## you just have to integrate over ##(0,1)## and ##(1,2)## on which ##f(t)## is constant.

I should have prefaced this by saying, that this is the first week of a course of Fourier methods, and the teacher gave us review excercises for homework, before we get into the proper subject matter. I wouldn't say this question is pointless since it is giving me a headache.

Are you saying, that the ##n## is there just to throw me off? Surely the integral evaluates differently depending on the value of ##n## in that interval?
 
  • #10
TheSodesa said:
I should have prefaced this by saying, that this is the first week of a course of Fourier methods, and the teacher gave us review excercises for homework, before we get into the proper subject matter. I wouldn't say this question is pointless since it is giving me a headache.

Are you saying, that the ##n## is there just to throw me off? Surely the integral evaluates differently depending on the value of ##n## in that interval?

Yes, you can go ahead and evaluate them. See what you get.
 
  • #11
PeroK said:
Yes, you can go ahead and evaluate them. See what you get.
Alright, it took me a moment, but the results I got are as follows:

a_n = \frac{2 \sin (2 \pi n) - \sin (n \pi)}{n \pi}, n \neq 0
and
b_n = \frac{1 + \cos(n \pi) - 2 \cos (2 n \pi)}{n \pi}, n \neq 0.
So even though it was originally stated, that ##n \in {0,1,2,...}##, ##n## can't be zero. Otherwise this was pretty straightforward.

EDIT: A mistake in ##b_n##: Forgot to include the factor 2 in front of ##\cos (2 \pi n)##.
 
Last edited:
  • #12
TheSodesa said:
Alright, it took me a moment, but the results I got are as follows:

a_n = \frac{2 \sin (2 \pi n) - \sin (n \pi)}{n \pi}, n \neq 0
and
b_n = \frac{1 + \cos(n \pi) - \cos (2 n \pi)}{n \pi}, n \neq 0,.
So even though it was originally stated, that ##n \in {0,1,2,...}##, i can't be zero. Otherwise this was pretty straightforward.

You can't stop there! You'll have to simplify those expressions.
 
  • #13
PeroK said:
You can't stop there! You'll have to simplify those expressions.

Using trig identities doesn't seem to allow us to get rid of that annoying ##n \pi## in the denominator, which is why I assume we should be trying to simplify these even further. I'm a bit lost here.
 
  • #14
TheSodesa said:
Using trig identities doesn't seem to allow us to get rid of that annoying ##n \pi## in the denominator, which is why I assume we should be trying to simplify these even further. I'm a bit lost here.

Let me help you a little bit: ##\sin(n\pi) = 0##.
 
  • #15
PeroK said:
Let me help you a little bit: ##\sin(n\pi) = 0##.

Of course. o:)
So ##a_n = 0##.

As for ##b_n##, \cos(2 \pi n) = 1 \Rightarrow \frac{1 + \cos(n \pi) - 2\cos(2 \pi n)}{n \pi} = \frac{1+\cos(n \pi) - 2}{n \pi} = \frac{\cos(n \pi) - 1}{n \pi}
 
  • #16
TheSodesa said:
Of course. o:)
So ##a_n = 0##.

As for ##b_n##, \cos(2 \pi n) = 1 \Rightarrow \frac{1 + \cos(n \pi) - 2\cos(2 \pi n)}{n \pi} = \frac{1+\cos(n \pi) - 2}{n \pi} = \frac{\cos(n \pi) - 1}{n \pi}

Just a bit more to do ...

PS I take back what I said about this problem: it's a good work-out for the Fourier Analysis to come!
 
  • #17
PeroK said:
Just a bit more to do ...

PS I take back what I said about this problem: it's a good work-out for the Fourier Analysis to come!

As far as I can see, the only thing we can do at this point is to say, that if ##n## is even, ##b_n = 0## , and if ##n## is odd, ##b_n = \frac{-2}{n\pi}, n \neq 0##.
 
  • #18
TheSodesa said:
As far as I can see, the only thing we can do at this point si to say, that if ##n## is even, ##b_n = 0## , and if ##n## is odd, ##b_n = \frac{-2}{n\pi}, n \neq 0##.

Yes. This sort of thing with ##1 \pm \cos(n\pi)## crops up frequently, so it's worth remembering this.
 
  • #19
PeroK said:
Yes. This sort of thing with ##1 \pm \cos(n\pi)## crops up frequently, so it's worth remembering this.
Alright, thank you very much.

One last thing that is still bothring me is the fact that there were ##n##'s in the denominators of the expressions that reduced to zero as well. Do we not need to worry about those, or should I have included ##n \neq 0## with those as well?
 
  • #20
TheSodesa said:
Alright, thank you very much.

One last thing that is still bothring me is the fact that there were ##n##'s in the denominators of the expressions that reduced to zero as well. Do we not need to worry about those, or should I have included ##n \neq 0## with those as well?

Technically, you still have ##n=0## to do. These are special cases, as ##\sin## and ##\cos## are constant. One thing to remember is that you cannot differentiate or integrate these and then plug in ##n=0## later. You must treat them as constant functions from the outset. It's the same with trig identities. You can easily go wrong if you don't exclude ##n=0## before you use an identity.
 
  • #21
PeroK said:
Technically, you still have ##n=0## to do. These are special cases, as ##\sin## and ##\cos## are constant. One thing to remember is that you cannot differentiate or integrate these and then plug in ##n=0## later. You must treat them as constant functions from the outset. It's the same with trig identities. You can easily go wrong if you don't exclude ##n=0## before you use an identity.

Ok, but I think I have spent long enough on this problem. I have other work to do as well. I'll ask about the ##n = 0## case when I turn these in.
 

Similar threads

  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
6
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
3
Views
2K
Replies
8
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K