Partial Fraction Decomposition trouble $\frac{1}{(1+x^2)(1+x^{2015})}$ I wish to decompose $\frac{1}{(1+x^2)(1+x^{2015})}$
I have $1 = (Ax+B)(1+x^{2015}) + (Cx+D)(1+x^2) = Ax^{2016} + Bx^{2015} + Cx^{3} + Dx^{2} + x(A+C) + B+D$
Doesn't this imply that $B+D = 1$, but we also have that $B=D = 0$ as well.
What did I do wrong?

I am examining the integral $\int_{0}^{\infty} \frac{dx}{(1+x^2)(1+x^{2015})}$
 A: There is a trick:
$$\begin{eqnarray*}\int_{0}^{+\infty}\frac{dx}{(1+x^2)(1+x^m)}&=&\int_{0}^{1}\frac{dx}{(1+x^2)(1+x^m)}+\int_{1}^{+\infty}\frac{dx}{(1+x^2)(1+x^m)}\\&=&\int_{0}^{1}\frac{dx}{1+x^2}\left(\frac{1}{1+x^m}+\frac{1}{1+x^{-m}}\right)\\&=&\int_{0}^{1}\frac{dx}{1+x^2}=\arctan(1)=\color{red}{\frac{\pi}{4}}\end{eqnarray*}$$
no matter what $m$ is.
Explanation: split the integration range into $(0,1)\cup (1,+\infty)$; use the change of variable $x\mapsto\frac{1}{x}$ on the unbounded piece and recombine the two pieces in a single integral over $(0,1)$; simplify, simplify more.
A: So be it, but we'll use complex analysis
$$x^2+1=(x+i) \cdot (x-i)$$
The solution of $1+x^{2015}=0$ can be handled with Demoivre's Theorem. The theorem yields,
$$1+x^{2015}=\prod_{n=0}^{2014} \left(x-\cos \left({{(2\cdot n+1) \cdot \pi} \over n}\right)-i\cdot \sin\left({{(2\cdot n+1) \cdot \pi} \over n}\right) \right)=\prod_{n=0}^{2014} x-\lambda_n$$
From here, we must employ Heaviside's Cover-up Method. I'd suggest a CAS system at this point. If you like, here's the formula for the terms in the partial fraction expansion,
$${1 \over {(1+x^2) \cdot (1+x^{2015})}}={1 \over {(2i) \cdot \prod_{n=0}^{2014} (i-\lambda_n)}}+{1 \over {(2i) \cdot \prod_{n=0}^{2014} (i+\lambda_n)}}+\sum_{k=0}^{2014} \lim_{x \to {\lambda_k}} {{\lambda_k-\lambda_n} \over {(1+\lambda_k^2) \cdot \prod_{n=0}^{2014} (\lambda_k-\lambda_n)}}$$
If you'd like to evaluate the integral, this answer will suffice. He obtains $\pi/4$ using a general principle that applies to an entire class of integrals with integrands with,
$$f(x)+f(a+b-x)=k$$
Where, $a$ and $b$ are integration bounds, $k$ is a constant, and the substitution, $\tan(\theta) \rightarrow x$ should be used.
