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

Optimal. Leaf size=121 \[ i \tan ^{-1}(x) \operatorname {PolyLog}\left (2,-i e^{i \tan ^{-1}(x)}\right )-i \tan ^{-1}(x) \operatorname {PolyLog}\left (2,i e^{i \tan ^{-1}(x)}\right )-\operatorname {PolyLog}\left (3,-i e^{i \tan ^{-1}(x)}\right )+\operatorname {PolyLog}\left (3,i e^{i \tan ^{-1}(x)}\right )+\frac {1}{2} x \sqrt {x^2+1} \tan ^{-1}(x)^2-\sqrt {x^2+1} \tan ^{-1}(x)-i \tan ^{-1}\left (e^{i \tan ^{-1}(x)}\right ) \tan ^{-1}(x)^2+\sinh ^{-1}(x) \]

[Out]

arcsinh(x)-I*arctan((1+I*x)/(x^2+1)^(1/2))*arctan(x)^2+I*arctan(x)*polylog(2,-I*(1+I*x)/(x^2+1)^(1/2))-I*arcta
n(x)*polylog(2,I*(1+I*x)/(x^2+1)^(1/2))-polylog(3,-I*(1+I*x)/(x^2+1)^(1/2))+polylog(3,I*(1+I*x)/(x^2+1)^(1/2))
-arctan(x)*(x^2+1)^(1/2)+1/2*x*arctan(x)^2*(x^2+1)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.11, antiderivative size = 121, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 7, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {4880, 4888, 4181, 2531, 2282, 6589, 215} \[ i \tan ^{-1}(x) \text {PolyLog}\left (2,-i e^{i \tan ^{-1}(x)}\right )-i \tan ^{-1}(x) \text {PolyLog}\left (2,i e^{i \tan ^{-1}(x)}\right )-\text {PolyLog}\left (3,-i e^{i \tan ^{-1}(x)}\right )+\text {PolyLog}\left (3,i e^{i \tan ^{-1}(x)}\right )+\frac {1}{2} x \sqrt {x^2+1} \tan ^{-1}(x)^2-\sqrt {x^2+1} \tan ^{-1}(x)-i \tan ^{-1}\left (e^{i \tan ^{-1}(x)}\right ) \tan ^{-1}(x)^2+\sinh ^{-1}(x) \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[1 + x^2]*ArcTan[x]^2,x]

[Out]

ArcSinh[x] - Sqrt[1 + x^2]*ArcTan[x] + (x*Sqrt[1 + x^2]*ArcTan[x]^2)/2 - I*ArcTan[E^(I*ArcTan[x])]*ArcTan[x]^2
 + I*ArcTan[x]*PolyLog[2, (-I)*E^(I*ArcTan[x])] - I*ArcTan[x]*PolyLog[2, I*E^(I*ArcTan[x])] - PolyLog[3, (-I)*
E^(I*ArcTan[x])] + PolyLog[3, I*E^(I*ArcTan[x])]

Rule 215

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

Rule 2282

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]

Rule 2531

Int[Log[1 + (e_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.)]*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> -Simp[((
f + g*x)^m*PolyLog[2, -(e*(F^(c*(a + b*x)))^n)])/(b*c*n*Log[F]), x] + Dist[(g*m)/(b*c*n*Log[F]), Int[(f + g*x)
^(m - 1)*PolyLog[2, -(e*(F^(c*(a + b*x)))^n)], x], x] /; FreeQ[{F, a, b, c, e, f, g, n}, x] && GtQ[m, 0]

Rule 4181

Int[csc[(e_.) + Pi*(k_.) + (f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(-2*(c + d*x)^m*ArcTanh[E
^(I*k*Pi)*E^(I*(e + f*x))])/f, x] + (-Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Log[1 - E^(I*k*Pi)*E^(I*(e + f*x))],
 x], x] + Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Log[1 + E^(I*k*Pi)*E^(I*(e + f*x))], x], x]) /; FreeQ[{c, d, e,
f}, x] && IntegerQ[2*k] && IGtQ[m, 0]

Rule 4880

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_)*((d_) + (e_.)*(x_)^2)^(q_.), x_Symbol] :> -Simp[(b*p*(d + e*x^2)^q
*(a + b*ArcTan[c*x])^(p - 1))/(2*c*q*(2*q + 1)), x] + (Dist[(2*d*q)/(2*q + 1), Int[(d + e*x^2)^(q - 1)*(a + b*
ArcTan[c*x])^p, x], x] + Dist[(b^2*d*p*(p - 1))/(2*q*(2*q + 1)), Int[(d + e*x^2)^(q - 1)*(a + b*ArcTan[c*x])^(
p - 2), x], x] + Simp[(x*(d + e*x^2)^q*(a + b*ArcTan[c*x])^p)/(2*q + 1), x]) /; FreeQ[{a, b, c, d, e}, x] && E
qQ[e, c^2*d] && GtQ[q, 0] && GtQ[p, 1]

Rule 4888

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/Sqrt[(d_) + (e_.)*(x_)^2], x_Symbol] :> Dist[1/(c*Sqrt[d]), Subst
[Int[(a + b*x)^p*Sec[x], x], x, ArcTan[c*x]], x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[e, c^2*d] && IGtQ[p, 0] &
& GtQ[d, 0]

Rule 6589

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rubi steps

\begin {align*} \int \sqrt {1+x^2} \tan ^{-1}(x)^2 \, dx &=-\sqrt {1+x^2} \tan ^{-1}(x)+\frac {1}{2} x \sqrt {1+x^2} \tan ^{-1}(x)^2+\frac {1}{2} \int \frac {\tan ^{-1}(x)^2}{\sqrt {1+x^2}} \, dx+\int \frac {1}{\sqrt {1+x^2}} \, dx\\ &=\sinh ^{-1}(x)-\sqrt {1+x^2} \tan ^{-1}(x)+\frac {1}{2} x \sqrt {1+x^2} \tan ^{-1}(x)^2+\frac {1}{2} \operatorname {Subst}\left (\int x^2 \sec (x) \, dx,x,\tan ^{-1}(x)\right )\\ &=\sinh ^{-1}(x)-\sqrt {1+x^2} \tan ^{-1}(x)+\frac {1}{2} x \sqrt {1+x^2} \tan ^{-1}(x)^2-i \tan ^{-1}\left (e^{i \tan ^{-1}(x)}\right ) \tan ^{-1}(x)^2-\operatorname {Subst}\left (\int x \log \left (1-i e^{i x}\right ) \, dx,x,\tan ^{-1}(x)\right )+\operatorname {Subst}\left (\int x \log \left (1+i e^{i x}\right ) \, dx,x,\tan ^{-1}(x)\right )\\ &=\sinh ^{-1}(x)-\sqrt {1+x^2} \tan ^{-1}(x)+\frac {1}{2} x \sqrt {1+x^2} \tan ^{-1}(x)^2-i \tan ^{-1}\left (e^{i \tan ^{-1}(x)}\right ) \tan ^{-1}(x)^2+i \tan ^{-1}(x) \text {Li}_2\left (-i e^{i \tan ^{-1}(x)}\right )-i \tan ^{-1}(x) \text {Li}_2\left (i e^{i \tan ^{-1}(x)}\right )-i \operatorname {Subst}\left (\int \text {Li}_2\left (-i e^{i x}\right ) \, dx,x,\tan ^{-1}(x)\right )+i \operatorname {Subst}\left (\int \text {Li}_2\left (i e^{i x}\right ) \, dx,x,\tan ^{-1}(x)\right )\\ &=\sinh ^{-1}(x)-\sqrt {1+x^2} \tan ^{-1}(x)+\frac {1}{2} x \sqrt {1+x^2} \tan ^{-1}(x)^2-i \tan ^{-1}\left (e^{i \tan ^{-1}(x)}\right ) \tan ^{-1}(x)^2+i \tan ^{-1}(x) \text {Li}_2\left (-i e^{i \tan ^{-1}(x)}\right )-i \tan ^{-1}(x) \text {Li}_2\left (i e^{i \tan ^{-1}(x)}\right )-\operatorname {Subst}\left (\int \frac {\text {Li}_2(-i x)}{x} \, dx,x,e^{i \tan ^{-1}(x)}\right )+\operatorname {Subst}\left (\int \frac {\text {Li}_2(i x)}{x} \, dx,x,e^{i \tan ^{-1}(x)}\right )\\ &=\sinh ^{-1}(x)-\sqrt {1+x^2} \tan ^{-1}(x)+\frac {1}{2} x \sqrt {1+x^2} \tan ^{-1}(x)^2-i \tan ^{-1}\left (e^{i \tan ^{-1}(x)}\right ) \tan ^{-1}(x)^2+i \tan ^{-1}(x) \text {Li}_2\left (-i e^{i \tan ^{-1}(x)}\right )-i \tan ^{-1}(x) \text {Li}_2\left (i e^{i \tan ^{-1}(x)}\right )-\text {Li}_3\left (-i e^{i \tan ^{-1}(x)}\right )+\text {Li}_3\left (i e^{i \tan ^{-1}(x)}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.22, size = 131, normalized size = 1.08 \[ i \tan ^{-1}(x) \operatorname {PolyLog}\left (2,-i e^{i \tan ^{-1}(x)}\right )-i \tan ^{-1}(x) \operatorname {PolyLog}\left (2,i e^{i \tan ^{-1}(x)}\right )-\operatorname {PolyLog}\left (3,-i e^{i \tan ^{-1}(x)}\right )+\operatorname {PolyLog}\left (3,i e^{i \tan ^{-1}(x)}\right )+\frac {1}{2} x \sqrt {x^2+1} \tan ^{-1}(x)^2-\sqrt {x^2+1} \tan ^{-1}(x)+\tanh ^{-1}\left (\frac {x}{\sqrt {x^2+1}}\right )-i \tan ^{-1}\left (e^{i \tan ^{-1}(x)}\right ) \tan ^{-1}(x)^2 \]

Warning: Unable to verify antiderivative.

[In]

Integrate[Sqrt[1 + x^2]*ArcTan[x]^2,x]

[Out]

-(Sqrt[1 + x^2]*ArcTan[x]) + (x*Sqrt[1 + x^2]*ArcTan[x]^2)/2 - I*ArcTan[E^(I*ArcTan[x])]*ArcTan[x]^2 + ArcTanh
[x/Sqrt[1 + x^2]] + I*ArcTan[x]*PolyLog[2, (-I)*E^(I*ArcTan[x])] - I*ArcTan[x]*PolyLog[2, I*E^(I*ArcTan[x])] -
 PolyLog[3, (-I)*E^(I*ArcTan[x])] + PolyLog[3, I*E^(I*ArcTan[x])]

________________________________________________________________________________________

fricas [F]  time = 0.44, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\sqrt {x^{2} + 1} \arctan \relax (x)^{2}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integral(sqrt(x^2 + 1)*arctan(x)^2, x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {x^{2} + 1} \arctan \relax (x)^{2}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate(sqrt(x^2 + 1)*arctan(x)^2, x)

________________________________________________________________________________________

maple [A]  time = 0.38, size = 171, normalized size = 1.41 \[ \frac {\arctan \relax (x )^{2} \ln \left (1-\frac {i \left (i x +1\right )}{\sqrt {x^{2}+1}}\right )}{2}-\frac {\arctan \relax (x )^{2} \ln \left (1+\frac {i \left (i x +1\right )}{\sqrt {x^{2}+1}}\right )}{2}+i \polylog \left (2, -\frac {i \left (i x +1\right )}{\sqrt {x^{2}+1}}\right ) \arctan \relax (x )-i \polylog \left (2, \frac {i \left (i x +1\right )}{\sqrt {x^{2}+1}}\right ) \arctan \relax (x )-\polylog \left (3, -\frac {i \left (i x +1\right )}{\sqrt {x^{2}+1}}\right )+\polylog \left (3, \frac {i \left (i x +1\right )}{\sqrt {x^{2}+1}}\right )+\frac {\sqrt {x^{2}+1}\, \left (x \arctan \relax (x )-2\right ) \arctan \relax (x )}{2}-2 i \arctan \left (\frac {i x +1}{\sqrt {x^{2}+1}}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*(x^2+1)^(1/2)*arctan(x)*(x*arctan(x)-2)-1/2*arctan(x)^2*ln(1+I*(1+I*x)/(x^2+1)^(1/2))+1/2*arctan(x)^2*ln(1
-I*(1+I*x)/(x^2+1)^(1/2))+I*arctan(x)*polylog(2,-I*(1+I*x)/(x^2+1)^(1/2))-I*arctan(x)*polylog(2,I*(1+I*x)/(x^2
+1)^(1/2))-polylog(3,-I*(1+I*x)/(x^2+1)^(1/2))+polylog(3,I*(1+I*x)/(x^2+1)^(1/2))-2*I*arctan((1+I*x)/(x^2+1)^(
1/2))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {x^{2} + 1} \arctan \relax (x)^{2}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate(sqrt(x^2 + 1)*arctan(x)^2, x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int {\mathrm {atan}\relax (x)}^2\,\sqrt {x^2+1} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {x^{2} + 1} \operatorname {atan}^{2}{\relax (x )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral(sqrt(x**2 + 1)*atan(x)**2, x)

________________________________________________________________________________________