Optimal. Leaf size=55 \[ -\frac{\log \left (x^2-\sqrt{2} x+1\right )}{2 \sqrt{2}}-x \tan ^{-1}\left (1-\sqrt{2} x\right )+\frac{\tan ^{-1}\left (1-\sqrt{2} x\right )}{\sqrt{2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0277273, antiderivative size = 55, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {5203, 12, 634, 617, 204, 628} \[ -\frac{\log \left (x^2-\sqrt{2} x+1\right )}{2 \sqrt{2}}-x \tan ^{-1}\left (1-\sqrt{2} x\right )+\frac{\tan ^{-1}\left (1-\sqrt{2} x\right )}{\sqrt{2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 5203
Rule 12
Rule 634
Rule 617
Rule 204
Rule 628
Rubi steps
\begin{align*} \int \tan ^{-1}\left (\frac{-\sqrt{2}+2 x}{\sqrt{2}}\right ) \, dx &=-x \tan ^{-1}\left (1-\sqrt{2} x\right )-\int \frac{x}{\sqrt{2} \left (1-\sqrt{2} x+x^2\right )} \, dx\\ &=-x \tan ^{-1}\left (1-\sqrt{2} x\right )-\frac{\int \frac{x}{1-\sqrt{2} x+x^2} \, dx}{\sqrt{2}}\\ &=-x \tan ^{-1}\left (1-\sqrt{2} x\right )-\frac{1}{2} \int \frac{1}{1-\sqrt{2} x+x^2} \, dx-\frac{\int \frac{-\sqrt{2}+2 x}{1-\sqrt{2} x+x^2} \, dx}{2 \sqrt{2}}\\ &=-x \tan ^{-1}\left (1-\sqrt{2} x\right )-\frac{\log \left (1-\sqrt{2} x+x^2\right )}{2 \sqrt{2}}-\frac{\operatorname{Subst}\left (\int \frac{1}{-1-x^2} \, dx,x,1-\sqrt{2} x\right )}{\sqrt{2}}\\ &=\frac{\tan ^{-1}\left (1-\sqrt{2} x\right )}{\sqrt{2}}-x \tan ^{-1}\left (1-\sqrt{2} x\right )-\frac{\log \left (1-\sqrt{2} x+x^2\right )}{2 \sqrt{2}}\\ \end{align*}
Mathematica [A] time = 0.0337808, size = 48, normalized size = 0.87 \[ \frac{1}{4} \left (2 \left (\sqrt{2}-2 x\right ) \tan ^{-1}\left (1-\sqrt{2} x\right )-\sqrt{2} \log \left (x^2-\sqrt{2} x+1\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.003, size = 42, normalized size = 0.8 \begin{align*} x\arctan \left ( -1+x\sqrt{2} \right ) -{\frac{\arctan \left ( -1+x\sqrt{2} \right ) \sqrt{2}}{2}}-{\frac{\sqrt{2}\ln \left ( \left ( -1+x\sqrt{2} \right ) ^{2}+1 \right ) }{4}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.42633, size = 70, normalized size = 1.27 \begin{align*} \frac{1}{4} \, \sqrt{2}{\left (\sqrt{2}{\left (2 \, x - \sqrt{2}\right )} \arctan \left (\frac{1}{2} \, \sqrt{2}{\left (2 \, x - \sqrt{2}\right )}\right ) - \log \left (\frac{1}{2} \,{\left (2 \, x - \sqrt{2}\right )}^{2} + 1\right )\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.91039, size = 111, normalized size = 2.02 \begin{align*} \frac{1}{2} \,{\left (2 \, x - \sqrt{2}\right )} \arctan \left (\sqrt{2} x - 1\right ) - \frac{1}{4} \, \sqrt{2} \log \left (x^{2} - \sqrt{2} x + 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 1.3012, size = 230, normalized size = 4.18 \begin{align*} \frac{4 x^{3} \operatorname{atan}{\left (\sqrt{2} x - 1 \right )}}{4 x^{2} - 4 \sqrt{2} x + 4} - \frac{\sqrt{2} x^{2} \log{\left (x^{2} - \sqrt{2} x + 1 \right )}}{4 x^{2} - 4 \sqrt{2} x + 4} - \frac{6 \sqrt{2} x^{2} \operatorname{atan}{\left (\sqrt{2} x - 1 \right )}}{4 x^{2} - 4 \sqrt{2} x + 4} + \frac{2 x \log{\left (x^{2} - \sqrt{2} x + 1 \right )}}{4 x^{2} - 4 \sqrt{2} x + 4} + \frac{8 x \operatorname{atan}{\left (\sqrt{2} x - 1 \right )}}{4 x^{2} - 4 \sqrt{2} x + 4} - \frac{\sqrt{2} \log{\left (x^{2} - \sqrt{2} x + 1 \right )}}{4 x^{2} - 4 \sqrt{2} x + 4} - \frac{2 \sqrt{2} \operatorname{atan}{\left (\sqrt{2} x - 1 \right )}}{4 x^{2} - 4 \sqrt{2} x + 4} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.07475, size = 70, normalized size = 1.27 \begin{align*} \frac{1}{4} \, \sqrt{2}{\left (\sqrt{2}{\left (2 \, x - \sqrt{2}\right )} \arctan \left (\frac{1}{2} \, \sqrt{2}{\left (2 \, x - \sqrt{2}\right )}\right ) - \log \left (\frac{1}{2} \,{\left (2 \, x - \sqrt{2}\right )}^{2} + 1\right )\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]