<s>[INST] Integral $\int \frac{2x^2-1}{\pm x(2x^2-1)+2x+ \sqrt{1+2x^2}} d x$ Consider the indefinite integral
$$F_{\pm}(x):=\int \frac{2x^2-1}{\pm x(2x^2-1)+2x+ \sqrt{1+2x^2}} \mathbb{d} x.$$
For all $x\in \mathbb{R}$ it is
$$ F_{+}(x)=  \log(-x + \sqrt{1 + 2 x^2}).$$
But what is $F_{-}$?
Note that numerical studies suggest that it does exist in a certain range. Math software already struggles to prove the formula for $F_{+}$.
 [/INST] The problem is $$F_\pm(x)=\int\frac{2x^2-1}{\pm x(2x^2-1)+2x+\sqrt{1+2x^2}}\,\mathrm{d}x.$$ Let $x=2t/(2-t^2)$, then $$\begin{aligned}F_+(t)&=2\int\bigg(\frac{t}{2-t^2}+\frac{1+t}{t^2+2t+2}\bigg)\,\mathrm{d}t,\\F_-(t)&=2\int\bigg(\frac{t}{t^2-2}-\frac{t^3-t^2-6t-2}{t^4-2t^3-12t^2-4t+4}\bigg)\,\mathrm{d}t.\end{aligned}$$ You can integrate $F_+$ directly: $$F_+(t)=-\log(2-t^2)+\log(t^2+2t+2)+C.$$
For $F_-$ you need only solve a quadratic equation to factor the denominator and then integrate directly: $$\begin{aligned}F_-(t)=\log(2-t^2)&+\frac{-17+\sqrt{17}}{34}\log(t^2+(\sqrt{17}-1)t+2)\\&+\frac{-17-\sqrt{17}}{34}\log(-t^2+(\sqrt{17}+1)t-2)+C.\end{aligned}$$
After this, solve a quadratic equation to get a formula for $F_\pm(x)$.
</s>