Result of Integration of even function is zero instead of twice of function

109 Views Asked by At

I am trying to solve and show the integration of even function is twice the integration of function i.e

$\int_{-a}^af(x)dx=2\int_0^af(x)dx$

I have a fourier series of even function which is $$f(x)=\begin{matrix}-2x, -\pi<x<0\\\ 2x, \ 0<x<\pi\end{matrix}$$

Definitely $f(x)$ is an even function, so I should get

$\int_{-\pi}^\pi f(x)dx=2\int_0^\pi f(x)dx$, But I am getting zero due to some reasons I am not aware of I am definitely doing wrong something. My solution is

The fourier series for even function is

$a_0 =$$\frac{a_0}{2}+\sum{a_ncosnx}$

For $a_0$,

$a_0 =$$\frac{2}{\pi}\int_{-\pi}^\pi f(x)dx$

$a_0 =$$\frac{2}{\pi}[\int_{-\pi}^0 f(x)dx+\int_{0}^\pi f(x)dx]$

$a_0 =$$\frac{2}{\pi}[\int_{-\pi}^0 (-2x) dx+\int_{0}^\pi (2x) dx]$

$a_0 =$$\frac{2}{\pi}[-2\int_{-\pi}^0 x dx+2\int_{0}^\pi x dx]$

$a_0 =$$\frac{2}{\pi}[2\int_0^{-\pi} x dx+2\int_{0}^\pi x dx] $

$[\therefore \int_a^b f(x) dx =-\int_b^a f(x) dx ]$

$a_0 =$$\frac{2}{\pi}[-2\int_0^{\pi} x dx+2\int_{0}^\pi x dx] $

$a_0 =0$

Please anyone suggest me what am i doing wrong here. Thanks in advance.

1

There are 1 best solutions below

4
On

$$a_0 =\frac{2}{\pi}[2\int_0^{-\pi} x dx+2\int_{0}^\pi x dx]= \frac{2}{\pi}[x^2|_{0}^{-\pi}+x^2|_{0}^{\pi}]=\frac{2}{\pi}[2\pi^2]=4 \pi.$$

Edit: see $$\int_{ka}^{kb} f(x) dx=k\int_{a}^{b} f(tk) dt$$ Here you may take $a=0$.