Velvet Star Monitor

Standout celebrity highlights with iconic style.

general

Sawtooth wave as a sum of sines

Writer Matthew Harrington
$\begingroup$

Wikipedia gives the equation for a sawtooth waveform composed as a sum of sines as:

$$ x_\mathrm{sawtooth}(t) = \frac{A}{2}-\frac {A}{\pi}\sum_{k=1}^{\infty}\frac {\sin (2\pi kft)}{k} $$

Where $A$ is amplitude.

Is that correct? My reading of that (and graphs thereof) suggest that the initial term ($A/2-$) biases the resulting graph to positive values, so that instead of being centered around $0$ it will be centered around something $> 0$.

In comparison, they give the formula for a reverse sawtooth wave as:

$$ x_\mathrm{reversesawtooth}(t) = \frac {2}{\pi}\sum_{k=1}^{\infty} {(-1)}^{k} \frac {\sin (2\pi kft)}{k} $$

This yields values centered around 0, which is pretty much what I expected.

Simply dropping the initial term from the original expression, so that I have...

$$ x_\mathrm{sawtooth}(t) = -\frac {A}{\pi}\sum_{k=1}^{\infty}\frac {\sin (2\pi kft)}{k} $$

...yields an output range that is centered around $0$. I am writing some very simple code that deals with audio signal generation and I just want to fact check what I am doing. Is the Wikipedia page sloppy, or am I off base?

$\endgroup$ 1 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy