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]

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

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 55, normalized size of antiderivative = 1.00, 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 12

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

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 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 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]

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 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]

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.04, 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

________________________________________________________________________________________

fricas [A]  time = 0.46, size = 37, normalized size = 0.67 \[ \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 ) \]

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)

________________________________________________________________________________________

giac [A]  time = 1.14, size = 52, normalized size = 0.95 \[ \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 )} \]

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))

________________________________________________________________________________________

maple [A]  time = 0.01, size = 42, normalized size = 0.76 \[ x \arctan \left (\sqrt {2}\, x -1\right )-\frac {\sqrt {2}\, \arctan \left (\sqrt {2}\, x -1\right )}{2}-\frac {\sqrt {2}\, \ln \left (\left (\sqrt {2}\, x -1\right )^{2}+1\right )}{4} \]

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(2^(1/2)*x-1)-1/2*2^(1/2)*arctan(2^(1/2)*x-1)-1/4*2^(1/2)*ln((2^(1/2)*x-1)^2+1)

________________________________________________________________________________________

maxima [A]  time = 0.97, size = 52, normalized size = 0.95 \[ \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 )} \]

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))

________________________________________________________________________________________

mupad [B]  time = 0.16, size = 43, normalized size = 0.78 \[ \mathrm {atan}\left (\frac {\sqrt {2}\,\left (2\,x-\sqrt {2}\right )}{2}\right )\,\left (x-\frac {\sqrt {2}}{2}\right )-\frac {\sqrt {2}\,\ln \left ({\left (2\,x-\sqrt {2}\right )}^2+2\right )}{4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [B]  time = 1.05, size = 230, normalized size = 4.18 \[ \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} \]

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)

________________________________________________________________________________________