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

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

Optimal result

Integrand size = 18, antiderivative size = 223 \[ \int \frac {(a+b \arctan (c x))^2}{d+e x} \, dx=-\frac {(a+b \arctan (c x))^2 \log \left (\frac {2}{1-i c x}\right )}{e}+\frac {(a+b \arctan (c x))^2 \log \left (\frac {2 c (d+e x)}{(c d+i e) (1-i c x)}\right )}{e}+\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1-i c x}\right )}{e}-\frac {i b (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2 c (d+e x)}{(c d+i e) (1-i c x)}\right )}{e}-\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2}{1-i c x}\right )}{2 e}+\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2 c (d+e x)}{(c d+i e) (1-i c x)}\right )}{2 e} \] Output:

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

Mathematica [F]

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

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

Output:

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

Rubi [A] (verified)

Time = 0.31 (sec) , antiderivative size = 223, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {5383}

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}{d+e x} \, dx\)

\(\Big \downarrow \) 5383

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

Input:

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

Output:

-(((a + b*ArcTan[c*x])^2*Log[2/(1 - I*c*x)])/e) + ((a + b*ArcTan[c*x])^2*L 
og[(2*c*(d + e*x))/((c*d + I*e)*(1 - I*c*x))])/e + (I*b*(a + b*ArcTan[c*x] 
)*PolyLog[2, 1 - 2/(1 - I*c*x)])/e - (I*b*(a + b*ArcTan[c*x])*PolyLog[2, 1 
 - (2*c*(d + e*x))/((c*d + I*e)*(1 - I*c*x))])/e - (b^2*PolyLog[3, 1 - 2/( 
1 - I*c*x)])/(2*e) + (b^2*PolyLog[3, 1 - (2*c*(d + e*x))/((c*d + I*e)*(1 - 
 I*c*x))])/(2*e)
 

Defintions of rubi rules used

rule 5383
Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^2/((d_) + (e_.)*(x_)), x_Symbol] :> 
Simp[(-(a + b*ArcTan[c*x])^2)*(Log[2/(1 - I*c*x)]/e), x] + (Simp[(a + b*Arc 
Tan[c*x])^2*(Log[2*c*((d + e*x)/((c*d + I*e)*(1 - I*c*x)))]/e), x] + Simp[I 
*b*(a + b*ArcTan[c*x])*(PolyLog[2, 1 - 2/(1 - I*c*x)]/e), x] - Simp[I*b*(a 
+ b*ArcTan[c*x])*(PolyLog[2, 1 - 2*c*((d + e*x)/((c*d + I*e)*(1 - I*c*x)))] 
/e), x] - Simp[b^2*(PolyLog[3, 1 - 2/(1 - I*c*x)]/(2*e)), x] + Simp[b^2*(Po 
lyLog[3, 1 - 2*c*((d + e*x)/((c*d + I*e)*(1 - I*c*x)))]/(2*e)), x]) /; Free 
Q[{a, b, c, d, e}, x] && NeQ[c^2*d^2 + e^2, 0]
 
Maple [C] (warning: unable to verify)

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

Time = 4.97 (sec) , antiderivative size = 1199, normalized size of antiderivative = 5.38

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

Input:

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

Output:

1/c*(a^2*c*ln(c*e*x+c*d)/e+b^2*c*(ln(c*e*x+c*d)/e*arctan(c*x)^2-2/e*(1/2*a 
rctan(c*x)^2*ln(-I*e*(1+I*c*x)^2/(c^2*x^2+1)+c*d*(1+I*c*x)^2/(c^2*x^2+1)+I 
*e+c*d)-1/2*I*arctan(c*x)*polylog(2,-(1+I*c*x)^2/(c^2*x^2+1))+1/4*polylog( 
3,-(1+I*c*x)^2/(c^2*x^2+1))-1/4*I*Pi*csgn(I*(-I*e*(1+I*c*x)^2/(c^2*x^2+1)+ 
c*d*(1+I*c*x)^2/(c^2*x^2+1)+I*e+c*d)/(1+(1+I*c*x)^2/(c^2*x^2+1)))*(csgn(I* 
(-I*e*(1+I*c*x)^2/(c^2*x^2+1)+c*d*(1+I*c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x)/(c*d+I*e))-ln...
 

Fricas [F]

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

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

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

a^2*log(e*x + d)/e + integrate(1/16*(12*b^2*arctan(c*x)^2 + b^2*log(c^2*x^ 
2 + 1)^2 + 32*a*b*arctan(c*x))/(e*x + d), x)
 

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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