# Finding an equation with given traits

Tags:
1. May 2, 2015

### csmitty12

< Mentor Note -- thread moved to HH from the technical math forums, so no HH Template is shown >

Consider a function
f(x) = 0, 0 ≤ x < 1
and
f(x) = 1, 1 ≤ x < 2

What is the function and how did you find it? Please help it will be used for a Fourier Series project. I can get the Series stuff fine but I just don't remember how to find a function.

Last edited by a moderator: May 2, 2015
2. May 2, 2015

3. May 2, 2015

4. May 2, 2015

### Staff: Mentor

Welcome to the PF.

What you have specified is not periodic. As robphy indicates, you can use the addition of two step functions to generate the function that you have specified in your first post. There must be more to the problem statement than you have shown us so far.

BTW, is this for a schoolwork assignment or for something else?

5. May 2, 2015

### csmitty12

It is for a Fourier Series project. I can get the FS through MATLAB, my only question is how to get the function to use in the FS?

File size:
4.2 KB
Views:
93
6. May 2, 2015

### Staff: Mentor

Oh, that's different (now seeing the actual problem statement). They say to construct a periodic square wave out of that basic function. Do you know how to calculate the Fourier Series of a square wave with a DC offset?

7. May 2, 2015

### csmitty12

So far we have only learned sinusoidal functions and complex representation. I'm not too sure how do do it with a square wave. Any idea where I can get started?

8. May 2, 2015

### Staff: Mentor

Just Google the last part of my last post:

9. May 2, 2015

### csmitty12

Okay so now I understand how to get the equation for the series. Now I'm confused and stuck on the part where it says to calculate the first 30 terms for two cycles, x = -2 to 2. Any hints/suggestions?

10. May 2, 2015

### Staff: Mentor

What happens when you google Gibb's Phenomenon?

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted