<s>[INST] Integral $\int\frac{dx}{x^5+1}$ Calculate $\displaystyle\int\dfrac{dx}{x^5+1}$
 [/INST] One might as well explain how to derive the factorization in Troy Woo's answer. (This is by hand, not software.) Yes, he's right that any polynomial with real coefficients can be factorized into linear and quadratic factors with real coefficients; this fact can be derived from the fundamental theorem of algebra, by factorizing into linear factors $x - r_i$ where the $r_i$ range over all complex roots, and collecting factors that involve non-real roots into complex conjugate pairs in order to get at the real quadratic factors. 
Applying this to the polynomial $x^5 + 1$, let $\zeta$ be a complex fifth root of $-1$, say $\zeta = e^{\pi i/5}$. The other complex (non-real) fifth roots are $\bar{\zeta} = \zeta^{-1}$, $\zeta^3 = -\zeta^{-2}$, and $\bar{\zeta^3} = -\zeta^2$. Then 
$$x^5 + 1 = (x+1)(x - \zeta)(x - \zeta^{-1})(x + \zeta^2)(x + \zeta^{-2})$$ 
where we may observe 
$$0 = 1 - \zeta - \zeta^{-1} + \zeta^2 + \zeta^{-2}$$ 
by matching coefficients of $x^4$ on both sides. One of the conjugate pairs gives a real quadratic factor $(x - \zeta)(x - \zeta^{-1}) = x^2 - \alpha x + 1$. Here the real number $\alpha = \zeta + \zeta^{-1}$ can be computed as follows: 
$$\alpha^2 = (\zeta + \zeta^{-1})^2 = \zeta^2 + 2 + \zeta^{-2} = 2 + (-1 + \zeta + \zeta^{-1}) = 1 + \alpha$$ 
where the third equation is by the observation above. Solving for $\alpha$ gives either $\frac{1 + \sqrt{5}}{2}$ or $\frac{1 - \sqrt{5}}{2}$; actually it's the first if we start with the fifth root $\zeta = e^{\pi i/5}$. The other conjugate pair leads to $(x + \zeta^2)(x + \zeta^{-2}) = x^2 - \beta x + 1$ where $\beta$ is the other root $\frac{1 - \sqrt{5}}{2}$. This gives Troy Woo's answer. 
</s>