Help with $\int\frac{1}{1+x^8}dx$ I'm not sure how to proceed. I tried factoring like you do to evaluate $\int\frac{1}{1+x^4}dx$, and since it came out nasty I checked out WolframAlpha to see if I was on the right track. In fact, Wolfram doesn't have a step-by-step solution for the integral in question, but the primitive is full of trig expressions like $\csc\frac{\pi}{8}$ and I'm not sure where these would come from.
 A: The roots of $1+x^8$ are 16-th roots of unity; they are $\zeta^{1+2k}$ where $\zeta$ is a primitive 16-th root of unity, and $k$ goes from $0$ to $7$.
They are all distinct, so we can use the simple formula for partial fractions decomposition of $f(x)/g(x)$ that says the coefficient on the $1/(x-a)$ term is $f(a)/g'(a)$.
Therefore,
$$ \frac{1}{1+x^8} = \sum_{k=0}^7 \frac{1}{8 (\zeta^{1+2k})^7} \cdot \frac{1}{x-\zeta^{1+2k}}
= \sum_{k=0}^7 \frac{1}{8 \zeta^{7-2k}} \cdot \frac{1}{x-\zeta^{1+2k}}
$$
It may be of use that the summands $k$ and $7-k$ are complex conjugate. If one is so inclined, one could add those terms together; the result should be a purely real function with a linear numerator and quadratic denominator, giving you the purely real partial fraction decomposition.
A: You have a vile lecturer. I had to find $\displaystyle \int \dfrac{1}{1+x^4}dx$ when I took my analysis II course and I actually wrote on my notes: you just don't wish this antiderivative on anyone. It took me one page and a half (A4) to find this antiderivative and I didn't prove all the details. Yours is much more troublesome.
Hint: For all $x\in \Bbb R$, the following equality holds:$$1+x^8=\left(x^2+\left(\sqrt{2-\sqrt 2}\right)x+1\right)\left(x^2-\left(\sqrt{2-\sqrt 2}\right)x+1\right)\\\left(x^2+\left(\sqrt{2+\sqrt 2}\right)x+1\right)\left(x^2-\left(\sqrt{2+\sqrt 2}\right)x+1\right).$$
You can then use partial fractions and find the antiderivatives.
Here's the Wolfram Alpha confirmation of the above equality. 
A: Perhaps the best way to get around this kind of integrals is to factor the denominator as below $$x^{n}+1=\prod_{k=0}^{n-1}\left(x-\alpha^{2k+1}\right)$$ where $$\alpha=e^{i\frac{\pi}{n}}$$ is the primitive $n$ root of $-1$. Then we can find the partial fraction expansion of the integrand as $$\frac{1}{x^n+1}=\sum_{k=0}^{n-1}\frac{A_k}{x-\alpha^{2k+1}}$$ where $$A_k=\lim_{x\rightarrow \alpha^{2k+1}}\frac{x-\alpha^{2k+1}}{x^n+1}$$ Then the integral becomes $$\sum_{k=0}^{n-1}\int \frac{A_k}{x-\alpha^{2k+1}}dx$$ But now, there are many complex terms involved, we need to collect terms together to simplify them to real rational functions. This is not easy for any arbitrary $n$, but is plausible particularly if $n$ is of the form $2^k$ for some $k\in \mathbb{Z}^+$, see here.
For the current problem, fortunately $n=8=2^3$, so this method works here.
A: Decompose the integrand as
\begin{align}\frac{1}{1+x^8}
&=\frac1{2\sqrt2}\left(\frac{x^2+\sqrt2}{x^4-\sqrt2x^2+1}
 - \frac{x^2-\sqrt2}{x^4+\sqrt2x^2+1}\right)\\
&=\frac{2+\sqrt2}8 \left( \frac{1+x^2}{x^4+\sqrt2x^2+1}
+\frac{1-x^2}{x^4-\sqrt2x^2+1}   \right)\\
 &\hspace{5mm}+\frac{2-\sqrt2}8 \left( \frac{1+x^2}{x^4-\sqrt2x^2+1}
+\frac{1-x^2}{x^4+\sqrt2x^2+1}   \right)
\end{align}
Then, integrate
$$\begin{align}
I_+(a)&=\int\frac{1+x^2}{x^4+ax^2+1}dx 
= \int\frac{d(x-\frac1x)}{(x-\frac1x)^2 +2+a}=\frac1{\sqrt{2+a}}\tan^{-1}\frac{x^2-1}{x\sqrt{2+a}} \\
 I_-(a)&=\int\frac{1-x^2}{x^4+ax^2+1}dx 
= \int\frac{d(x+\frac1x)}{2-a-(x+\frac1x)^2}=\frac1{\sqrt{2-a}}\coth^{-1}\frac{x^2+1}{x\sqrt{2-a}} \\
\end{align}$$
Thus
\begin{align}
\int \frac{1}{1+x^8}dx
&= \frac{2+\sqrt2}8 \left[ J_+(\sqrt2)+ J_-(-\sqrt2)  \right]
+\frac{2-\sqrt2}8 \left[ J_+(-\sqrt2)+ J_-(\sqrt2)  \right]\\
& =\frac{\sqrt{2+\sqrt2}}8 \left( \tan^{-1}\frac{x^2-1}{x\sqrt{2+\sqrt2}}
+ \coth^{-1}\frac{x^2+1}{x\sqrt{2+\sqrt2}}\right)\\
&\hspace{5mm}+\frac{\sqrt{2-\sqrt2}}8 \left( \tan^{-1}\frac{x^2-1}{x\sqrt{2-\sqrt2}}
+ \coth^{-1}\frac{x^2+1}{x\sqrt{2-\sqrt2}}\right)+C\\
\end{align}
