Reply by ga.....@u.washington.edu August 17, 20202020-08-17
On Wednesday, August 12, 2020 at 12:56:24 AM UTC-7, gyans...@gmail.com wrote:
> 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.
Reply by Christian Gollwitzer August 12, 20202020-08-12
Am 12.08.20 um 09:56 schrieb 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
Reply by ga.....@u.washington.edu August 12, 20202020-08-12
On Wednesday, August 12, 2020 at 12:56:24 AM UTC-7, gyans...@gmail.com wrote:
> 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.
Reply by August 12, 20202020-08-12
On Wednesday, August 12, 2020 at 3:56:24 AM UTC-4, Tom Killwhang wrote:
> 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 yo= u get both, or do you?
>=20 > This suddenly struck me. Suppose you have=20 > f(x)=3Dsin(x) - this is odd since f(-x) =3D -f(x) >=20 > f(x)=3Dsin(x)+1 is neither even nor odd. Now f(-x) ne -f(x) > But this is just a dc level shift. >=20 > Could you not therefore apply this to function of this sort. Ones that ki=
nd of look odd but have different amplitudes in the negative half cycle. Ju= st adjust the dc level (add or subtract) to zero and then it becomes odd. T= hen no cosine terms to calculate. Once the Fourier series is calculated yo= u just add the dc part back in again. Therefore functions of this sort shou= ld 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 measurem= ents and applying fourier techniques) there are (essentially) no strictly e= ven or odd functions. At each harmonic you will get distinct sine values a= nd cosine values and they will generally not be zero. =20 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 grin= d through examples that contain a rich arrangement of sines and cosines at = every harmonic. Especially today where grinding them out is easy on a comp= uter.
Reply by Tom Killwhang August 12, 20202020-08-12
We all know that if you have an even function you have only cosine terms an=
d 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=20
f(x)=3Dsin(x) - this is odd since f(-x) =3D -f(x)

f(x)=3Dsin(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. The=
n 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.