# Find the coefficients in the Fourier series

1. Jul 11, 2008

### math_04

1. The problem statement, all variables and given/known data

The odd periodic function f(x) is defined by

f(x) = -4-x for -4 <= x <= 0 and 4-x for 0 <= x <= 4

f(x + 8) = f(x)

Sketch f(x) for -12 <= x <= 8

Find the coefficients in the Fourier series for the function defined by equation (1) and write out the series, explicitly giving the first three non zero terms in the series

2. Relevant equations

bn = 1/L integral of f(x)sin (npix / L) dx with limits from L to -L

3. The attempt at a solution

So do I do like this

bn = 1/4* integral of (-4-x) sin (npix/4) with limits from 4 to -4 plus 1/4*integral of 4-xsin(npix/4) with limits from 4 to -4?

Then i use integration by parts to solve the integrals?

Or is there an easier way like for an even Fourier series if you have L as 2 and -2, u can have the limits of the integral as 2 and 0?

2. Jul 11, 2008

### HallsofIvy

Staff Emeritus
Knowing that the function is odd means that the coefficient of cos(nx) (an even function) in the series is 0. And, of course, if f(-x)= -f(x), then because sin(-x)= -sin(x),
$$\int_{-4}^4 f(x)sin(nx)dx= \int_{-4}^0 f(x)sin(nx)dx+ \int_0^4 f(x)sin(nx) dx$$
and, making the substitution u= -x in the first integral, since dx= -du,
$$-\int_{4}^{0}(-f(u))(-sin(nu)du+ \int_0^4 f(x)sin(nx)dx= \int_0^4 f(u)sin(u)du+ \int_0^4 f(x)sin(nx)dx= 2\int_0^4 f(x)sin(nx)dx$$

Or, more simply, now that I look at it, since sin(nx) and f(x) are both odd, their product is an even function:
$$\int_{-4}^4 f(x)sin(nx)dx= 2\int_0^4 f(x)sin(nx)dx[/itex] Last edited: Jul 11, 2008 3. Jul 11, 2008 ### math_04 For the second part, it got kinda confusing because [tex]-\int_{4}^{0}(-f(u))(-sin(nu)du+ \int_0^4 f(x)sin(nx)dx= \int_0^4 f(u)sin(u)du+ \int_0^4 f(x)sin(nx)dx= 2\int_0^4 f(x)sin(nx)dx[/quote] this whole sentence is kinda confusing haha, could u write with the mathematical symbols instead of the computer lingo. sorry about that. cheers. thanks for your reply. 4. Jul 11, 2008 ### Defennder Which part is confusing? You didn't quote properly. 5. Jul 11, 2008 ### kreil he uses integral properties to obtain this, namely [tex] - \int_b^a f(x)dx = + \int_a^bf(x)dx$$

6. Jul 11, 2008

### HallsofIvy

Staff Emeritus
I didn't have the LaTex delineated properly. I have edited the post.

7. Jul 11, 2008

### math_04

Isnt f(x) even

f(-x) = -(-x) - 4 = x - 4 which is even right?

and i still dont understand, you only got one integral so what do we use for f(x) -x-4? or 4-x?

8. Jul 12, 2008

### HallsofIvy

Staff Emeritus
f(x) is defined by "f(x) = -4-x for -4 <= x <= 0 and 4-x for 0 <= x <= 4". Which of those formulas you use depends on the interval of integration of course. If you are integrating from 0 to 4, then you use 4- x.