# Adding trig functions for positive output

1. Jan 18, 2007

### Jdo300

Hello All,

Here's a strange question for you. Is there any possible way to add two or three sine wave functions together so that the resulting wave never goes below the positive Y axis of the graph? These functions can be whatever frequency or phase necessary, just no vertical offset.

I am applying the idea to an electrical project I am working on and I'm wondering if it is possible to combine two or three AC signals in such a way that a DC signal is created (waves never dip below 0). Any comments welcome. If this is absolutely not possible, thatâ€™s fine too; just curious :-).

Thanks,
Jason O

2. Jan 18, 2007

### mjsd

if it is 2-3 signals then may be not. you can't get good DC out.

For a proper DC like signal
You know how you can express a square wave using Fourier Series, but you will need to use many waves to get a good approximation. Now you may say, that's a square wave and half of the time it goes below 0. The trick perhaps is to make the period of this square wave long enough such that it effectively stays above zero for the duration your application requires. Not sure whether it is an efficient and practical way to do things though (probably not).

3. Jan 18, 2007

### mr_homm

It's absolutely not possible. Fourier theory says that if any function has a Fourier series (or Fourier transform) at all, then that transform is unique. Since a dc signal can be written as exp(i*0*t), this is its expression in terms of Fourier components. No other expression can possibly reduce to this one without violating the uniquenss theorem. Since you are using various sine waves, you must have a Fourier sum involving nonzero frequencies, which is clearly different from a dc signal.

Even if you do not want a true (i.e. perfectly constant) dc signal, you still cannot get a signal that is everywhere positive, because then its average value would be positive. Since the average value of a signal is equal to its Fourier component at frequency=0, the only way for a signal to be everywhere positive is if it has a positive perfectly constant dc component, which the previous paragraph shows is impossible to construct out of sines with nonzero frequencies.

A shorter more intuitive version of this proof is simply to observe that the average value of any sine function is 0, so how could any combination of them produce a function with an average value > 0?

Hope this helps!

--Stuart Anderson

4. Jan 18, 2007

### Jdo300

Thanks for the insight!

I guessed the same thing that mr_homm said about the waves never being positive because their average value is always 0. But now I know mathematically why this is so. Thanks for the information :-).

5. Jan 18, 2007

### mjsd

Strictly speaking, the Fourier Series has a constant term from the n=0 cosine term,..so average is not necessary 0,... but of course, that is just like a vertical offset (which is not allowed in the problem statement)...