<s>[INST] Indefinite Integral of $\dfrac {x^{p-1}}{x^{2m} - a^{2m}}$ I am looking at a bunch of related integrals found in Spiegel's "Mathematical Handbook of Formulas and Tables", (Schaum, 1968), item $14.336$.
It's a complicated and messy old beast:
For $m \in \mathbb Z$ such that $m \ge 1$:
$\displaystyle \int \dfrac {x^{p-1} \, \mathrm d x}{x^{2m} - a^{2m}} = \frac 1 {2 m a^{2 m - p}} \sum_{k=1}^m \cos \frac {k p \pi} m \ln \left({x^2 - 2 a x \cos \frac {k \pi} m + a^2}\right)$
$\displaystyle - \frac 1 {m a^{2 m - p}} \sum_{k=1}^m \sin \frac {k p \pi} m \arctan \left({\frac {x - a \cos \frac {k \pi} m}{a \sin \frac {k \pi} m}}\right)$
$\displaystyle + \frac 1 {2 m a^{2 m - p}} (\ln (x - a) + (-1)^p \ln (x + a)) + C$
for all $0 < p \le 2 m$.
(Note that he glosses over the sign of $x$, presenting the expression for positive $x$ only -- I will explore the negative $x$ case later.)
I thought of $2$ different approaches:

*

*Factorise the denominator using the standard result:

$\displaystyle x^{2 n} - y^{2 n} = (x - y) (x + y) \prod_{k \mathop = 1}^{n - 1} \left({x^2 - 2 x y \cos \dfrac {k \pi} n + y^2}\right)$
and then explore the possibility of doing a partial fraction expansion. However, this did not work out so well, as I was then unable to see how to simplify the expression on the top of the resulting terms in all but the $x - a$ and $x + a$ denominators, so I didn't proceed further with that.


*Prove it by induction on $m$, which first concerns establishing the base case:

$\displaystyle \int \frac {\mathrm d x} {x^2 - a^2} = \frac 1 {2 a} \ln \left({\dfrac {x - a} {x + a}}\right) + C$ (that is: $m = 1$, $p = 1$)
$\displaystyle \int \frac {x \, \mathrm d x} {x^2 - a^2} = \ln \left({x^2 - a^2}\right) + C$ (that is: $m = 1$, $p = 2$)
But when I put $m = 1$ into the above expression, I get:
$\dfrac 1 {2 a^{2 - p} } ( (-1)^p \ln (x^2 + 2 a x + a^2) ) + \dfrac 1 {2 a^{2 - p} } (\ln (x - a) + (-1)^p \ln (x + a) )$
But that pesky term on the left, in $(-1)^p \ln (x^2 + 2 a x + a^2)$ is clearly incorrect.
This arises from the $\cos \dfrac {k p \pi} m \ln \left({x^2 - 2 a x \cos \dfrac {k \pi} m + a^2}\right)$ expression in the given solution.
But for integer $p$ and $m = 1$, that $\cos \dfrac {k p \pi} m$ term, which I would hope to vanish, defiantly remains in place.
It doesn't help much changing it to $\cos \dfrac {k p \pi} {2 m}$, because this time it does not vanish for $p = 2$.
So either Spiegel has reported this result wrong, or I'm misunderstanding something.
Should that cosine in fact be a sine? Then it would vanish away like I want it to.
For $m = 2$ and $p = 1$ you get this:
$\dfrac 1 {4 a^3} \ln \left( {\dfrac {x - a} {x + a} }\right) - \dfrac 1 {2 a^3} \arctan \dfrac x a$
which is consistent with the result quoted. I have gone a little further, trying $p = 2, 3, 4$, but now it is looking as though the cosine term is completely erroneous and perhaps should not be there at all, because any contribution it makes is consistently absent.
I have gone no further with higher $m$ values.
 [/INST] There is a typo in the formula
\begin{align}
I(m,p) =\int \dfrac {x^{p-1} \, \mathrm d x}{x^{2m} - a^{2m}}
& = \frac 1 {2 m a^{2 m - p}} \sum_{k=1}^{m-1} \cos \frac {k p \pi} m \ln \left({x^2 - 2 a x \cos \frac {k \pi} m + a^2}\right)\\
 & \>\>\>\>\>- \frac 1 {m a^{2 m - p}} \sum_{k=1}^{m-1}\sin \frac {k p \pi} m \arctan \left({\frac {x - a \cos \frac {k \pi} m}{a \sin \frac {k \pi} m}}\right)\\
 & \>\>\>\>\>+ \frac 1 {2 m a^{2 m - p}} (\ln (x - a) + (-1)^p \ln (x + a))
\end{align}
where the summation should run from $1$ to $m-1$, instead of $m$. Then, the followings check out
$$I(1,1)=\int \frac {\mathrm d x} {x^2 - a^2} = \frac 1 {2 a} \ln \left({\dfrac {x - a} {x + a}}\right)$$
$$I(1,2)=\int \frac {x \, \mathrm d x} {x^2 - a^2} = \ln \left({x^2 - a^2}\right)$$
$$I(2,1)=\int \frac {\, \mathrm d x} {x^4 - a^4}
= \dfrac 1 {4 a^3} \ln \left( {\dfrac {x - a} {x + a} }\right) - \dfrac 1 {2 a^3} \arctan \dfrac x a$$
</s>