<s>[INST] $\int \frac{dx}{x\sqrt{x^4-16}}$ While I know that the answer is $-\frac{1}{8}\arctan \frac{4}{\sqrt{x^4-16}},$ I couldn't reach it. When I solved it I reached a different answer, if someone can point at what point I made a mistake and what is the way to solve it I will be thankful.
I will start with taking $u=x^2$, so $du =2x \;dx,$ and  $dx = du/2x.$
So I will multiple the integral by $2$ making it $2\int \frac{du}{\sqrt{u^2-4^2}}$ after that I will use the $\cosh^{-1}x$ to make it $2\cosh^{-1}(x^2/4) + c$
 [/INST] $\int \frac{1}{x\sqrt{x^4 - 16}} dx$
Multiply and dividide by $x^3$
$\int \frac{x^3}{x^4 \sqrt{x^4 - 16}} dx$
Put $x^4 - 16 = u^2$
$4x^3 dx = 2u du$
$x^3 dx = \frac{1}{2} u du$
On putting in integral,
= $\frac12 \int \frac{u}{(u^2 + 16) \sqrt{u^2}} du$
= $\frac12 \int \frac{u}{u(u^2 + 16)} du$
= $\frac12 \int \frac{1}{(u^2 + 16)} du$
= $\frac12 \int \frac{1}{(u)^2 + (4)^2} du$
= $\frac12 \tan^{-1} \frac{u}{4} + c$
Then replace value of u.

As you want to know how to do according to your method.

We have $x^2 = u$
$2x dx = du$
$dx = \frac{1}{2x} du$
Then from integral we have,
$\int \frac{1}{2x} \cdot \frac{1}{x \sqrt{u^2 - 16}} du$
= $ \frac{1}{2} \int \frac{1}{x^2 \sqrt{u^2 - 16}} du$
= $ \frac{1}{2} \int \frac{1}{u \sqrt{u^2 - 16}} du$
Then solve it.
</s>