If I write FourierSinSeries[x, x, 10]

Mathematica will output the first 10 terms of the Fourier Sine Series f(x) = x defined for 0 < x < Pi.

How do I output the the Fourier Sine Series for a different domain, say 0 < x < 2 Pi?


1 Answer 1


Use {a,b}->{1,1/2} for FourierParameters

      FourierSinSeries[x, x, 10, FourierParameters -> {1, 1/2}]

Mathematica graphics

This is because the Fourier sine series is defined as $b_k= \frac{2}{L} \int_0^L f(x) \sin\left( \frac{k \pi x}{L} \right) dx$ and Mathematica uses

Mathematica graphics

so for $L=2\pi$, if we use $b=\frac{1}{2}$ and $a=1$ then Mathematica definition becomes $b_k= \frac{1}{\pi} \int_0^{2\pi} f(x) \sin\left( \frac{k x}{2} \right) dx$ which is what you get when $L=2\pi$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.