Using Fourier series to determine if a function is odd or even

Determine if the following function is odd or even using Fourier series.

$$f(x)=x^5\sin x$$

If a function is even then $b_n=0$ and you have to evaluate $a_n=\frac 2 \pi \int_0^\pi f(x) \cos nx \, dx$

And if a function is odd then $a_n=0$ and you have to evaluate $b_n=\frac 2 \pi \int_0^\pi f(x)\sin nx \, dx$

However, this means that I have to do integration by parts five times. Is there a more efficient method to determine if the function is even or odd?

• Fourier series are probably one of the least efficient methods of determining whether a function is even... – Chappers Jul 17 '17 at 21:30
• BEFORE calculating the integrals, you should check whether $f$ is odd/even. This might save much time. – Peter Jul 17 '17 at 21:35
• "Is there a more efficient method to determine if the function is even or odd?" Yes. Check the definition of odd functions. – Jack Jul 17 '17 at 21:40
• The product of two odd functions is even, with Fourier series or not. – Jack D'Aurizio Jul 17 '17 at 22:06

You do not need complicated tools to determine whether a function $f(x)$ is odd, even or neither-nor.

A function $f(x)$ is even, if and only if the equation $f(-x)=f(x)$ holds for every $x$ for which both $f(x)$ and $f(-x)$ are defined and it is odd if and only if the equation $f(-x)=-f(x)$ holds for every $x$ for which both $f(x)$ and $f(-x)$ are defined.

In your example, we have $f(-x)=(-x)^5\sin(-x)=(-x^5)\cdot (-sin(x))=x^5\cdot sin(x)=f(x)$, so $f$ is even.

If a function is even then $b_n=0$ and you have to evaluate $b_n=\frac {2}{\pi}∫_{-\pi}^{\pi} f(x)\sin nx\ dx$

Note, you do not have to find any of the values of $a_n.$ You need to show that all the values of $b_n$ equal 0.

And, note the limits of integration.

Similarly: If a function is odd then $a_n=0$ and you have to evaluate $a_n=\frac {2}{\pi}∫_{-\pi}^{\pi} f(x)\cos nx\ dx$

$b_n=\frac {2}{\pi}∫_{-\pi}^{\pi} x^5\sin nx\ dx$

Now, rather than evaluating, and performing integration by parts 5 times.

I suggest you show that:

$a_n=\frac {2}{\pi}∫_{-\pi}^{\pi} \cos nx\ dx = 0$

and

b_n=\frac {2}{\pi}∫_{-\pi}^{\pi} x\sin nx\ dx = 0$Then use induction to show that$a_n=\frac {2}{\pi}∫_{-\pi}^{\pi} x^m\cos nx\ dx = 0$when$m$is even and$b_n=\frac {2}{\pi}∫_{-\pi}^{\pi} x^m\sin nx\ dx = 0$when$m\$ is odd