# Simple Fourier Series Question

## Homework Statement

See figure attached for problem statement as well as my attempt.

## The Attempt at a Solution

I'm stuck as to how to rewrite this sin term.

I know that at n = 1 it will be positive, n = 3 it will be negative, n = 5 it will be positive and so on but how can I rewrite this?

#### Attachments

• FourierQ.jpg
43.2 KB · Views: 349

tiny-tim
Homework Helper
hi jegues! how can you rewrite sin(nπ/2) ?

well, you're only interested in odd numbers, so call it sin((2n+1)π/2), = … ? hi jegues! how can you rewrite sin(nπ/2) ?

well, you're only interested in odd numbers, so call it sin((2n+1)π/2), = … ? sin((2n+1)π/2), = (-1)^{n+1}, correct?

EDIT: But wait, the n on the in the denominator on the outside must change as well, correct?

Actually, shouldn't I rewrite it as,

$$sin(\frac{(2n-1)\pi}{2}), \text{ because,} \quad n>0.$$

then,

$$sin(\frac{(2n-1)\pi}{2}) = (-1)^{n+1}$$

So the whole expression becomes,

$$\frac{8(-1)^{n+1}}{(2n-1)\pi}$$

Last edited:
tiny-tim
Homework Helper
sin((2n+1)π/2), = (-1)^{n+1}, correct?

yup! although easier to use would be sin((2n-1)π/2) = (-1)n EDIT: But wait, the n on the in the denominator on the outside must change as well, correct?

yes (but i think you're -1 out) yup! although easier to use would be sin((2n-1)π/2) = (-1)n yes (but i think you're -1 out) $$sin(\frac{(2n-1)\pi}{2})$$

$$\text{When n=1,}$$

$$sin(\frac{(2(1)-1)\pi}{2}) = sin(\frac{\pi}{2}) = 1.$$

So when n=1, it better be positive.

So,

$$sin(\frac{(2n-1)\pi}{2}) = (-1)^{n+1}$$

I'm not seeing what you mean when you say I'm out by -1?

Nonetheless I have another question with regards to the same question.

It asks you to draw the functions before and after applying the fourier series. I have some confusion about the function sketch before applying the fourier series.

See figure attached

The parts I highlighted in red weren't included on my attempt, but are shown here in the solution. How so? The function isn't defined for 4 < x < 8, it only repeats with a peroid of eight, so why are those red pieces there? I would have simply left it at 4.

Can someone clarfiy?

#### Attachments

tiny-tim
Homework Helper
ah, the original formula was wrong, i didn't notice that …
sin((2n+1)π/2), = (-1)^{n+1}, correct?

ah, the original formula was wrong, i didn't notice that …

I'm still confused... Do I have things correct?

tiny-tim
Homework Helper
i'm confused too write it all out again (with the correct formula in the middle), then we can both see i'm confused too write it all out again (with the correct formula in the middle), then we can both see I checked my answer with my prof. today and he assured me it is correct, but I still don't understand why the red portion I highlighted is included in the graph of the function before applying the Fourier series, can someone clarify? I didn't think the function was defined in that range?

LCKurtz
Homework Helper
Gold Member
I checked my answer with my prof. today and he assured me it is correct, but I still don't understand why the red portion I highlighted is included in the graph of the function before applying the Fourier series, can someone clarify? I didn't think the function was defined in that range?

It is defined from -4 to 4. You have formulas given for (0,4) and you are given that f(-x)=f(x). That defines of on (-4,0).

It is defined from -4 to 4. You have formulas given for (0,4) and you are given that f(-x)=f(x). That defines of on (-4,0).

I'm not concerned about that part, I'm considered about the part I highlighted in red, how it is defined on 4 to 6 etc...

Can you clarify?

Last edited:
tiny-tim
Homework Helper
I'm not considered about that part, I'm considered about the part I highlighted in red, how it is defined on 4 to 6 etc...

Can you clarify?

LCKurtz is right …

if you're finding the Fourier series in the usual way, you need to use a whole period starting at 0

unfortunately, the question only defines it for a half-period starting at 0, it then says f(x) = f(-x), so that gives you a full period starting at -4

so you need to copy the [-4,0] part onto [4,8] to give you a full period starting at 0. LCKurtz is right …

if you're finding the Fourier series in the usual way, you need to use a whole period starting at 0

unfortunately, the question only defines it for a half-period starting at 0, it then says f(x) = f(-x), so that gives you a full period starting at -4

so you need to copy the [-4,0] part onto [4,8] to give you a full period starting at 0. Oh so it is required to have atleast a full peroid on each side of the y axis or what? I don't understand why it MUST be a full peroid on either side of the zero.

Why can't I have a full peroid from -4 to 4?

Thanks again!

LCKurtz