\(\int \frac {(a+b \arctan (c x))^2}{(d+e x^2)^2} \, dx\) [1269]

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

Optimal result

Integrand size = 20, antiderivative size = 1039 \[ \int \frac {(a+b \arctan (c x))^2}{\left (d+e x^2\right )^2} \, dx =\text {Too large to display} \] Output:

1/4*I*b*(a+b*arctan(c*x))*polylog(2,1-2*c*((-d)^(1/2)-e^(1/2)*x)/(c*(-d)^( 
1/2)-I*e^(1/2))/(1-I*c*x))/(-d)^(3/2)/e^(1/2)-1/4*(a+b*arctan(c*x))^2/d/e^ 
(1/2)/((-d)^(1/2)-e^(1/2)*x)+1/4*(a+b*arctan(c*x))^2/d/e^(1/2)/((-d)^(1/2) 
+e^(1/2)*x)-b*c*(a+b*arctan(c*x))*ln(2/(1-I*c*x))/d/(c^2*d-e)+b*c*(a+b*arc 
tan(c*x))*ln(2/(1+I*c*x))/d/(c^2*d-e)+1/2*b*c*(a+b*arctan(c*x))*ln(2*c*((- 
d)^(1/2)-e^(1/2)*x)/(c*(-d)^(1/2)-I*e^(1/2))/(1-I*c*x))/d/(c^2*d-e)-1/4*(a 
+b*arctan(c*x))^2*ln(2*c*((-d)^(1/2)-e^(1/2)*x)/(c*(-d)^(1/2)-I*e^(1/2))/( 
1-I*c*x))/(-d)^(3/2)/e^(1/2)+1/2*b*c*(a+b*arctan(c*x))*ln(2*c*((-d)^(1/2)+ 
e^(1/2)*x)/(c*(-d)^(1/2)+I*e^(1/2))/(1-I*c*x))/d/(c^2*d-e)+1/4*(a+b*arctan 
(c*x))^2*ln(2*c*((-d)^(1/2)+e^(1/2)*x)/(c*(-d)^(1/2)+I*e^(1/2))/(1-I*c*x)) 
/(-d)^(3/2)/e^(1/2)-1/4*I*b^2*c*polylog(2,1-2*c*((-d)^(1/2)-e^(1/2)*x)/(c* 
(-d)^(1/2)-I*e^(1/2))/(1-I*c*x))/d/(c^2*d-e)+1/2*I*b^2*c*polylog(2,1-2/(1- 
I*c*x))/d/(c^2*d-e)+1/2*I*c*(a+b*arctan(c*x))^2/d/(c^2*d-e)-1/4*I*b*(a+b*a 
rctan(c*x))*polylog(2,1-2*c*((-d)^(1/2)+e^(1/2)*x)/(c*(-d)^(1/2)+I*e^(1/2) 
)/(1-I*c*x))/(-d)^(3/2)/e^(1/2)+1/2*I*b^2*c*polylog(2,1-2/(1+I*c*x))/d/(c^ 
2*d-e)-1/4*I*b^2*c*polylog(2,1-2*c*((-d)^(1/2)+e^(1/2)*x)/(c*(-d)^(1/2)+I* 
e^(1/2))/(1-I*c*x))/d/(c^2*d-e)-1/8*b^2*polylog(3,1-2*c*((-d)^(1/2)-e^(1/2 
)*x)/(c*(-d)^(1/2)-I*e^(1/2))/(1-I*c*x))/(-d)^(3/2)/e^(1/2)+1/8*b^2*polylo 
g(3,1-2*c*((-d)^(1/2)+e^(1/2)*x)/(c*(-d)^(1/2)+I*e^(1/2))/(1-I*c*x))/(-d)^ 
(3/2)/e^(1/2)
 

Mathematica [F]

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

Integrate[(a + b*ArcTan[c*x])^2/(d + e*x^2)^2,x]
 

Output:

Integrate[(a + b*ArcTan[c*x])^2/(d + e*x^2)^2, x]
 

Rubi [A] (verified)

Time = 1.76 (sec) , antiderivative size = 1039, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {5449, 2009}

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 {(a+b \arctan (c x))^2}{\left (d+e x^2\right )^2} \, dx\)

\(\Big \downarrow \) 5449

\(\displaystyle \int \left (-\frac {e (a+b \arctan (c x))^2}{2 d \left (-d e-e^2 x^2\right )}-\frac {e (a+b \arctan (c x))^2}{4 d \left (\sqrt {-d} \sqrt {e}-e x\right )^2}-\frac {e (a+b \arctan (c x))^2}{4 d \left (\sqrt {-d} \sqrt {e}+e x\right )^2}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {i c \operatorname {PolyLog}\left (2,1-\frac {2}{1-i c x}\right ) b^2}{2 d \left (c^2 d-e\right )}+\frac {i c \operatorname {PolyLog}\left (2,1-\frac {2}{i c x+1}\right ) b^2}{2 d \left (c^2 d-e\right )}-\frac {i c \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right ) b^2}{4 d \left (c^2 d-e\right )}-\frac {i c \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {e} x+\sqrt {-d}\right )}{\left (\sqrt {-d} c+i \sqrt {e}\right ) (1-i c x)}\right ) b^2}{4 d \left (c^2 d-e\right )}-\frac {\operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right ) b^2}{8 (-d)^{3/2} \sqrt {e}}+\frac {\operatorname {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {e} x+\sqrt {-d}\right )}{\left (\sqrt {-d} c+i \sqrt {e}\right ) (1-i c x)}\right ) b^2}{8 (-d)^{3/2} \sqrt {e}}-\frac {c (a+b \arctan (c x)) \log \left (\frac {2}{1-i c x}\right ) b}{d \left (c^2 d-e\right )}+\frac {c (a+b \arctan (c x)) \log \left (\frac {2}{i c x+1}\right ) b}{d \left (c^2 d-e\right )}+\frac {c (a+b \arctan (c x)) \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right ) b}{2 d \left (c^2 d-e\right )}+\frac {c (a+b \arctan (c x)) \log \left (\frac {2 c \left (\sqrt {e} x+\sqrt {-d}\right )}{\left (\sqrt {-d} c+i \sqrt {e}\right ) (1-i c x)}\right ) b}{2 d \left (c^2 d-e\right )}+\frac {i (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right ) b}{4 (-d)^{3/2} \sqrt {e}}-\frac {i (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {e} x+\sqrt {-d}\right )}{\left (\sqrt {-d} c+i \sqrt {e}\right ) (1-i c x)}\right ) b}{4 (-d)^{3/2} \sqrt {e}}+\frac {i c (a+b \arctan (c x))^2}{2 d \left (c^2 d-e\right )}-\frac {(a+b \arctan (c x))^2}{4 d \sqrt {e} \left (\sqrt {-d}-\sqrt {e} x\right )}+\frac {(a+b \arctan (c x))^2}{4 d \sqrt {e} \left (\sqrt {e} x+\sqrt {-d}\right )}-\frac {(a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 (-d)^{3/2} \sqrt {e}}+\frac {(a+b \arctan (c x))^2 \log \left (\frac {2 c \left (\sqrt {e} x+\sqrt {-d}\right )}{\left (\sqrt {-d} c+i \sqrt {e}\right ) (1-i c x)}\right )}{4 (-d)^{3/2} \sqrt {e}}\)

Input:

Int[(a + b*ArcTan[c*x])^2/(d + e*x^2)^2,x]
 

Output:

((I/2)*c*(a + b*ArcTan[c*x])^2)/(d*(c^2*d - e)) - (a + b*ArcTan[c*x])^2/(4 
*d*Sqrt[e]*(Sqrt[-d] - Sqrt[e]*x)) + (a + b*ArcTan[c*x])^2/(4*d*Sqrt[e]*(S 
qrt[-d] + Sqrt[e]*x)) - (b*c*(a + b*ArcTan[c*x])*Log[2/(1 - I*c*x)])/(d*(c 
^2*d - e)) + (b*c*(a + b*ArcTan[c*x])*Log[2/(1 + I*c*x)])/(d*(c^2*d - e)) 
+ (b*c*(a + b*ArcTan[c*x])*Log[(2*c*(Sqrt[-d] - Sqrt[e]*x))/((c*Sqrt[-d] - 
 I*Sqrt[e])*(1 - I*c*x))])/(2*d*(c^2*d - e)) - ((a + b*ArcTan[c*x])^2*Log[ 
(2*c*(Sqrt[-d] - Sqrt[e]*x))/((c*Sqrt[-d] - I*Sqrt[e])*(1 - I*c*x))])/(4*( 
-d)^(3/2)*Sqrt[e]) + (b*c*(a + b*ArcTan[c*x])*Log[(2*c*(Sqrt[-d] + Sqrt[e] 
*x))/((c*Sqrt[-d] + I*Sqrt[e])*(1 - I*c*x))])/(2*d*(c^2*d - e)) + ((a + b* 
ArcTan[c*x])^2*Log[(2*c*(Sqrt[-d] + Sqrt[e]*x))/((c*Sqrt[-d] + I*Sqrt[e])* 
(1 - I*c*x))])/(4*(-d)^(3/2)*Sqrt[e]) + ((I/2)*b^2*c*PolyLog[2, 1 - 2/(1 - 
 I*c*x)])/(d*(c^2*d - e)) + ((I/2)*b^2*c*PolyLog[2, 1 - 2/(1 + I*c*x)])/(d 
*(c^2*d - e)) - ((I/4)*b^2*c*PolyLog[2, 1 - (2*c*(Sqrt[-d] - Sqrt[e]*x))/( 
(c*Sqrt[-d] - I*Sqrt[e])*(1 - I*c*x))])/(d*(c^2*d - e)) + ((I/4)*b*(a + b* 
ArcTan[c*x])*PolyLog[2, 1 - (2*c*(Sqrt[-d] - Sqrt[e]*x))/((c*Sqrt[-d] - I* 
Sqrt[e])*(1 - I*c*x))])/((-d)^(3/2)*Sqrt[e]) - ((I/4)*b^2*c*PolyLog[2, 1 - 
 (2*c*(Sqrt[-d] + Sqrt[e]*x))/((c*Sqrt[-d] + I*Sqrt[e])*(1 - I*c*x))])/(d* 
(c^2*d - e)) - ((I/4)*b*(a + b*ArcTan[c*x])*PolyLog[2, 1 - (2*c*(Sqrt[-d] 
+ Sqrt[e]*x))/((c*Sqrt[-d] + I*Sqrt[e])*(1 - I*c*x))])/((-d)^(3/2)*Sqrt[e] 
) - (b^2*PolyLog[3, 1 - (2*c*(Sqrt[-d] - Sqrt[e]*x))/((c*Sqrt[-d] - I*S...
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 5449
Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((d_) + (e_.)*(x_)^2)^(q_.), x 
_Symbol] :> Int[ExpandIntegrand[(a + b*ArcTan[c*x])^p, (d + e*x^2)^q, x], x 
] /; FreeQ[{a, b, c, d, e}, x] && IntegerQ[q] && IGtQ[p, 0]
 
Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 27.81 (sec) , antiderivative size = 6565, normalized size of antiderivative = 6.32

method result size
parts \(\text {Expression too large to display}\) \(6565\)
derivativedivides \(\text {Expression too large to display}\) \(6570\)
default \(\text {Expression too large to display}\) \(6570\)

Input:

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

Output:

result too large to display
 

Fricas [F]

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

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

Output:

integral((b^2*arctan(c*x)^2 + 2*a*b*arctan(c*x) + a^2)/(e^2*x^4 + 2*d*e*x^ 
2 + d^2), x)
 

Sympy [F(-1)]

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

integrate((a+b*atan(c*x))**2/(e*x**2+d)**2,x)
 

Output:

Timed out
 

Maxima [F(-2)]

Exception generated. \[ \int \frac {(a+b \arctan (c x))^2}{\left (d+e x^2\right )^2} \, dx=\text {Exception raised: ValueError} \] Input:

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

Output:

Exception raised: ValueError >> Computation failed since Maxima requested 
additional constraints; using the 'assume' command before evaluation *may* 
 help (example of legal syntax is 'assume(e>0)', see `assume?` for more de 
tails)Is e
 

Giac [F]

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

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

Output:

integrate((b*arctan(c*x) + a)^2/(e*x^2 + d)^2, x)
                                                                                    
                                                                                    
 

Mupad [F(-1)]

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

int((a + b*atan(c*x))^2/(d + e*x^2)^2,x)
 

Output:

int((a + b*atan(c*x))^2/(d + e*x^2)^2, x)
 

Reduce [F]

\[ \int \frac {(a+b \arctan (c x))^2}{\left (d+e x^2\right )^2} \, dx=\text {too large to display} \] Input:

int((a+b*atan(c*x))^2/(e*x^2+d)^2,x)
 

Output:

(3*sqrt(e)*sqrt(d)*atan((e*x)/(sqrt(e)*sqrt(d)))*a**2*c**5*d**3 + 3*sqrt(e 
)*sqrt(d)*atan((e*x)/(sqrt(e)*sqrt(d)))*a**2*c**5*d**2*e*x**2 - 3*sqrt(e)* 
sqrt(d)*atan((e*x)/(sqrt(e)*sqrt(d)))*a**2*c*d*e**2 - 3*sqrt(e)*sqrt(d)*at 
an((e*x)/(sqrt(e)*sqrt(d)))*a**2*c*e**3*x**2 + 6*sqrt(e)*sqrt(d)*atan((e*x 
)/(sqrt(e)*sqrt(d)))*b**2*c*d*e**2 + 6*sqrt(e)*sqrt(d)*atan((e*x)/(sqrt(e) 
*sqrt(d)))*b**2*c*e**3*x**2 + 2*atan(c*x)**3*b**2*c**4*d**3*e + 2*atan(c*x 
)**3*b**2*c**4*d**2*e**2*x**2 - 2*atan(c*x)**3*b**2*c**2*d**2*e**2 - 2*ata 
n(c*x)**3*b**2*c**2*d*e**3*x**2 + 6*atan(c*x)**2*a*b*c**4*d**3*e + 6*atan( 
c*x)**2*a*b*c**4*d**2*e**2*x**2 - 6*atan(c*x)**2*a*b*c**2*d**2*e**2 - 6*at 
an(c*x)**2*a*b*c**2*d*e**3*x**2 + 6*atan(c*x)**2*b**2*c**3*d**2*e**2*x - 6 
*atan(c*x)**2*b**2*c*d*e**3*x + 12*atan(c*x)*a*b*c**3*d**2*e**2*x - 12*ata 
n(c*x)*a*b*c*d*e**3*x - 6*atan(c*x)*b**2*c**2*d*e**3*x**2 - 6*atan(c*x)*b* 
*2*d*e**3 + 12*int((atan(c*x)*x**2)/(c**4*d**3*x**2 + 2*c**4*d**2*e*x**4 + 
 c**4*d*e**2*x**6 + c**2*d**3 + 3*c**2*d**2*e*x**2 + 3*c**2*d*e**2*x**4 + 
c**2*e**3*x**6 + d**2*e + 2*d*e**2*x**2 + e**3*x**4),x)*a*b*c**9*d**6*e + 
12*int((atan(c*x)*x**2)/(c**4*d**3*x**2 + 2*c**4*d**2*e*x**4 + c**4*d*e**2 
*x**6 + c**2*d**3 + 3*c**2*d**2*e*x**2 + 3*c**2*d*e**2*x**4 + c**2*e**3*x* 
*6 + d**2*e + 2*d*e**2*x**2 + e**3*x**4),x)*a*b*c**9*d**5*e**2*x**2 - 24*i 
nt((atan(c*x)*x**2)/(c**4*d**3*x**2 + 2*c**4*d**2*e*x**4 + c**4*d*e**2*x** 
6 + c**2*d**3 + 3*c**2*d**2*e*x**2 + 3*c**2*d*e**2*x**4 + c**2*e**3*x**...