Integrand size = 23, antiderivative size = 152 \[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))}{x^3} \, dx=-\frac {b c d^2}{2 x}-\frac {1}{2} b c^2 d^2 \arctan (c x)-\frac {d^2 (a+b \arctan (c x))}{2 x^2}-\frac {2 i c d^2 (a+b \arctan (c x))}{x}-a c^2 d^2 \log (x)+2 i b c^2 d^2 \log (x)-i b c^2 d^2 \log \left (1+c^2 x^2\right )-\frac {1}{2} i b c^2 d^2 \operatorname {PolyLog}(2,-i c x)+\frac {1}{2} i b c^2 d^2 \operatorname {PolyLog}(2,i c x) \] Output:
-1/2*b*c*d^2/x-1/2*b*c^2*d^2*arctan(c*x)-1/2*d^2*(a+b*arctan(c*x))/x^2-2*I *c*d^2*(a+b*arctan(c*x))/x-a*c^2*d^2*ln(x)+2*I*b*c^2*d^2*ln(x)-I*b*c^2*d^2 *ln(c^2*x^2+1)-1/2*I*b*c^2*d^2*polylog(2,-I*c*x)+1/2*I*b*c^2*d^2*polylog(2 ,I*c*x)
Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.
Time = 0.05 (sec) , antiderivative size = 139, normalized size of antiderivative = 0.91 \[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))}{x^3} \, dx=-\frac {d^2 \left (a+4 i a c x+b \arctan (c x)+4 i b c x \arctan (c x)+b c x \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},-c^2 x^2\right )+2 a c^2 x^2 \log (x)-4 i b c^2 x^2 \log (x)+2 i b c^2 x^2 \log \left (1+c^2 x^2\right )+i b c^2 x^2 \operatorname {PolyLog}(2,-i c x)-i b c^2 x^2 \operatorname {PolyLog}(2,i c x)\right )}{2 x^2} \] Input:
Integrate[((d + I*c*d*x)^2*(a + b*ArcTan[c*x]))/x^3,x]
Output:
-1/2*(d^2*(a + (4*I)*a*c*x + b*ArcTan[c*x] + (4*I)*b*c*x*ArcTan[c*x] + b*c *x*Hypergeometric2F1[-1/2, 1, 1/2, -(c^2*x^2)] + 2*a*c^2*x^2*Log[x] - (4*I )*b*c^2*x^2*Log[x] + (2*I)*b*c^2*x^2*Log[1 + c^2*x^2] + I*b*c^2*x^2*PolyLo g[2, (-I)*c*x] - I*b*c^2*x^2*PolyLog[2, I*c*x]))/x^2
Time = 0.42 (sec) , antiderivative size = 152, 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.087, Rules used = {5411, 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 {(d+i c d x)^2 (a+b \arctan (c x))}{x^3} \, dx\) |
\(\Big \downarrow \) 5411 |
\(\displaystyle \int \left (-\frac {c^2 d^2 (a+b \arctan (c x))}{x}+\frac {d^2 (a+b \arctan (c x))}{x^3}+\frac {2 i c d^2 (a+b \arctan (c x))}{x^2}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {d^2 (a+b \arctan (c x))}{2 x^2}-\frac {2 i c d^2 (a+b \arctan (c x))}{x}-a c^2 d^2 \log (x)-\frac {1}{2} b c^2 d^2 \arctan (c x)-\frac {1}{2} i b c^2 d^2 \operatorname {PolyLog}(2,-i c x)+\frac {1}{2} i b c^2 d^2 \operatorname {PolyLog}(2,i c x)-i b c^2 d^2 \log \left (c^2 x^2+1\right )+2 i b c^2 d^2 \log (x)-\frac {b c d^2}{2 x}\) |
Input:
Int[((d + I*c*d*x)^2*(a + b*ArcTan[c*x]))/x^3,x]
Output:
-1/2*(b*c*d^2)/x - (b*c^2*d^2*ArcTan[c*x])/2 - (d^2*(a + b*ArcTan[c*x]))/( 2*x^2) - ((2*I)*c*d^2*(a + b*ArcTan[c*x]))/x - a*c^2*d^2*Log[x] + (2*I)*b* c^2*d^2*Log[x] - I*b*c^2*d^2*Log[1 + c^2*x^2] - (I/2)*b*c^2*d^2*PolyLog[2, (-I)*c*x] + (I/2)*b*c^2*d^2*PolyLog[2, I*c*x]
Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_ .)*(x_))^(q_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*ArcTan[c*x])^p, (f* x)^m*(d + e*x)^q, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[p, 0] & & IntegerQ[q] && (GtQ[q, 0] || NeQ[a, 0] || IntegerQ[m])
Time = 0.56 (sec) , antiderivative size = 157, normalized size of antiderivative = 1.03
method | result | size |
parts | \(d^{2} a \left (-\frac {1}{2 x^{2}}-\frac {2 i c}{x}-c^{2} \ln \left (x \right )\right )+d^{2} b \,c^{2} \left (-\frac {2 i \arctan \left (c x \right )}{c x}-\frac {\arctan \left (c x \right )}{2 c^{2} x^{2}}-\ln \left (c x \right ) \arctan \left (c x \right )-\frac {i \ln \left (c x \right ) \ln \left (i c x +1\right )}{2}+\frac {i \ln \left (c x \right ) \ln \left (-i c x +1\right )}{2}-\frac {i \operatorname {dilog}\left (i c x +1\right )}{2}+\frac {i \operatorname {dilog}\left (-i c x +1\right )}{2}-i \ln \left (c^{2} x^{2}+1\right )-\frac {\arctan \left (c x \right )}{2}-\frac {1}{2 c x}+2 i \ln \left (c x \right )\right )\) | \(157\) |
derivativedivides | \(c^{2} \left (d^{2} a \left (-\frac {2 i}{c x}-\frac {1}{2 c^{2} x^{2}}-\ln \left (c x \right )\right )+d^{2} b \left (-\frac {2 i \arctan \left (c x \right )}{c x}-\frac {\arctan \left (c x \right )}{2 c^{2} x^{2}}-\ln \left (c x \right ) \arctan \left (c x \right )-\frac {i \ln \left (c x \right ) \ln \left (i c x +1\right )}{2}+\frac {i \ln \left (c x \right ) \ln \left (-i c x +1\right )}{2}-\frac {i \operatorname {dilog}\left (i c x +1\right )}{2}+\frac {i \operatorname {dilog}\left (-i c x +1\right )}{2}-i \ln \left (c^{2} x^{2}+1\right )-\frac {\arctan \left (c x \right )}{2}-\frac {1}{2 c x}+2 i \ln \left (c x \right )\right )\right )\) | \(162\) |
default | \(c^{2} \left (d^{2} a \left (-\frac {2 i}{c x}-\frac {1}{2 c^{2} x^{2}}-\ln \left (c x \right )\right )+d^{2} b \left (-\frac {2 i \arctan \left (c x \right )}{c x}-\frac {\arctan \left (c x \right )}{2 c^{2} x^{2}}-\ln \left (c x \right ) \arctan \left (c x \right )-\frac {i \ln \left (c x \right ) \ln \left (i c x +1\right )}{2}+\frac {i \ln \left (c x \right ) \ln \left (-i c x +1\right )}{2}-\frac {i \operatorname {dilog}\left (i c x +1\right )}{2}+\frac {i \operatorname {dilog}\left (-i c x +1\right )}{2}-i \ln \left (c^{2} x^{2}+1\right )-\frac {\arctan \left (c x \right )}{2}-\frac {1}{2 c x}+2 i \ln \left (c x \right )\right )\right )\) | \(162\) |
risch | \(-\frac {b c \,d^{2}}{2 x}-\frac {i d^{2} b \ln \left (-i c x +1\right )}{4 x^{2}}+\frac {i d^{2} b \ln \left (i c x +1\right )}{4 x^{2}}-\frac {5 b \,c^{2} d^{2} \arctan \left (c x \right )}{4}+\frac {i d^{2} c^{2} b \operatorname {dilog}\left (-i c x +1\right )}{2}+\frac {d^{2} c b \ln \left (-i c x +1\right )}{x}-\frac {2 i d^{2} c a}{x}-\frac {d^{2} a}{2 x^{2}}+\frac {3 i d^{2} c^{2} b \ln \left (i c x \right )}{4}-d^{2} c^{2} a \ln \left (-i c x \right )-\frac {3 i d^{2} c^{2} b \ln \left (i c x +1\right )}{4}-\frac {i d^{2} c^{2} b \operatorname {dilog}\left (i c x +1\right )}{2}-\frac {5 i d^{2} c^{2} b \ln \left (c^{2} x^{2}+1\right )}{8}-\frac {d^{2} c b \ln \left (i c x +1\right )}{x}+\frac {5 i d^{2} c^{2} b \ln \left (-i c x \right )}{4}\) | \(237\) |
Input:
int((d+I*c*d*x)^2*(a+b*arctan(c*x))/x^3,x,method=_RETURNVERBOSE)
Output:
d^2*a*(-1/2/x^2-2*I*c/x-c^2*ln(x))+d^2*b*c^2*(-2*I*arctan(c*x)/c/x-1/2/c^2 /x^2*arctan(c*x)-ln(c*x)*arctan(c*x)-1/2*I*ln(c*x)*ln(1+I*c*x)+1/2*I*ln(c* x)*ln(1-I*c*x)-1/2*I*dilog(1+I*c*x)+1/2*I*dilog(1-I*c*x)-I*ln(c^2*x^2+1)-1 /2*arctan(c*x)-1/2/c/x+2*I*ln(c*x))
\[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))}{x^3} \, dx=\int { \frac {{\left (i \, c d x + d\right )}^{2} {\left (b \arctan \left (c x\right ) + a\right )}}{x^{3}} \,d x } \] Input:
integrate((d+I*c*d*x)^2*(a+b*arctan(c*x))/x^3,x, algorithm="fricas")
Output:
integral(-1/2*(2*a*c^2*d^2*x^2 - 4*I*a*c*d^2*x - 2*a*d^2 - (-I*b*c^2*d^2*x ^2 - 2*b*c*d^2*x + I*b*d^2)*log(-(c*x + I)/(c*x - I)))/x^3, x)
\[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))}{x^3} \, dx=- d^{2} \left (\int \left (- \frac {a}{x^{3}}\right )\, dx + \int \frac {a c^{2}}{x}\, dx + \int \left (- \frac {b \operatorname {atan}{\left (c x \right )}}{x^{3}}\right )\, dx + \int \left (- \frac {2 i a c}{x^{2}}\right )\, dx + \int \frac {b c^{2} \operatorname {atan}{\left (c x \right )}}{x}\, dx + \int \left (- \frac {2 i b c \operatorname {atan}{\left (c x \right )}}{x^{2}}\right )\, dx\right ) \] Input:
integrate((d+I*c*d*x)**2*(a+b*atan(c*x))/x**3,x)
Output:
-d**2*(Integral(-a/x**3, x) + Integral(a*c**2/x, x) + Integral(-b*atan(c*x )/x**3, x) + Integral(-2*I*a*c/x**2, x) + Integral(b*c**2*atan(c*x)/x, x) + Integral(-2*I*b*c*atan(c*x)/x**2, x))
\[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))}{x^3} \, dx=\int { \frac {{\left (i \, c d x + d\right )}^{2} {\left (b \arctan \left (c x\right ) + a\right )}}{x^{3}} \,d x } \] Input:
integrate((d+I*c*d*x)^2*(a+b*arctan(c*x))/x^3,x, algorithm="maxima")
Output:
-b*c^2*d^2*integrate(arctan(c*x)/x, x) - a*c^2*d^2*log(x) - I*(c*(log(c^2* x^2 + 1) - log(x^2)) + 2*arctan(c*x)/x)*b*c*d^2 - 1/2*((c*arctan(c*x) + 1/ x)*c + arctan(c*x)/x^2)*b*d^2 - 2*I*a*c*d^2/x - 1/2*a*d^2/x^2
\[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))}{x^3} \, dx=\int { \frac {{\left (i \, c d x + d\right )}^{2} {\left (b \arctan \left (c x\right ) + a\right )}}{x^{3}} \,d x } \] Input:
integrate((d+I*c*d*x)^2*(a+b*arctan(c*x))/x^3,x, algorithm="giac")
Output:
integrate((I*c*d*x + d)^2*(b*arctan(c*x) + a)/x^3, x)
Time = 1.06 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.06 \[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))}{x^3} \, dx=\left \{\begin {array}{cl} -\frac {a\,d^2}{2\,x^2} & \text {\ if\ \ }c=0\\ b\,d^2\,\left (c^2\,\ln \left (x\right )-\frac {c^2\,\ln \left (c^2\,x^2+1\right )}{2}\right )\,2{}\mathrm {i}+\frac {b\,c^2\,d^2\,{\mathrm {Li}}_{\mathrm {2}}\left (1-c\,x\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{2}-\frac {b\,c^2\,d^2\,{\mathrm {Li}}_{\mathrm {2}}\left (1+c\,x\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{2}-\frac {b\,d^2\,\left (c^3\,\mathrm {atan}\left (c\,x\right )+\frac {c^2}{x}\right )}{2\,c}-\frac {a\,d^2\,\left (2\,c^2\,x^2\,\ln \left (x\right )+1+c\,x\,4{}\mathrm {i}\right )}{2\,x^2}-\frac {b\,d^2\,\mathrm {atan}\left (c\,x\right )}{2\,x^2}-\frac {b\,c\,d^2\,\mathrm {atan}\left (c\,x\right )\,2{}\mathrm {i}}{x} & \text {\ if\ \ }c\neq 0 \end {array}\right . \] Input:
int(((a + b*atan(c*x))*(d + c*d*x*1i)^2)/x^3,x)
Output:
piecewise(c == 0, -(a*d^2)/(2*x^2), c ~= 0, b*d^2*(c^2*log(x) - (c^2*log(c ^2*x^2 + 1))/2)*2i + (b*c^2*d^2*dilog(- c*x*1i + 1)*1i)/2 - (b*c^2*d^2*dil og(c*x*1i + 1)*1i)/2 - (b*d^2*(c^3*atan(c*x) + c^2/x))/(2*c) - (a*d^2*(c*x *4i + 2*c^2*x^2*log(x) + 1))/(2*x^2) - (b*d^2*atan(c*x))/(2*x^2) - (b*c*d^ 2*atan(c*x)*2i)/x)
\[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))}{x^3} \, dx=\frac {d^{2} \left (-\mathit {atan} \left (c x \right ) b \,c^{2} x^{2}-4 \mathit {atan} \left (c x \right ) b c i x -\mathit {atan} \left (c x \right ) b -2 \left (\int \frac {\mathit {atan} \left (c x \right )}{x}d x \right ) b \,c^{2} x^{2}-2 \,\mathrm {log}\left (c^{2} x^{2}+1\right ) b \,c^{2} i \,x^{2}-2 \,\mathrm {log}\left (x \right ) a \,c^{2} x^{2}+4 \,\mathrm {log}\left (x \right ) b \,c^{2} i \,x^{2}-4 a c i x -a -b c x \right )}{2 x^{2}} \] Input:
int((d+I*c*d*x)^2*(a+b*atan(c*x))/x^3,x)
Output:
(d**2*( - atan(c*x)*b*c**2*x**2 - 4*atan(c*x)*b*c*i*x - atan(c*x)*b - 2*in t(atan(c*x)/x,x)*b*c**2*x**2 - 2*log(c**2*x**2 + 1)*b*c**2*i*x**2 - 2*log( x)*a*c**2*x**2 + 4*log(x)*b*c**2*i*x**2 - 4*a*c*i*x - a - b*c*x))/(2*x**2)