<s>[INST] Evaluation of $1-\frac{1}{7}+\frac{1}{9}-\frac{1}{15}+\frac{1}{17}-\dotsb$ 
How can we calculate sum of following infinite  series
$\displaystyle \bullet\; 1+\frac{1}{3}-\frac{1}{5}-\frac{1}{7}+\frac{1}{9}+\frac{1}{11}-\cdots$
$\displaystyle \bullet\; 1-\frac{1}{7}+\frac{1}{9}-\frac{1}{15}+\frac{1}{17}-\cdots$

$\textbf{My Try:}$ Let $$S = \int_0^1 (1+x^2-x^4-x^6+x^8+x^{10}+\cdots) \, dx$$ 
So we get $$S=\int_0^1 \left(1-x^4+x^8-\cdots\right)dx+x^2\int_0^1 (1-x^4+x^8-\cdots)\,dx$$
So we get $$S=\int_0^1 \frac{1+x^2}{1+x^4} \, dx= \frac{\pi}{2\sqrt{2}}$$ after that we can solve it
Again for second One, Let $$S=\int_0^1 (1-x^6+x^8-x^{14}+x^{16}+\cdots)$$
So we get $$S=\int_0^1 (1+x^8+x^{16}+\cdots) \, dx-\int_0^1 (x^6+x^{14}+
\cdots)\,dx$$
So we get $$S=\int_{0}^{1}\frac{1-x^6}{1-x^8}dx = \int_{0}^{1}\frac{x^4+x^2+1}{(x^2+1)(x^4+1)}dx$$
Now how can i solve after that, Help me
Thanks 
 [/INST] Start with partial fractions
$$\frac{x^4+x^2+1}{(x^2+1)(x^4+1)} = \frac{A}{x^2+1}+ \frac{B x^2+C}{x^4+1}$$
Thus,
$$A+B=1$$
$$B+C=1$$
$$A+C=1$$
or $A=B=C=1/2$.  Also note that
$$x^4+1 = (x^2+\sqrt{2} x+1)(x^2-\sqrt{2} x+1) $$
so that
$$\frac{x^2+1}{x^4+1} = \frac{P}{x^2-\sqrt{2} x+1} + \frac{Q}{x^2+\sqrt{2} x+1}$$
where $P=Q=1/2$.  Thus,
$$\frac{x^4+x^2+1}{(x^2+1)(x^4+1)} = \frac14 \left [2 \frac1{x^2+1} + \frac1{(x-\frac1{\sqrt{2}})^2+\frac12} + \frac1{(x+\frac1{\sqrt{2}})^2+\frac12} \right ]$$
And the integral is
$$\frac12 \frac{\pi}{4}+ \frac14 \sqrt{2} \left [\arctan{(\sqrt{2}-1)}-\arctan{(-1)} \right ] + \frac14 \sqrt{2} \left [\arctan{(\sqrt{2}+1)}-\arctan{(1)} \right ]= \frac{\pi}{8} (\sqrt{2}+1) $$
</s>