Discussion:
Fourier Series
(too old to reply)
Tom Killwhang
2020-08-12 07:56:21 UTC
Permalink
We all know that if you have an even function you have only cosine terms and an odd function only sine. When the function is neither even nor odd you get both, or do you?

This suddenly struck me. Suppose you have
f(x)=sin(x) - this is odd since f(-x) = -f(x)

f(x)=sin(x)+1 is neither even nor odd. Now f(-x) ne -f(x)
But this is just a dc level shift.

Could you not therefore apply this to function of this sort. Ones that kind of look odd but have different amplitudes in the negative half cycle. Just adjust the dc level (add or subtract) to zero and then it becomes odd. Then no cosine terms to calculate. Once the Fourier series is calculated you just add the dc part back in again. Therefore functions of this sort should also have no cosine terms either just like odd functions. Not seen this in books for some reason.
b***@columbus.rr.com
2020-08-12 12:50:18 UTC
Permalink
Post by Tom Killwhang
We all know that if you have an even function you have only cosine terms and an odd function only sine. When the function is neither even nor odd you get both, or do you?
This suddenly struck me. Suppose you have
f(x)=sin(x) - this is odd since f(-x) = -f(x)
f(x)=sin(x)+1 is neither even nor odd. Now f(-x) ne -f(x)
But this is just a dc level shift.
Could you not therefore apply this to function of this sort. Ones that kind of look odd but have different amplitudes in the negative half cycle. Just adjust the dc level (add or subtract) to zero and then it becomes odd. Then no cosine terms to calculate. Once the Fourier series is calculated you just add the dc part back in again. Therefore functions of this sort should also have no cosine terms either just like odd functions. Not seen this in books for some reason.
I think your reasoning is valid. However.....In real life (making measurements and applying fourier techniques) there are (essentially) no strictly even or odd functions. At each harmonic you will get distinct sine values and cosine values and they will generally not be zero.

I think that the greatest disservice that has ever been done to students is pointing out the even/odd function "tricks" before making them really grind through examples that contain a rich arrangement of sines and cosines at every harmonic. Especially today where grinding them out is easy on a computer.
ga...@u.washington.edu
2020-08-12 17:20:17 UTC
Permalink
Post by Tom Killwhang
We all know that if you have an even function you have only cosine terms
and an odd function only sine.
When the function is neither even nor odd you get both, or do you?
This suddenly struck me. Suppose you have
f(x)=sin(x) - this is odd since f(-x) = -f(x)
f(x)=sin(x)+1 is neither even nor odd. Now f(-x) ne -f(x)
But this is just a dc level shift.
The DC component is the cos(0) term, and the constant
function is even. That is the way the transform works.

But yes, in actual engineering the DC term is often different
from the rest. Also, in many practical problems, you can have
a much larger DC term than usual for the rest of the terms.

This can be a problem doing transforms in fixed point arithmetic
with limited precision. Most often, other than the DC term won't overflow,
or won't need much more bits, but the DC term can easily be large.
Christian Gollwitzer
2020-08-12 19:31:49 UTC
Permalink
Post by Tom Killwhang
We all know that if you have an even function you have only cosine terms and an odd function only sine. When the function is neither even nor odd you get both, or do you?
This suddenly struck me. Suppose you have
f(x)=sin(x) - this is odd since f(-x) = -f(x)
f(x)=sin(x)+1 is neither even nor odd. Now f(-x) ne -f(x)
But this is just a dc level shift.
Could you not therefore apply this to function of this sort. Ones that kind of look odd but have different amplitudes in the negative half cycle. Just adjust the dc level (add or subtract) to zero and then it becomes odd.
You can decompose any function into an odd and even part, simply by
computing

odd(f(x)) = (f(x) - f(-x)) / 2
even(f(x)) = (f(x) + f(-x)) / 2


-> f(x) = odd(f(x)) + even(f(x))

Thus, your function can be decomposed into sin(x) and +1

Christian
ga...@u.washington.edu
2020-08-18 01:39:21 UTC
Permalink
Post by Tom Killwhang
We all know that if you have an even function you have only cosine terms and an
odd function only sine.
When the function is neither even nor odd you get both, or do you?
This suddenly struck me. Suppose you have
f(x)=sin(x) - this is odd since f(-x) = -f(x)
f(x)=sin(x)+1 is neither even nor odd. Now f(-x) ne -f(x)
But this is just a dc level shift.
With much of electronics, it is usual to remove the DC component before processing.
Many amplifiers are AC coupled for that reason. If for some reason it isn't, you
could compute the mean of a digital signal and then subtract it.

As far as odd or even, though, after you subtract the mean, then there is phase.

There are some cases where you might have a sampling clock appropriately
phased, possibly with a PLL, to do the computation with only odd terms.

There are, for example, systems that do analysis of power line signals,
such as compute power factor, harmonic currents, and such. In that case,
one can use a PLL, lock the sampling frequency to some multiple of the
power line, and yes get only odd terms.

Since it doesn't get mentioned so often, the Fourier (exponential) transform
(and series) are used for periodic signals, (periodic boundary conditions)
or in the limit of large period, non-periodic signals.

The Fourier sine transform (and series) are for signals with fixed
(constant, usually zero) boundary conditions. The cosine transform
(and series) for zero derivative boundary conditions.

With a fixed number of basis functions, the sine and cosine transform
put them all into sine or cosine, instead of half of each.

Loading...