3.189 \(\int \tan ^{-1}(\frac{-\sqrt{2}+2 x}{\sqrt{2}}) \, dx\)

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]

ArcTan[1 - Sqrt[2]*x]/Sqrt[2] - x*ArcTan[1 - Sqrt[2]*x] - Log[1 - Sqrt[2]*x + x^2]/(2*Sqrt[2])

________________________________________________________________________________________

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]

Int[ArcTan[(-Sqrt[2] + 2*x)/Sqrt[2]],x]

[Out]

ArcTan[1 - Sqrt[2]*x]/Sqrt[2] - x*ArcTan[1 - Sqrt[2]*x] - Log[1 - Sqrt[2]*x + x^2]/(2*Sqrt[2])

Rule 5203

Int[ArcTan[u_], x_Symbol] :> Simp[x*ArcTan[u], x] - Int[SimplifyIntegrand[(x*D[u, x])/(1 + u^2), x], x] /; Inv
erseFunctionFreeQ[u, x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 617

Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = 1 - 4*Simplify[(a*c)/b^2]}, Dist[-2/b, Sub
st[Int[1/(q - x^2), x], x, 1 + (2*c*x)/b], x] /; RationalQ[q] && (EqQ[q^2, 1] ||  !RationalQ[b^2 - 4*a*c])] /;
 FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

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]

Integrate[ArcTan[(-Sqrt[2] + 2*x)/Sqrt[2]],x]

[Out]

(2*(Sqrt[2] - 2*x)*ArcTan[1 - Sqrt[2]*x] - Sqrt[2]*Log[1 - Sqrt[2]*x + x^2])/4

________________________________________________________________________________________

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]

int(arctan(1/2*(2*x-2^(1/2))*2^(1/2)),x)

[Out]

x*arctan(-1+x*2^(1/2))-1/2*arctan(-1+x*2^(1/2))*2^(1/2)-1/4*2^(1/2)*ln((-1+x*2^(1/2))^2+1)

________________________________________________________________________________________

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]

integrate(arctan(1/2*(2*x-2^(1/2))*2^(1/2)),x, algorithm="maxima")

[Out]

1/4*sqrt(2)*(sqrt(2)*(2*x - sqrt(2))*arctan(1/2*sqrt(2)*(2*x - sqrt(2))) - log(1/2*(2*x - sqrt(2))^2 + 1))

________________________________________________________________________________________

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]

integrate(arctan(1/2*(2*x-2^(1/2))*2^(1/2)),x, algorithm="fricas")

[Out]

1/2*(2*x - sqrt(2))*arctan(sqrt(2)*x - 1) - 1/4*sqrt(2)*log(x^2 - sqrt(2)*x + 1)

________________________________________________________________________________________

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]

integrate(atan(1/2*(2*x-2**(1/2))*2**(1/2)),x)

[Out]

4*x**3*atan(sqrt(2)*x - 1)/(4*x**2 - 4*sqrt(2)*x + 4) - sqrt(2)*x**2*log(x**2 - sqrt(2)*x + 1)/(4*x**2 - 4*sqr
t(2)*x + 4) - 6*sqrt(2)*x**2*atan(sqrt(2)*x - 1)/(4*x**2 - 4*sqrt(2)*x + 4) + 2*x*log(x**2 - sqrt(2)*x + 1)/(4
*x**2 - 4*sqrt(2)*x + 4) + 8*x*atan(sqrt(2)*x - 1)/(4*x**2 - 4*sqrt(2)*x + 4) - sqrt(2)*log(x**2 - sqrt(2)*x +
 1)/(4*x**2 - 4*sqrt(2)*x + 4) - 2*sqrt(2)*atan(sqrt(2)*x - 1)/(4*x**2 - 4*sqrt(2)*x + 4)

________________________________________________________________________________________

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]

integrate(arctan(1/2*(2*x-2^(1/2))*2^(1/2)),x, algorithm="giac")

[Out]

1/4*sqrt(2)*(sqrt(2)*(2*x - sqrt(2))*arctan(1/2*sqrt(2)*(2*x - sqrt(2))) - log(1/2*(2*x - sqrt(2))^2 + 1))