\[\begin{align*} % S(x) S(x) &=\frac{2}\pi\left(1+2\sum\limits_{r=1}^\infty\frac{\cos((2r-1)x)}{1-(2r-1)^2}\right)\\ \\ S(\tfrac\pi2)&=\frac{2}\pi\left(1+2\sum\limits_{r=1}^\infty\frac{\cos((\pi r-\tfrac\pi2)}{1-(2r-1)^2}\right)\\ 1&=\frac{2}\pi\left(1+2\sum\limits_{r=1}^\infty\frac{\sin(\pi r)}{1-(2r-1)^2}\right)\\ \frac\pi2-1&=2\sum\limits_{r=1}^\infty\frac{\sin(\pi r)}{1-(2r-1)^2}\\ \frac\pi4-\frac12&=\sum\limits_{r=1}^\infty\frac{\sin(\pi r)}{1-(2r-1)^2}\\ \end{align*}\]
um , i think i made a mistake somewhere
sin r pi = 0
well sine of πr is going to be zero, so
so the last two lines are not true
and the third line isnt right either
the second line is not true .. check again.
is the first line right?
sorry ... it seems i made mistake I didn't see 2r there. I wouldn't now about the first line since it is your question. What is your function??
why did you put \( S(\pi/2) = 1 \)
the function is f(x)=|sin(x)|
I think the summation is mostly zeros, except for r=1 where it is 0/0 it's pi at r=1 ?
hmm i forgot it could do that
so have i made any mistake then?
as far as I can see, your very first line, evaluated at x=pi/2 gives 2/pi *(1 + 2*pi/4) = 2/pi +1
maybe you don't want that leading 1?
\[\begin{align*} % a_0 a_0&=\frac1\pi\int\limits_{-\pi}^\pi |\sin(x)| \,\text dx\\ &=\frac2\pi\int\limits_{0}^\pi \sin(x) \,\text dx\qquad\text{(even integrand)}\\ &=\frac{2}\pi\left(-\cos(x)\Big|_0^\pi\right)\\ &=\frac{2(-(-1-1))}\pi \\ &=\frac{4}\pi \end{align*}\] \begin{align*} % a_n a_n&=\frac1\pi\int\limits_{-\pi}^\pi|\sin(x)|\cos(nx)\,\text dx\\ &=\frac2\pi\int\limits_{0}^\pi\sin(x)\cos(nx)\,\text dx\qquad\text{(even integrand)}\\ &=\frac2\pi\int\limits_{0}^\pi\frac{\sin(x+nx)-\sin(x-nx)}2\,\text dx\\ &=\frac1\pi\int\limits_{0}^\pi{\sin\left((1+n)x\right)-\sin\left((1-n)x\right)}\,\text dx\\ &=\frac1\pi\left(\frac{-\cos((1+n)x)}{1+n}-\frac{\cos((1-n)x))}{1-n}\Big|_0^\pi\right)\\ &=\frac1\pi\left(\frac{1-\cos((1+n)\pi)}{1+n}+\frac{1-\cos((1-n)\pi))}{1-n}\right)\\ &=\frac1\pi\left(\frac{1-(-1)^{n+1}}{1+n}+\frac{1-(-1)^{n-1})}{1-n}\right)\\ \\&=\frac1\pi\left(\frac{1+(-1)^{n}}{1+n}+\frac{1+(-1)^{n})}{1-n}\right)\\ \end{align*} \begin{align*} % b_n b_n&=\frac1\pi\int_{-\pi}^\pi|\sin(x)|\sin(nx)\,\text dx\\ &=0\qquad\text{(odd integrand)} \end{align*} \begin{align*} % S(x) S(x)&=\frac{2}\pi+\frac1\pi\sum\limits_{n=1}^\infty\left(\frac{1+(-1)^{n}}{1+n}+\frac{1+(-1)^{n})}{1-n}\right)\cos(nx)\\ &=\frac{2}\pi+\frac2\pi\sum\limits_{n=2,4,6\dots}^\infty\left(\frac{1}{1+n}+\frac{1}{1-n}\right)\cos(nx)\\ &=\frac{2}\pi\left(1+2\sum\limits_{n=2,4,6\dots}^\infty\frac{\cos(nx)}{1-n^2}\right)\\ &=\frac{2}\pi\left(1+2\sum\limits_{r=1}^\infty\frac{\cos((2r-1)x)}{1-(2r-1)^2}\right)\\ \\&=\frac4\pi\left(\frac12-\frac{\cos(2x)}{3}+\frac{\cos(4x)}{15}+\frac{\cos(6x)}{35}+\dots\right) \end{align*} \]
a_0 = 2/pi http://www.wolframalpha.com/input/?i=integrate+ |sin%28x%29|%2Fpi+from+0+to+pi
http://www.wolframalpha.com/input/?i=%E2%88%AB+%7Csin%28x%29%7C%2F%CF%80+from+-%CF%80+to+%CF%80
it seems that you are taking 2pi as period, although it works, pi should also work fine.
Plot[2/Pi - Sum[2/Pi * 1/(4 n^2 - 1) Cos[n x], {n, 1, 20}], {x, 0, 4 Pi}] however the period seems to be 2pi
sorry the result was correct .. i forgot it was for even case. On Mathematica Plot[2/Pi - Sum[2/Pi * 1/(4 n^2 - 1) Cos[2 n x], {n, 1, 20}], {x, 0, 2 Pi}]
so the final series is \[ |\sin x| = {2 \over \pi} +{2 \over \pi} \sum_{n=1}^\infty \frac 1{1 - 4 n^2} \cos (2nx) \]
In case you didn't find your mistake, it happens when you change the index from n=2,4,6... to r=1,2,3... you should substitute n=2r (so that r= n/2 giving 1,2,3...) you then get exper's result
ah yes \[\begin{align*} % S(x) S(x)&=\frac{2}\pi+\frac2\pi\sum\limits_{n=1}^\infty\left(\frac{1+(-1)^{n}}{1-n^2}\right)\cos(nx)\\ &=\frac{2}\pi\left(1+2\sum\limits_{n=2,4,6\dots}^\infty\frac{\cos(nx)}{1-n^2}\right)\\ &=\frac{4}\pi\left(\frac12+\sum\limits_{r=1}^\infty\frac{\cos(2rx)}{1-(2r)^2}\right)\\ \\&=\frac4\pi\left(\frac12-\frac{\cos(2x)}{3}-\frac{\cos(4x)}{15}-\frac{\cos(6x)}{35}-\dots\right) \end{align*}\]
\[\begin{align*} % S(x) S(x) &=\frac{4}\pi\left(\frac12+\sum\limits_{r=1}^\infty\frac{\cos(2rx)}{1-(2r)^2}\right)\\ \\ S(\tfrac\pi2)&=\frac{4}\pi\left(\frac12+\sum\limits_{r=1}^\infty\frac{\cos(\pi r)}{1-4r^2}\right)\\ 1&=\frac{4}\pi\left(\frac12+\sum\limits_{r=1}^\infty\frac{(-1)^{r}}{1-4r^2}\right)\\ \frac\pi4&=\frac12+\sum\limits_{r=1}^\infty\frac{(-1)^{r}}{1-4r^2}\\ \end{align*}\] thats better thanks to both of you
Join our real-time social learning platform and learn together with your friends!