Finding the integral of $\frac{1}{x(x^n+a^n)}$ I was working on the problems in Mathematical Methods for Physics and Engineering by Riley,Hobson & Bence.
In Problem 2.34 (d) I'm supposed to find this integral: $$J=\int\frac{dx}{x(x^n+a^n)}.$$
I used partial fractions and arrived at the form
$$J=\frac{1}{a^n}\left[\log x-\int \frac{dx}{x^n+a^n}\right]$$
and now I'm stuck, I don't know how to integrate $1/(x^n+a^n)$.

We seek a decomposition of the form
$$\frac{1}{x(x^n + a^n)} = \frac{A}{x} + \frac{Bx^{n-1}}{x^n + a^n} = \frac{(A+B)x^n + Aa^n}{x(x^n+a^n)}.$$  Hence the choice $A = a^{-n}$, $B = -A = -a^{-n}$, yields
$$\frac{1}{x(x^n+a^n)} = \frac{1}{a^n} \left(\frac{1}{x} - \frac{x^{n-1}}{x^n + a^n}\right).$$
The rest is straightforward:
$$\int \frac{dx}{x(x^n+a^n)} = \frac{1}{a^n} \left(\log |x| - \frac{1}{n} \int \frac{nx^{n-1}}{x^n + a^n} \, dx \right) = \frac{1}{a^n} \left( \log |x| -\frac{1}{n} \log |x^n + a^n| \right) + C.$$
