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

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [A] (verification not implemented)
Maxima [A] (verification not implemented)
Giac [A] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 109 \[ \int \frac {\left (d+e x^2\right )^2 (a+b \arctan (c x))}{x^2} \, dx=-\frac {b e^2 x^2}{6 c}-\frac {d^2 (a+b \arctan (c x))}{x}+2 d e x (a+b \arctan (c x))+\frac {1}{3} e^2 x^3 (a+b \arctan (c x))+b c d^2 \log (x)-\frac {b \left (3 c^4 d^2+6 c^2 d e-e^2\right ) \log \left (1+c^2 x^2\right )}{6 c^3} \] Output:

-1/6*b*e^2*x^2/c-d^2*(a+b*arctan(c*x))/x+2*d*e*x*(a+b*arctan(c*x))+1/3*e^2 
*x^3*(a+b*arctan(c*x))+b*c*d^2*ln(x)-1/6*b*(3*c^4*d^2+6*c^2*d*e-e^2)*ln(c^ 
2*x^2+1)/c^3
 

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.05 \[ \int \frac {\left (d+e x^2\right )^2 (a+b \arctan (c x))}{x^2} \, dx=\frac {1}{6} \left (-\frac {6 a d^2}{x}+12 a d e x-\frac {b e^2 x^2}{c}+2 a e^2 x^3+\frac {2 b \left (-3 d^2+6 d e x^2+e^2 x^4\right ) \arctan (c x)}{x}+6 b c d^2 \log (x)+\frac {b \left (-3 c^4 d^2-6 c^2 d e+e^2\right ) \log \left (1+c^2 x^2\right )}{c^3}\right ) \] Input:

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

Output:

((-6*a*d^2)/x + 12*a*d*e*x - (b*e^2*x^2)/c + 2*a*e^2*x^3 + (2*b*(-3*d^2 + 
6*d*e*x^2 + e^2*x^4)*ArcTan[c*x])/x + 6*b*c*d^2*Log[x] + (b*(-3*c^4*d^2 - 
6*c^2*d*e + e^2)*Log[1 + c^2*x^2])/c^3)/6
 

Rubi [A] (verified)

Time = 0.44 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.02, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {5511, 27, 1578, 1195, 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 {\left (d+e x^2\right )^2 (a+b \arctan (c x))}{x^2} \, dx\)

\(\Big \downarrow \) 5511

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 1578

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

\(\Big \downarrow \) 1195

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

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {d^2 (a+b \arctan (c x))}{x}+2 d e x (a+b \arctan (c x))+\frac {1}{3} e^2 x^3 (a+b \arctan (c x))+\frac {1}{6} b c \left (-\frac {e^2 x^2}{c^2}-\frac {\left (3 c^4 d^2+6 c^2 d e-e^2\right ) \log \left (c^2 x^2+1\right )}{c^4}+3 d^2 \log \left (x^2\right )\right )\)

Input:

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

Output:

-((d^2*(a + b*ArcTan[c*x]))/x) + 2*d*e*x*(a + b*ArcTan[c*x]) + (e^2*x^3*(a 
 + b*ArcTan[c*x]))/3 + (b*c*(-((e^2*x^2)/c^2) + 3*d^2*Log[x^2] - ((3*c^4*d 
^2 + 6*c^2*d*e - e^2)*Log[1 + c^2*x^2])/c^4))/6
 

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 1195
Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))^(n_.)*((a_.) + (b_.)*(x 
_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*(f + 
 g*x)^n*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, n}, x 
] && IGtQ[p, 0]
 

rule 1578
Int[(x_)^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_ 
)^4)^(p_.), x_Symbol] :> Simp[1/2   Subst[Int[x^((m - 1)/2)*(d + e*x)^q*(a 
+ b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, d, e, p, q}, x] && Int 
egerQ[(m - 1)/2]
 

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

rule 5511
Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*((f_.)*(x_))^(m_.)*((d_.) + (e_.)*(x 
_)^2)^(q_.), x_Symbol] :> With[{u = IntHide[(f*x)^m*(d + e*x^2)^q, x]}, Sim 
p[(a + b*ArcTan[c*x])   u, x] - Simp[b*c   Int[SimplifyIntegrand[u/(1 + c^2 
*x^2), x], x], x]] /; FreeQ[{a, b, c, d, e, f, m, q}, x] && ((IGtQ[q, 0] && 
  !(ILtQ[(m - 1)/2, 0] && GtQ[m + 2*q + 3, 0])) || (IGtQ[(m + 1)/2, 0] && 
!(ILtQ[q, 0] && GtQ[m + 2*q + 3, 0])) || (ILtQ[(m + 2*q + 1)/2, 0] &&  !ILt 
Q[(m - 1)/2, 0]))
 
Maple [A] (verified)

Time = 0.22 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.23

method result size
parts \(a \left (\frac {e^{2} x^{3}}{3}+2 d e x -\frac {d^{2}}{x}\right )+b c \left (\frac {\arctan \left (c x \right ) e^{2} x^{3}}{3 c}+\frac {2 \arctan \left (c x \right ) x d e}{c}-\frac {\arctan \left (c x \right ) d^{2}}{c x}-\frac {\frac {c^{2} e^{2} x^{2}}{2}+\frac {\left (3 c^{4} d^{2}+6 c^{2} d e -e^{2}\right ) \ln \left (c^{2} x^{2}+1\right )}{2}-3 c^{4} d^{2} \ln \left (c x \right )}{3 c^{4}}\right )\) \(134\)
derivativedivides \(c \left (\frac {a \left (2 d \,c^{3} e x +\frac {e^{2} c^{3} x^{3}}{3}-\frac {c^{3} d^{2}}{x}\right )}{c^{4}}+\frac {b \left (2 \arctan \left (c x \right ) c^{3} x d e +\frac {\arctan \left (c x \right ) e^{2} c^{3} x^{3}}{3}-\frac {\arctan \left (c x \right ) c^{3} d^{2}}{x}-\frac {c^{2} e^{2} x^{2}}{6}-\frac {\left (3 c^{4} d^{2}+6 c^{2} d e -e^{2}\right ) \ln \left (c^{2} x^{2}+1\right )}{6}+c^{4} d^{2} \ln \left (c x \right )\right )}{c^{4}}\right )\) \(143\)
default \(c \left (\frac {a \left (2 d \,c^{3} e x +\frac {e^{2} c^{3} x^{3}}{3}-\frac {c^{3} d^{2}}{x}\right )}{c^{4}}+\frac {b \left (2 \arctan \left (c x \right ) c^{3} x d e +\frac {\arctan \left (c x \right ) e^{2} c^{3} x^{3}}{3}-\frac {\arctan \left (c x \right ) c^{3} d^{2}}{x}-\frac {c^{2} e^{2} x^{2}}{6}-\frac {\left (3 c^{4} d^{2}+6 c^{2} d e -e^{2}\right ) \ln \left (c^{2} x^{2}+1\right )}{6}+c^{4} d^{2} \ln \left (c x \right )\right )}{c^{4}}\right )\) \(143\)
parallelrisch \(\frac {2 x^{4} \arctan \left (c x \right ) b \,c^{3} e^{2}+2 a \,c^{3} e^{2} x^{4}+6 b \,c^{4} d^{2} \ln \left (x \right ) x -3 \ln \left (c^{2} x^{2}+1\right ) b \,c^{4} d^{2} x +12 x^{2} \arctan \left (c x \right ) b \,c^{3} d e -b \,c^{2} e^{2} x^{3}+12 a \,c^{3} d e \,x^{2}-6 \ln \left (c^{2} x^{2}+1\right ) b \,c^{2} d e x -6 \arctan \left (c x \right ) b \,c^{3} d^{2}-6 a \,c^{3} d^{2}+\ln \left (c^{2} x^{2}+1\right ) b \,e^{2} x}{6 x \,c^{3}}\) \(165\)
risch \(\frac {i b \left (-e^{2} x^{4}-6 d e \,x^{2}+3 d^{2}\right ) \ln \left (i c x +1\right )}{6 x}+\frac {i b \,c^{3} e^{2} x^{4} \ln \left (-i c x +1\right )+6 i b \,c^{3} d e \,x^{2} \ln \left (-i c x +1\right )+2 a \,c^{3} e^{2} x^{4}+6 b \,c^{4} d^{2} \ln \left (x \right ) x -3 \ln \left (c^{2} x^{2}+1\right ) b \,c^{4} d^{2} x -3 i b \,c^{3} d^{2} \ln \left (-i c x +1\right )+12 a \,c^{3} d e \,x^{2}-b \,c^{2} e^{2} x^{3}-6 \ln \left (c^{2} x^{2}+1\right ) b \,c^{2} d e x -6 a \,c^{3} d^{2}+\ln \left (c^{2} x^{2}+1\right ) b \,e^{2} x}{6 c^{3} x}\) \(217\)

Input:

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

Output:

a*(1/3*e^2*x^3+2*d*e*x-d^2/x)+b*c*(1/3*arctan(c*x)/c*e^2*x^3+2*arctan(c*x) 
/c*x*d*e-arctan(c*x)*d^2/c/x-1/3/c^4*(1/2*c^2*e^2*x^2+1/2*(3*c^4*d^2+6*c^2 
*d*e-e^2)*ln(c^2*x^2+1)-3*c^4*d^2*ln(c*x)))
 

Fricas [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 140, normalized size of antiderivative = 1.28 \[ \int \frac {\left (d+e x^2\right )^2 (a+b \arctan (c x))}{x^2} \, dx=\frac {2 \, a c^{3} e^{2} x^{4} + 6 \, b c^{4} d^{2} x \log \left (x\right ) + 12 \, a c^{3} d e x^{2} - b c^{2} e^{2} x^{3} - 6 \, a c^{3} d^{2} - {\left (3 \, b c^{4} d^{2} + 6 \, b c^{2} d e - b e^{2}\right )} x \log \left (c^{2} x^{2} + 1\right ) + 2 \, {\left (b c^{3} e^{2} x^{4} + 6 \, b c^{3} d e x^{2} - 3 \, b c^{3} d^{2}\right )} \arctan \left (c x\right )}{6 \, c^{3} x} \] Input:

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

Output:

1/6*(2*a*c^3*e^2*x^4 + 6*b*c^4*d^2*x*log(x) + 12*a*c^3*d*e*x^2 - b*c^2*e^2 
*x^3 - 6*a*c^3*d^2 - (3*b*c^4*d^2 + 6*b*c^2*d*e - b*e^2)*x*log(c^2*x^2 + 1 
) + 2*(b*c^3*e^2*x^4 + 6*b*c^3*d*e*x^2 - 3*b*c^3*d^2)*arctan(c*x))/(c^3*x)
 

Sympy [A] (verification not implemented)

Time = 0.43 (sec) , antiderivative size = 165, normalized size of antiderivative = 1.51 \[ \int \frac {\left (d+e x^2\right )^2 (a+b \arctan (c x))}{x^2} \, dx=\begin {cases} - \frac {a d^{2}}{x} + 2 a d e x + \frac {a e^{2} x^{3}}{3} + b c d^{2} \log {\left (x \right )} - \frac {b c d^{2} \log {\left (x^{2} + \frac {1}{c^{2}} \right )}}{2} - \frac {b d^{2} \operatorname {atan}{\left (c x \right )}}{x} + 2 b d e x \operatorname {atan}{\left (c x \right )} + \frac {b e^{2} x^{3} \operatorname {atan}{\left (c x \right )}}{3} - \frac {b d e \log {\left (x^{2} + \frac {1}{c^{2}} \right )}}{c} - \frac {b e^{2} x^{2}}{6 c} + \frac {b e^{2} \log {\left (x^{2} + \frac {1}{c^{2}} \right )}}{6 c^{3}} & \text {for}\: c \neq 0 \\a \left (- \frac {d^{2}}{x} + 2 d e x + \frac {e^{2} x^{3}}{3}\right ) & \text {otherwise} \end {cases} \] Input:

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

Output:

Piecewise((-a*d**2/x + 2*a*d*e*x + a*e**2*x**3/3 + b*c*d**2*log(x) - b*c*d 
**2*log(x**2 + c**(-2))/2 - b*d**2*atan(c*x)/x + 2*b*d*e*x*atan(c*x) + b*e 
**2*x**3*atan(c*x)/3 - b*d*e*log(x**2 + c**(-2))/c - b*e**2*x**2/(6*c) + b 
*e**2*log(x**2 + c**(-2))/(6*c**3), Ne(c, 0)), (a*(-d**2/x + 2*d*e*x + e** 
2*x**3/3), True))
 

Maxima [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.19 \[ \int \frac {\left (d+e x^2\right )^2 (a+b \arctan (c x))}{x^2} \, dx=\frac {1}{3} \, a e^{2} x^{3} - \frac {1}{2} \, {\left (c {\left (\log \left (c^{2} x^{2} + 1\right ) - \log \left (x^{2}\right )\right )} + \frac {2 \, \arctan \left (c x\right )}{x}\right )} b d^{2} + \frac {1}{6} \, {\left (2 \, x^{3} \arctan \left (c x\right ) - c {\left (\frac {x^{2}}{c^{2}} - \frac {\log \left (c^{2} x^{2} + 1\right )}{c^{4}}\right )}\right )} b e^{2} + 2 \, a d e x + \frac {{\left (2 \, c x \arctan \left (c x\right ) - \log \left (c^{2} x^{2} + 1\right )\right )} b d e}{c} - \frac {a d^{2}}{x} \] Input:

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

Output:

1/3*a*e^2*x^3 - 1/2*(c*(log(c^2*x^2 + 1) - log(x^2)) + 2*arctan(c*x)/x)*b* 
d^2 + 1/6*(2*x^3*arctan(c*x) - c*(x^2/c^2 - log(c^2*x^2 + 1)/c^4))*b*e^2 + 
 2*a*d*e*x + (2*c*x*arctan(c*x) - log(c^2*x^2 + 1))*b*d*e/c - a*d^2/x
 

Giac [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 164, normalized size of antiderivative = 1.50 \[ \int \frac {\left (d+e x^2\right )^2 (a+b \arctan (c x))}{x^2} \, dx=\frac {2 \, b c^{3} e^{2} x^{4} \arctan \left (c x\right ) + 2 \, a c^{3} e^{2} x^{4} + 12 \, b c^{3} d e x^{2} \arctan \left (c x\right ) - 3 \, b c^{4} d^{2} x \log \left (c^{2} x^{2} + 1\right ) + 6 \, b c^{4} d^{2} x \log \left (x\right ) + 12 \, a c^{3} d e x^{2} - b c^{2} e^{2} x^{3} - 6 \, b c^{3} d^{2} \arctan \left (c x\right ) - 6 \, b c^{2} d e x \log \left (c^{2} x^{2} + 1\right ) - 6 \, a c^{3} d^{2} + b e^{2} x \log \left (c^{2} x^{2} + 1\right )}{6 \, c^{3} x} \] Input:

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

Output:

1/6*(2*b*c^3*e^2*x^4*arctan(c*x) + 2*a*c^3*e^2*x^4 + 12*b*c^3*d*e*x^2*arct 
an(c*x) - 3*b*c^4*d^2*x*log(c^2*x^2 + 1) + 6*b*c^4*d^2*x*log(x) + 12*a*c^3 
*d*e*x^2 - b*c^2*e^2*x^3 - 6*b*c^3*d^2*arctan(c*x) - 6*b*c^2*d*e*x*log(c^2 
*x^2 + 1) - 6*a*c^3*d^2 + b*e^2*x*log(c^2*x^2 + 1))/(c^3*x)
 

Mupad [B] (verification not implemented)

Time = 1.03 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.24 \[ \int \frac {\left (d+e x^2\right )^2 (a+b \arctan (c x))}{x^2} \, dx=\frac {a\,e^2\,x^3}{3}-\frac {a\,d^2}{x}+2\,a\,d\,e\,x+\frac {b\,e^2\,\ln \left (c^2\,x^2+1\right )}{6\,c^3}-\frac {b\,e^2\,x^2}{6\,c}-\frac {b\,c\,d^2\,\ln \left (c^2\,x^2+1\right )}{2}+b\,c\,d^2\,\ln \left (x\right )-\frac {b\,d^2\,\mathrm {atan}\left (c\,x\right )}{x}+\frac {b\,e^2\,x^3\,\mathrm {atan}\left (c\,x\right )}{3}-\frac {b\,d\,e\,\ln \left (c^2\,x^2+1\right )}{c}+2\,b\,d\,e\,x\,\mathrm {atan}\left (c\,x\right ) \] Input:

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

Output:

(a*e^2*x^3)/3 - (a*d^2)/x + 2*a*d*e*x + (b*e^2*log(c^2*x^2 + 1))/(6*c^3) - 
 (b*e^2*x^2)/(6*c) - (b*c*d^2*log(c^2*x^2 + 1))/2 + b*c*d^2*log(x) - (b*d^ 
2*atan(c*x))/x + (b*e^2*x^3*atan(c*x))/3 - (b*d*e*log(c^2*x^2 + 1))/c + 2* 
b*d*e*x*atan(c*x)
 

Reduce [B] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 164, normalized size of antiderivative = 1.50 \[ \int \frac {\left (d+e x^2\right )^2 (a+b \arctan (c x))}{x^2} \, dx=\frac {-6 \mathit {atan} \left (c x \right ) b \,c^{3} d^{2}+12 \mathit {atan} \left (c x \right ) b \,c^{3} d e \,x^{2}+2 \mathit {atan} \left (c x \right ) b \,c^{3} e^{2} x^{4}-3 \,\mathrm {log}\left (c^{2} x^{2}+1\right ) b \,c^{4} d^{2} x -6 \,\mathrm {log}\left (c^{2} x^{2}+1\right ) b \,c^{2} d e x +\mathrm {log}\left (c^{2} x^{2}+1\right ) b \,e^{2} x +6 \,\mathrm {log}\left (x \right ) b \,c^{4} d^{2} x -6 a \,c^{3} d^{2}+12 a \,c^{3} d e \,x^{2}+2 a \,c^{3} e^{2} x^{4}-b \,c^{2} e^{2} x^{3}}{6 c^{3} x} \] Input:

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

Output:

( - 6*atan(c*x)*b*c**3*d**2 + 12*atan(c*x)*b*c**3*d*e*x**2 + 2*atan(c*x)*b 
*c**3*e**2*x**4 - 3*log(c**2*x**2 + 1)*b*c**4*d**2*x - 6*log(c**2*x**2 + 1 
)*b*c**2*d*e*x + log(c**2*x**2 + 1)*b*e**2*x + 6*log(x)*b*c**4*d**2*x - 6* 
a*c**3*d**2 + 12*a*c**3*d*e*x**2 + 2*a*c**3*e**2*x**4 - b*c**2*e**2*x**3)/ 
(6*c**3*x)