Fourier transform - odd funktion

I'm transforming f(x) = 1-x trying to do so in an even and odd fashion... I think I get it right for the even, but I get stuck while tinkering with the odd one.

The period is 2, odd distribution.

; &

= [integrate by parts] =

Here I get stuck because .

If anyone could point out what I'm overseeing..?

Re: Fourier transform - odd funktion

Quote:

Originally Posted by

**liquidFuzz** I'm transforming f(x) = 1-x trying to do so in an even and odd fashion... I think I get it right for the even, but I get stuck while tinkering with the odd one.

The period is 2, odd distribution.

;

&

= [integrate by parts] =

Here I get stuck because

.

If anyone could point out what I'm overseeing..?

Do you integration by parts again more carefully.

CB

Re: Fourier transform - odd funktion

No, I can't nail it...

What if I change the interval over wish integrate to [-1,0] + [0,1]. Maybe that would make it easier, but will my series convert to the odd distribution of 1-t?

Edit: Oh crap, I just realised something. I think my series could be right. My conclusion on the contrary... I was so preoccupied with the fact that that I sorta forgot the variable t.

Does this compute..?

Re: Fourier transform - odd funktion

Quote:

Originally Posted by

**liquidFuzz** No, I can't nail it...

What if I change the interval over wish integrate to [-1,0] + [0,1]. Maybe that would make it easier, but will my series convert to the odd distribution of 1-t?

Edit: Oh crap, I just realised something. I think my series could be right. My conclusion on the contrary... I was so preoccupied with the fact that

that I sorta forgot the variable t.

Does this compute..?

If I recall correctly yes

CB

1 Attachment(s)

Re: Fourier transform - odd funktion

Quote:

Originally Posted by

**CaptainBlack** If I recall correctly yes

CB

I plotted the series in MatLab and got a result that points in an other direction. :-(

Here's the plot I got and the MatLab code I wrote.

MatLab

Code:

`N = 20;`

x = (-50:50)/20; %interval : [-2.5,2.5]

f = ones(1,101);

%Odd fourier, no a_0 and a_i included.

for i = 1:1:N %from 1 to N

f = f + (2 * sin(pi*i*x)) / (i * pi); %sum all terms over N iterations.

end

plot(x,f)

The function I was aiming for is 1-t and it should hold the points [0,1] and [2,-1] and then jump to next 'slope'. Eh, right?

I guess my question is, is it the series or is the MatLab tinkering that's wrong..?

Re: Fourier transform - odd funktion

Quote:

Originally Posted by

**liquidFuzz** I plotted the series in MatLab and got a result that points in an other direction. :-(

Here's the plot I got and the MatLab code I wrote.

MatLab

Code:

`N = 20;`

x = (-50:50)/20; %interval : [-2.5,2.5]

f = ones(1,101);

%Odd fourier, no a_0 and a_i included.

for i = 1:1:N %from 1 to N

f = f + (2 * sin(pi*i*x)) / (i * pi); %sum all terms over N iterations.

end

plot(x,f)

The function I was aiming for is 1-t and it should hold the points [0,1] and [2,-1] and then jump to next 'slope'. Eh, right?

I guess my question is, is it the series or is the MatLab tinkering that's wrong..?

Why did you initialise f to one?

Try:

f = zeros(1,101)

CB

Re: Fourier transform - odd funktion

Eh, good question..?

Thanks for your help and patience dude!