Let $a$ be a non zero real number. Evaluate the integral $\int \frac{-7x}{x^{4}-a^{4}}dx$ I hit a wall on this question. Below are my steps
$$\int \frac{-7x}{x^{4}-a^{4}}dx=-7\int \frac{x}{x^{4}-a^{4}}dx$$
Let $u=\frac{x^2}{2}, dx = \frac{du}{x}, x^{4}=4u^{2}.$
$$-7\int \frac{1}{4u^{2}-a^{4}}du=-7\int \frac{1}{(2u+a^2)(2u-a^2)}du$$
Use partial fraction decomposition,
$$\frac{1}{(2u+a^2)(2u-a^2)}=\frac{A}{2u+a^{2}}+\frac{B}{2u-a^{2}}.$$
Solve for $A$ and $B$:
$$\begin{cases}
A=\frac{1}{-2a^{2}}
\\
B=\frac{1}{2a^{2}}
\end{cases}$$
Now $$\int \frac{1}{(2u+a^2)(2u-a^2)}du=\int \frac{1}{-2a^2(2u+a^{2})}+\int \frac{1}{2a^{2}(2u-a^{2})}$$
Factoring out $a$ yields
$$\frac{7}{2a^{2}}(\int \frac{1}{2u+a^{2}}-\int \frac{1}{2u-a^{2}})$$
Evaluate the integral and substitute $u=\frac{x^{2}}{2}$ back.
My final answer is $$\frac{7}{2a^{2}}(\log(x^2+a^2)-\log(x^2-a^2)).$$
Feedback says my answer is wrong. Where did I mess up?

Mistake appeared in evaluating:
$$\int\frac{1}{2u\pm a^2}\,\mathrm{d}u.$$
To solve this you have to substitute $v=2u\pm a^2$, $\mathrm{d}u=1/2 \mathrm{d}v$. We get
$$\frac{1}{2}\int\frac{1}{v}\,\mathrm{d}v.$$
From now on everything should be fine.

There is also a much easier way to evaluate this integral.
Substitute $u=-ix^2/{a^2}$. The differential is $\mathrm{d}x=ia^2/x^2\,\mathrm{d}u$.
$$\int-\frac{7ia^2}{2(-a^4u^2-a^4)}\,\mathrm{d}u = \frac{7i}{2a^2}\int\frac{1}{u^2+1}\,\mathrm{d}u = \frac{7i}{2a^2}\arctan u+C.$$
Substituting back gives us
$$\frac{7i\arctan\left(-\frac{ix^2}{a^2}\right)}{2a^2}+C=\frac{7i\operatorname{arctanh}\left(\frac{x^2}{a^2}\right)}{2a^2}+C.$$
If you want to get a solution with logarithm function involved, you can do that with this identity
$$\arctan(x)= \frac{1}{2i}\log \left( \frac{x-i}{x+i}\right).$$
