4

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?

user26795
  • 41
  • 2
  • 1
    You can try my easyFourierSinSeries: https://mathematica.stackexchange.com/a/149469/1871 – xzczd Jul 01 '17 at 11:42

1 Answers1

5

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$

Nasser
  • 143,286
  • 11
  • 154
  • 359