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

Optimal. Leaf size=121 \[ 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) \]

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

________________________________________________________________________________________

Rubi [A]  time = 0.109459, antiderivative size = 121, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 7, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5, 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 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 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 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 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 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]

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]

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.194612, size = 131, normalized size = 1.08 \[ 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)+\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])]

________________________________________________________________________________________

Maple [A]  time = 0.266, size = 171, normalized size = 1.4 \begin{align*}{\frac{\arctan \left ( x \right ) \left ( x\arctan \left ( x \right ) -2 \right ) }{2}\sqrt{{x}^{2}+1}}+{\frac{ \left ( \arctan \left ( x \right ) \right ) ^{2}}{2}\ln \left ( 1-{i \left ( 1+ix \right ){\frac{1}{\sqrt{{x}^{2}+1}}}} \right ) }-{\frac{ \left ( \arctan \left ( x \right ) \right ) ^{2}}{2}\ln \left ( 1+{i \left ( 1+ix \right ){\frac{1}{\sqrt{{x}^{2}+1}}}} \right ) }-i\arctan \left ( x \right ){\it polylog} \left ( 2,{i \left ( 1+ix \right ){\frac{1}{\sqrt{{x}^{2}+1}}}} \right ) +{\it polylog} \left ( 3,{i \left ( 1+ix \right ){\frac{1}{\sqrt{{x}^{2}+1}}}} \right ) +i\arctan \left ( x \right ){\it polylog} \left ( 2,{-i \left ( 1+ix \right ){\frac{1}{\sqrt{{x}^{2}+1}}}} \right ) -{\it polylog} \left ( 3,{-i \left ( 1+ix \right ){\frac{1}{\sqrt{{x}^{2}+1}}}} \right ) -2\,i\arctan \left ({(1+ix){\frac{1}{\sqrt{{x}^{2}+1}}}} \right ) \end{align*}

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))+polylog(3,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))-2*I*arctan((1+I*x)/(x^2+1)^(
1/2))

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{x^{2} + 1} \arctan \left (x\right )^{2}\,{d x} \end{align*}

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)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\sqrt{x^{2} + 1} \arctan \left (x\right )^{2}, x\right ) \end{align*}

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)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{x^{2} + 1} \operatorname{atan}^{2}{\left (x \right )}\, dx \end{align*}

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)

________________________________________________________________________________________

Giac [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: TypeError