[Math] Use WolframAlpha to compute the real Fourier series of a function

calculusfourier serieswolfram alpha

How can I use Wolfram|Alpha to compute the Fourier series (with real coefficients $a_0, a_n$ and $b_n$)? (The 'Fourier series' command seems to summon the complex series)

I.e. $f(x) = x + \pi$ for $-\pi < x < 0$ and $f(x) = \pi – x$ for $0 \leq x < \pi$

$\Rightarrow f(x) \approx \pi/2 + 4/\pi(cos x + \dfrac 1 3 cos 3x + \dfrac 1 5 cos 5x + \cdot \cdot \cdot)$

I know I can use indefinite or definite integrals to check the integration itself, but I'd be interesting to see a complete solution aid.

Best Answer

You could use the FourierCosSeries command. Here is the documentation of it.