# Fourier Series

[SOLVED] Fourier Series

1. Homework Statement
I know this may be a simple problem but im just beginning to understand this subject and this question has confused me.

Expand the following as a whole-range fourier series:

f(x) = 1 -pi < x < 0
f(x) = x 0 < x < pi

I can solve FS with one eqn, but what do you do with two, do you integrate twice or something?

2. Homework Equations

3. The Attempt at a Solution

Related Precalculus Mathematics Homework Help News on Phys.org
Hootenanny
Staff Emeritus
Gold Member
Welcome to PF Shomy,

The first thing to decide is whether the function is even, odd or neither.

Thanks for the welcome!
The first part is even and the second is odd

Hootenanny
Staff Emeritus
Gold Member
The first part is even and the second is odd
I suspect that the function is written thus,

$$f(x) = \left\{\begin{array}{cr}1 & -\pi<x<0 \\ x & 0<x<\pi\end{array}\right.$$

Which means it isn't actually two functions, but one piecewise function.

Yeah

Hootenanny
Staff Emeritus
Gold Member
So now, is the function odd or even?

The first part is even and the second is odd

Hootenanny
Staff Emeritus
Gold Member
The first part is even and the second is odd
So overall the function is...?

Odd?

Hootenanny
Staff Emeritus
Gold Member
Correct! What does this tell you about the Fourier series coefficients?

One of the coefficients (cos) is zero

Hootenanny
Staff Emeritus
Gold Member
One of the coefficients (cos) is zero
Correct, all the coefficients of cosine are zero. So what is the Euler formula for calculating the coefficients of sine?

Last edited:
Well i meant that one of the coefficients (ie the cos ) is zero because i am using sum notation.

an = 1/pi integral f(x)cosmx dx from pi to -pi. Do I integrate both functions and sum them or what?

Hootenanny
Staff Emeritus
Gold Member
Haven't we just agreed that the cosine coefficients are zero?

Yeah sorry

Hootenanny
Staff Emeritus
Gold Member
bm = 1/pi integral f(x)sinmx dx

So do you integrate the first part from pi to 0 and the second part from 0 to -pi

Hootenanny
Staff Emeritus
Gold Member
So do you integrate the first part from pi to 0 and the second part from 0 to -pi
I believe it's the other way around. Overall the coefficient is given by,

$$b_n=\frac{1}{\pi}\int_{0}^{2\pi}f(x)\sin(nx)dx$$

However, since f(x) is defined piecewise we must write,

$$b_n = \frac{1}{\pi}\left[\int_{-\pi}^{0}1\cdot\sin(nx)dx + \int_{0}^{\pi}x\cdot\sin(nx)dx\right]$$

Is that what you meant?

Yeah thats what was holding up. Thanks so much!

Hootenanny
Staff Emeritus
Gold Member
Redbelly98
Staff Emeritus
Homework Helper
> "Odd?"

Correct! What does this tell you about the Fourier series coefficients?
If I understand the function definition, I have a problem with this answer. For example consider x = 2:

f(2) = 2
f(-2) = 1

So for x = 2,
f(x) is not equal to f(-x)
and
f(x) is not equal to -f(-x)

What does this tell us about odd vs. even vs. neither?

Last edited:
Hootenanny
Staff Emeritus
Gold Member
Good catch Redbelly! Of course the function is neither odd nor even, I really don't know what I was thinking ! I'll PM Shomy now and hopefully they haven't handed the assignment in.

I've been making a few daft mistakes recently

Last edited:
Thank You!

Redbelly98
Staff Emeritus