\(\int \sqrt {1+x^2} \arctan (x)^2 \, dx\) [35]

Optimal result
Mathematica [A] (warning: unable to verify)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [F]
Sympy [F]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 14, antiderivative size = 121 \[ \int \sqrt {1+x^2} \arctan (x)^2 \, dx=\text {arcsinh}(x)-\sqrt {1+x^2} \arctan (x)+\frac {1}{2} x \sqrt {1+x^2} \arctan (x)^2-i \arctan \left (e^{i \arctan (x)}\right ) \arctan (x)^2+i \arctan (x) \operatorname {PolyLog}\left (2,-i e^{i \arctan (x)}\right )-i \arctan (x) \operatorname {PolyLog}\left (2,i e^{i \arctan (x)}\right )-\operatorname {PolyLog}\left (3,-i e^{i \arctan (x)}\right )+\operatorname {PolyLog}\left (3,i e^{i \arctan (x)}\right ) \] Output:

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

Mathematica [A] (warning: unable to verify)

Time = 0.14 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.08 \[ \int \sqrt {1+x^2} \arctan (x)^2 \, dx=\coth ^{-1}\left (\frac {x}{\sqrt {1+x^2}}\right )-\sqrt {1+x^2} \arctan (x)+\frac {1}{2} x \sqrt {1+x^2} \arctan (x)^2-i \arctan \left (e^{i \arctan (x)}\right ) \arctan (x)^2+i \arctan (x) \operatorname {PolyLog}\left (2,-i e^{i \arctan (x)}\right )-i \arctan (x) \operatorname {PolyLog}\left (2,i e^{i \arctan (x)}\right )-\operatorname {PolyLog}\left (3,-i e^{i \arctan (x)}\right )+\operatorname {PolyLog}\left (3,i e^{i \arctan (x)}\right ) \] Input:

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

Output:

ArcCoth[x/Sqrt[1 + x^2]] - Sqrt[1 + x^2]*ArcTan[x] + (x*Sqrt[1 + x^2]*ArcT 
an[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])] - Poly 
Log[3, (-I)*E^(I*ArcTan[x])] + PolyLog[3, I*E^(I*ArcTan[x])]
 

Rubi [A] (verified)

Time = 0.53 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.11, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.571, Rules used = {5415, 222, 5423, 3042, 4669, 3011, 2720, 7143}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \sqrt {x^2+1} \arctan (x)^2 \, dx\)

\(\Big \downarrow \) 5415

\(\displaystyle \frac {1}{2} \int \frac {\arctan (x)^2}{\sqrt {x^2+1}}dx+\int \frac {1}{\sqrt {x^2+1}}dx+\frac {1}{2} x \sqrt {x^2+1} \arctan (x)^2-\sqrt {x^2+1} \arctan (x)\)

\(\Big \downarrow \) 222

\(\displaystyle \frac {1}{2} \int \frac {\arctan (x)^2}{\sqrt {x^2+1}}dx+\text {arcsinh}(x)+\frac {1}{2} x \sqrt {x^2+1} \arctan (x)^2-\sqrt {x^2+1} \arctan (x)\)

\(\Big \downarrow \) 5423

\(\displaystyle \frac {1}{2} \int \sqrt {x^2+1} \arctan (x)^2d\arctan (x)+\text {arcsinh}(x)+\frac {1}{2} x \sqrt {x^2+1} \arctan (x)^2-\sqrt {x^2+1} \arctan (x)\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{2} \int \arctan (x)^2 \csc \left (\arctan (x)+\frac {\pi }{2}\right )d\arctan (x)+\text {arcsinh}(x)+\frac {1}{2} x \sqrt {x^2+1} \arctan (x)^2-\sqrt {x^2+1} \arctan (x)\)

\(\Big \downarrow \) 4669

\(\displaystyle \frac {1}{2} \left (-2 \int \arctan (x) \log \left (1-i e^{i \arctan (x)}\right )d\arctan (x)+2 \int \arctan (x) \log \left (1+i e^{i \arctan (x)}\right )d\arctan (x)-2 i \arctan \left (e^{i \arctan (x)}\right ) \arctan (x)^2\right )+\text {arcsinh}(x)+\frac {1}{2} x \sqrt {x^2+1} \arctan (x)^2-\sqrt {x^2+1} \arctan (x)\)

\(\Big \downarrow \) 3011

\(\displaystyle \frac {1}{2} \left (2 \left (i \arctan (x) \operatorname {PolyLog}\left (2,-i e^{i \arctan (x)}\right )-i \int \operatorname {PolyLog}\left (2,-i e^{i \arctan (x)}\right )d\arctan (x)\right )-2 \left (i \arctan (x) \operatorname {PolyLog}\left (2,i e^{i \arctan (x)}\right )-i \int \operatorname {PolyLog}\left (2,i e^{i \arctan (x)}\right )d\arctan (x)\right )-2 i \arctan \left (e^{i \arctan (x)}\right ) \arctan (x)^2\right )+\text {arcsinh}(x)+\frac {1}{2} x \sqrt {x^2+1} \arctan (x)^2-\sqrt {x^2+1} \arctan (x)\)

\(\Big \downarrow \) 2720

\(\displaystyle \frac {1}{2} \left (2 \left (i \arctan (x) \operatorname {PolyLog}\left (2,-i e^{i \arctan (x)}\right )-\int e^{-i \arctan (x)} \operatorname {PolyLog}\left (2,-i e^{i \arctan (x)}\right )de^{i \arctan (x)}\right )-2 \left (i \arctan (x) \operatorname {PolyLog}\left (2,i e^{i \arctan (x)}\right )-\int e^{-i \arctan (x)} \operatorname {PolyLog}\left (2,i e^{i \arctan (x)}\right )de^{i \arctan (x)}\right )-2 i \arctan \left (e^{i \arctan (x)}\right ) \arctan (x)^2\right )+\text {arcsinh}(x)+\frac {1}{2} x \sqrt {x^2+1} \arctan (x)^2-\sqrt {x^2+1} \arctan (x)\)

\(\Big \downarrow \) 7143

\(\displaystyle \text {arcsinh}(x)+\frac {1}{2} \left (2 \left (i \arctan (x) \operatorname {PolyLog}\left (2,-i e^{i \arctan (x)}\right )-\operatorname {PolyLog}\left (3,-i e^{i \arctan (x)}\right )\right )-2 \left (i \arctan (x) \operatorname {PolyLog}\left (2,i e^{i \arctan (x)}\right )-\operatorname {PolyLog}\left (3,i e^{i \arctan (x)}\right )\right )-2 i \arctan \left (e^{i \arctan (x)}\right ) \arctan (x)^2\right )+\frac {1}{2} x \sqrt {x^2+1} \arctan (x)^2-\sqrt {x^2+1} \arctan (x)\)

Input:

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

Output:

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

Defintions of rubi rules used

rule 222
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 2720
Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Simp[v/D[v, x] 
   Subst[Int[FunctionOfExponentialFunction[u, x]/x, x], x, v], x]] /; Funct 
ionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; FreeQ 
[{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 3011
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] + Simp[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 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4669
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] + (-Si 
mp[d*(m/f)   Int[(c + d*x)^(m - 1)*Log[1 - E^(I*k*Pi)*E^(I*(e + f*x))], x], 
 x] + Simp[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 5415
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] + (Simp[x*(d + e*x^2)^q*((a + b*ArcTan[c*x])^p/(2*q + 1)), x] 
 + Simp[2*d*(q/(2*q + 1))   Int[(d + e*x^2)^(q - 1)*(a + b*ArcTan[c*x])^p, 
x], x] + Simp[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]) /; FreeQ[{a, b, c, d, e}, x] && EqQ[e, 
c^2*d] && GtQ[q, 0] && GtQ[p, 1]
 

rule 5423
Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/Sqrt[(d_) + (e_.)*(x_)^2], x_S 
ymbol] :> Simp[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] && Gt 
Q[d, 0]
 

rule 7143
Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_S 
ymbol] :> 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]
 
Maple [A] (verified)

Time = 0.47 (sec) , antiderivative size = 178, normalized size of antiderivative = 1.47

method result size
default \(\frac {\left (x \arctan \left (x \right )-2\right ) \arctan \left (x \right ) \sqrt {x^{2}+1}}{2}-\frac {i \left (i \arctan \left (x \right )^{2} \ln \left (1-\frac {i \left (i x +1\right )}{\sqrt {x^{2}+1}}\right )-i \arctan \left (x \right )^{2} \ln \left (1+\frac {i \left (i x +1\right )}{\sqrt {x^{2}+1}}\right )+2 \arctan \left (x \right ) \operatorname {polylog}\left (2, \frac {i \left (i x +1\right )}{\sqrt {x^{2}+1}}\right )-2 \arctan \left (x \right ) \operatorname {polylog}\left (2, -\frac {i \left (i x +1\right )}{\sqrt {x^{2}+1}}\right )+2 i \operatorname {polylog}\left (3, \frac {i \left (i x +1\right )}{\sqrt {x^{2}+1}}\right )-2 i \operatorname {polylog}\left (3, -\frac {i \left (i x +1\right )}{\sqrt {x^{2}+1}}\right )+4 \arctan \left (\frac {i x +1}{\sqrt {x^{2}+1}}\right )\right )}{2}\) \(178\)

Input:

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

Output:

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

Fricas [F]

\[ \int \sqrt {1+x^2} \arctan (x)^2 \, dx=\int { \sqrt {x^{2} + 1} \arctan \left (x\right )^{2} \,d x } \] Input:

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

Output:

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

Sympy [F]

\[ \int \sqrt {1+x^2} \arctan (x)^2 \, dx=\int \sqrt {x^{2} + 1} \operatorname {atan}^{2}{\left (x \right )}\, dx \] Input:

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

Output:

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

Maxima [F]

\[ \int \sqrt {1+x^2} \arctan (x)^2 \, dx=\int { \sqrt {x^{2} + 1} \arctan \left (x\right )^{2} \,d x } \] Input:

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

Output:

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

Giac [F]

\[ \int \sqrt {1+x^2} \arctan (x)^2 \, dx=\int { \sqrt {x^{2} + 1} \arctan \left (x\right )^{2} \,d x } \] Input:

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

Output:

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

Mupad [F(-1)]

Timed out. \[ \int \sqrt {1+x^2} \arctan (x)^2 \, dx=\int {\mathrm {atan}\left (x\right )}^2\,\sqrt {x^2+1} \,d x \] Input:

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

Output:

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

Reduce [F]

\[ \int \sqrt {1+x^2} \arctan (x)^2 \, dx=\int \sqrt {x^{2}+1}\, \mathit {atan} \left (x \right )^{2}d x \] Input:

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

Output:

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