I have been trying to solve these integrals by substitutions but I can't get anywhere.
Can you think of a way to solve them? Maybe a substitution that does the work, without complex numbers. Thank you!
$$I={\displaystyle \int\frac{(x^{2}-1)}{(x^{2}+1)\sqrt{x^{4}+1}}dx}$$
So far.
Let $u=x^{2}$ then, $du= 2xdx$ then
$$I=\int\frac{(x^{2}-1)}{(x^{2}+1)\sqrt{x^{4}+1}}dx= 2\int\frac{(u-1)(\sqrt{u})}{(u+1)(\sqrt{u^{2}+1}}du$$
Then, using trigonometric substitution:
$\tan(\theta)=u$ so $du = \sec^{2}(\theta)d\theta$ we get
$$I=2\int\frac{(\tan(\theta)-1)(\sqrt{\tan(\theta)})\sec^{2}(\theta)}{(\tan(\theta)+1)(\sqrt{\tan^{2}(\theta)+1}}d\theta= 2\int\frac{(\tan(\theta)-1)(\sqrt{\tan(\theta)})Sec(\theta)}{(\tan(\theta)+1)}d\theta$$
But I feel lost. Is my procedure ok? What can I do next?
\begin{aligned}\int{\frac{x^{2}-1}{\left(x^{2}+1\right)\sqrt{x^{4}+1}}\,\mathrm{d}x}&=\int{\frac{x^{2}-1}{x\left(x^{2}+1\right)\sqrt{x^{2}+\frac{1}{x^{2}}}}\,\mathrm{d}x}\\ &=\int{\frac{\left(1-\frac{1}{x^{2}}\right)\mathrm{d}x}{\left(x+\frac{1}{x}\right)\sqrt{\left(x+\frac{1}{x}\right)^{2}-2}}}\\ &=\int{\frac{\mathrm{d}y}{y\sqrt{y^{2}-2}}}\end{aligned}
You have probably noticed that we substituted $ y=x+\frac{1}{x} $, now let's solve the integral we got by using another substitution : $\small\left\lbrace\begin{aligned}y&=\sqrt{2}\cosh{t}\\ \mathrm{d}t&=\frac{\mathrm{d}y}{\sqrt{y^{2}-2}}\end{aligned}\right. $, to get : \begin{aligned} \int{\frac{x^{2}-1}{\left(x^{2}+1\right)\sqrt{x^{4}+1}}\,\mathrm{d}x}&=\frac{1}{\sqrt{2}}\int{\frac{\mathrm{d}t}{\sinh{t}}}\\ &=\frac{1}{\sqrt{2}}\int{\frac{\sinh{t}\,\mathrm{d}t}{\cosh^{2}{t}-1}}\\ &=\frac{1}{\sqrt{2}}\int{\frac{\mathrm{d}\varphi}{\varphi^{2}-1}} \end{aligned}
I'll leave the rest to you.