\(\int \frac {\arctan (a x)^2}{x^2 \sqrt {c+a^2 c x^2}} \, dx\) [336]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [F]
Sympy [F]
Maxima [F]
Giac [F(-2)]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 24, antiderivative size = 208 \[ \int \frac {\arctan (a x)^2}{x^2 \sqrt {c+a^2 c x^2}} \, dx=-\frac {\sqrt {c+a^2 c x^2} \arctan (a x)^2}{c x}-\frac {4 a \sqrt {1+a^2 x^2} \arctan (a x) \text {arctanh}\left (\frac {\sqrt {1+i a x}}{\sqrt {1-i a x}}\right )}{\sqrt {c+a^2 c x^2}}+\frac {2 i a \sqrt {1+a^2 x^2} \operatorname {PolyLog}\left (2,-\frac {\sqrt {1+i a x}}{\sqrt {1-i a x}}\right )}{\sqrt {c+a^2 c x^2}}-\frac {2 i a \sqrt {1+a^2 x^2} \operatorname {PolyLog}\left (2,\frac {\sqrt {1+i a x}}{\sqrt {1-i a x}}\right )}{\sqrt {c+a^2 c x^2}} \] Output:

-(a^2*c*x^2+c)^(1/2)*arctan(a*x)^2/c/x-4*a*(a^2*x^2+1)^(1/2)*arctan(a*x)*a 
rctanh((1+I*a*x)^(1/2)/(1-I*a*x)^(1/2))/(a^2*c*x^2+c)^(1/2)+2*I*a*(a^2*x^2 
+1)^(1/2)*polylog(2,-(1+I*a*x)^(1/2)/(1-I*a*x)^(1/2))/(a^2*c*x^2+c)^(1/2)- 
2*I*a*(a^2*x^2+1)^(1/2)*polylog(2,(1+I*a*x)^(1/2)/(1-I*a*x)^(1/2))/(a^2*c* 
x^2+c)^(1/2)
 

Mathematica [A] (verified)

Time = 0.42 (sec) , antiderivative size = 128, normalized size of antiderivative = 0.62 \[ \int \frac {\arctan (a x)^2}{x^2 \sqrt {c+a^2 c x^2}} \, dx=-\frac {a \sqrt {1+a^2 x^2} \left (\arctan (a x) \left (\frac {\sqrt {1+a^2 x^2} \arctan (a x)}{a x}-2 \log \left (1-e^{i \arctan (a x)}\right )+2 \log \left (1+e^{i \arctan (a x)}\right )\right )-2 i \operatorname {PolyLog}\left (2,-e^{i \arctan (a x)}\right )+2 i \operatorname {PolyLog}\left (2,e^{i \arctan (a x)}\right )\right )}{\sqrt {c \left (1+a^2 x^2\right )}} \] Input:

Integrate[ArcTan[a*x]^2/(x^2*Sqrt[c + a^2*c*x^2]),x]
 

Output:

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

Rubi [A] (verified)

Time = 0.54 (sec) , antiderivative size = 155, normalized size of antiderivative = 0.75, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {5479, 5493, 5489}

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 \frac {\arctan (a x)^2}{x^2 \sqrt {a^2 c x^2+c}} \, dx\)

\(\Big \downarrow \) 5479

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

\(\Big \downarrow \) 5493

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

\(\Big \downarrow \) 5489

\(\displaystyle -\frac {\arctan (a x)^2 \sqrt {a^2 c x^2+c}}{c x}+\frac {2 a \sqrt {a^2 x^2+1} \left (-2 \arctan (a x) \text {arctanh}\left (\frac {\sqrt {1+i a x}}{\sqrt {1-i a x}}\right )+i \operatorname {PolyLog}\left (2,-\frac {\sqrt {i a x+1}}{\sqrt {1-i a x}}\right )-i \operatorname {PolyLog}\left (2,\frac {\sqrt {i a x+1}}{\sqrt {1-i a x}}\right )\right )}{\sqrt {a^2 c x^2+c}}\)

Input:

Int[ArcTan[a*x]^2/(x^2*Sqrt[c + a^2*c*x^2]),x]
 

Output:

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

Defintions of rubi rules used

rule 5479
Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_ 
.)*(x_)^2)^(q_.), x_Symbol] :> Simp[(f*x)^(m + 1)*(d + e*x^2)^(q + 1)*((a + 
 b*ArcTan[c*x])^p/(d*f*(m + 1))), x] - Simp[b*c*(p/(f*(m + 1)))   Int[(f*x) 
^(m + 1)*(d + e*x^2)^q*(a + b*ArcTan[c*x])^(p - 1), x], x] /; FreeQ[{a, b, 
c, d, e, f, m, q}, x] && EqQ[e, c^2*d] && EqQ[m + 2*q + 3, 0] && GtQ[p, 0] 
&& NeQ[m, -1]
 

rule 5489
Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/((x_)*Sqrt[(d_) + (e_.)*(x_)^2]), x_ 
Symbol] :> Simp[(-2/Sqrt[d])*(a + b*ArcTan[c*x])*ArcTanh[Sqrt[1 + I*c*x]/Sq 
rt[1 - I*c*x]], x] + (Simp[I*(b/Sqrt[d])*PolyLog[2, -Sqrt[1 + I*c*x]/Sqrt[1 
 - I*c*x]], x] - Simp[I*(b/Sqrt[d])*PolyLog[2, Sqrt[1 + I*c*x]/Sqrt[1 - I*c 
*x]], x]) /; FreeQ[{a, b, c, d, e}, x] && EqQ[e, c^2*d] && GtQ[d, 0]
 

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

Time = 2.19 (sec) , antiderivative size = 171, normalized size of antiderivative = 0.82

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

Input:

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

Output:

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

Fricas [F]

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

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

Output:

integral(sqrt(a^2*c*x^2 + c)*arctan(a*x)^2/(a^2*c*x^4 + c*x^2), x)
 

Sympy [F]

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

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

Output:

Integral(atan(a*x)**2/(x**2*sqrt(c*(a**2*x**2 + 1))), x)
 

Maxima [F]

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

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

Output:

integrate(arctan(a*x)^2/(sqrt(a^2*c*x^2 + c)*x^2), x)
 

Giac [F(-2)]

Exception generated. \[ \int \frac {\arctan (a x)^2}{x^2 \sqrt {c+a^2 c x^2}} \, dx=\text {Exception raised: TypeError} \] Input:

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

Output:

Exception raised: TypeError >> an error occurred running a Giac command:IN 
PUT:sage2:=int(sage0,sageVARx):;OUTPUT:sym2poly/r2sym(const gen & e,const 
index_m & i,const vecteur & l) Error: Bad Argument Value
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

int(atan(a*x)**2/(sqrt(a**2*x**2 + 1)*x**2),x)/sqrt(c)