Integrand size = 25, antiderivative size = 186 \[ \int \frac {(a+b \arctan (c x))^2}{x^2 (d+i c d x)} \, dx=-\frac {i c (a+b \arctan (c x))^2}{d}-\frac {(a+b \arctan (c x))^2}{d x}+\frac {2 b c (a+b \arctan (c x)) \log \left (2-\frac {2}{1-i c x}\right )}{d}-\frac {i c (a+b \arctan (c x))^2 \log \left (2-\frac {2}{1+i c x}\right )}{d}-\frac {i b^2 c \operatorname {PolyLog}\left (2,-1+\frac {2}{1-i c x}\right )}{d}+\frac {b c (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,-1+\frac {2}{1+i c x}\right )}{d}-\frac {i b^2 c \operatorname {PolyLog}\left (3,-1+\frac {2}{1+i c x}\right )}{2 d} \] Output:
-I*c*(a+b*arctan(c*x))^2/d-(a+b*arctan(c*x))^2/d/x+2*b*c*(a+b*arctan(c*x)) *ln(2-2/(1-I*c*x))/d-I*c*(a+b*arctan(c*x))^2*ln(2-2/(1+I*c*x))/d-I*b^2*c*p olylog(2,-1+2/(1-I*c*x))/d+b*c*(a+b*arctan(c*x))*polylog(2,-1+2/(1+I*c*x)) /d-1/2*I*b^2*c*polylog(3,-1+2/(1+I*c*x))/d
Time = 0.71 (sec) , antiderivative size = 265, normalized size of antiderivative = 1.42 \[ \int \frac {(a+b \arctan (c x))^2}{x^2 (d+i c d x)} \, dx=-\frac {\frac {2 a^2}{x}+2 a^2 c \arctan (c x)+2 i a^2 c \log (x)-i a^2 c \log \left (1+c^2 x^2\right )+2 a b c \left (2 \left (\arctan (c x)^2+\arctan (c x) \left (\frac {1}{c x}+i \log \left (1-e^{2 i \arctan (c x)}\right )\right )-\log \left (\frac {c x}{\sqrt {1+c^2 x^2}}\right )\right )+\operatorname {PolyLog}\left (2,e^{2 i \arctan (c x)}\right )\right )+2 i b^2 c \left (-\frac {i \pi ^3}{24}+\arctan (c x)^2-\frac {i \arctan (c x)^2}{c x}+\arctan (c x)^2 \log \left (1-e^{-2 i \arctan (c x)}\right )+2 i \arctan (c x) \log \left (1-e^{2 i \arctan (c x)}\right )+i \arctan (c x) \operatorname {PolyLog}\left (2,e^{-2 i \arctan (c x)}\right )+\operatorname {PolyLog}\left (2,e^{2 i \arctan (c x)}\right )+\frac {1}{2} \operatorname {PolyLog}\left (3,e^{-2 i \arctan (c x)}\right )\right )}{2 d} \] Input:
Integrate[(a + b*ArcTan[c*x])^2/(x^2*(d + I*c*d*x)),x]
Output:
-1/2*((2*a^2)/x + 2*a^2*c*ArcTan[c*x] + (2*I)*a^2*c*Log[x] - I*a^2*c*Log[1 + c^2*x^2] + 2*a*b*c*(2*(ArcTan[c*x]^2 + ArcTan[c*x]*(1/(c*x) + I*Log[1 - E^((2*I)*ArcTan[c*x])]) - Log[(c*x)/Sqrt[1 + c^2*x^2]]) + PolyLog[2, E^(( 2*I)*ArcTan[c*x])]) + (2*I)*b^2*c*((-1/24*I)*Pi^3 + ArcTan[c*x]^2 - (I*Arc Tan[c*x]^2)/(c*x) + ArcTan[c*x]^2*Log[1 - E^((-2*I)*ArcTan[c*x])] + (2*I)* ArcTan[c*x]*Log[1 - E^((2*I)*ArcTan[c*x])] + I*ArcTan[c*x]*PolyLog[2, E^(( -2*I)*ArcTan[c*x])] + PolyLog[2, E^((2*I)*ArcTan[c*x])] + PolyLog[3, E^((- 2*I)*ArcTan[c*x])]/2))/d
Time = 1.38 (sec) , antiderivative size = 195, normalized size of antiderivative = 1.05, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.360, Rules used = {5405, 27, 5361, 5403, 5459, 5403, 2897, 5529, 7164}
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}{x^2 (d+i c d x)} \, dx\) |
\(\Big \downarrow \) 5405 |
\(\displaystyle \frac {\int \frac {(a+b \arctan (c x))^2}{x^2}dx}{d}-i c \int \frac {(a+b \arctan (c x))^2}{d x (i c x+1)}dx\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\int \frac {(a+b \arctan (c x))^2}{x^2}dx}{d}-\frac {i c \int \frac {(a+b \arctan (c x))^2}{x (i c x+1)}dx}{d}\) |
\(\Big \downarrow \) 5361 |
\(\displaystyle \frac {2 b c \int \frac {a+b \arctan (c x)}{x \left (c^2 x^2+1\right )}dx-\frac {(a+b \arctan (c x))^2}{x}}{d}-\frac {i c \int \frac {(a+b \arctan (c x))^2}{x (i c x+1)}dx}{d}\) |
\(\Big \downarrow \) 5403 |
\(\displaystyle \frac {2 b c \int \frac {a+b \arctan (c x)}{x \left (c^2 x^2+1\right )}dx-\frac {(a+b \arctan (c x))^2}{x}}{d}-\frac {i c \left (\log \left (2-\frac {2}{1+i c x}\right ) (a+b \arctan (c x))^2-2 b c \int \frac {(a+b \arctan (c x)) \log \left (2-\frac {2}{i c x+1}\right )}{c^2 x^2+1}dx\right )}{d}\) |
\(\Big \downarrow \) 5459 |
\(\displaystyle \frac {-\frac {(a+b \arctan (c x))^2}{x}+2 b c \left (i \int \frac {a+b \arctan (c x)}{x (c x+i)}dx-\frac {i (a+b \arctan (c x))^2}{2 b}\right )}{d}-\frac {i c \left (\log \left (2-\frac {2}{1+i c x}\right ) (a+b \arctan (c x))^2-2 b c \int \frac {(a+b \arctan (c x)) \log \left (2-\frac {2}{i c x+1}\right )}{c^2 x^2+1}dx\right )}{d}\) |
\(\Big \downarrow \) 5403 |
\(\displaystyle \frac {-\frac {(a+b \arctan (c x))^2}{x}+2 b c \left (i \left (i b c \int \frac {\log \left (2-\frac {2}{1-i c x}\right )}{c^2 x^2+1}dx-i \log \left (2-\frac {2}{1-i c x}\right ) (a+b \arctan (c x))\right )-\frac {i (a+b \arctan (c x))^2}{2 b}\right )}{d}-\frac {i c \left (\log \left (2-\frac {2}{1+i c x}\right ) (a+b \arctan (c x))^2-2 b c \int \frac {(a+b \arctan (c x)) \log \left (2-\frac {2}{i c x+1}\right )}{c^2 x^2+1}dx\right )}{d}\) |
\(\Big \downarrow \) 2897 |
\(\displaystyle \frac {-\frac {(a+b \arctan (c x))^2}{x}+2 b c \left (i \left (-i \log \left (2-\frac {2}{1-i c x}\right ) (a+b \arctan (c x))-\frac {1}{2} b \operatorname {PolyLog}\left (2,\frac {2}{1-i c x}-1\right )\right )-\frac {i (a+b \arctan (c x))^2}{2 b}\right )}{d}-\frac {i c \left (\log \left (2-\frac {2}{1+i c x}\right ) (a+b \arctan (c x))^2-2 b c \int \frac {(a+b \arctan (c x)) \log \left (2-\frac {2}{i c x+1}\right )}{c^2 x^2+1}dx\right )}{d}\) |
\(\Big \downarrow \) 5529 |
\(\displaystyle \frac {-\frac {(a+b \arctan (c x))^2}{x}+2 b c \left (i \left (-i \log \left (2-\frac {2}{1-i c x}\right ) (a+b \arctan (c x))-\frac {1}{2} b \operatorname {PolyLog}\left (2,\frac {2}{1-i c x}-1\right )\right )-\frac {i (a+b \arctan (c x))^2}{2 b}\right )}{d}-\frac {i c \left (\log \left (2-\frac {2}{1+i c x}\right ) (a+b \arctan (c x))^2-2 b c \left (\frac {1}{2} i b \int \frac {\operatorname {PolyLog}\left (2,\frac {2}{i c x+1}-1\right )}{c^2 x^2+1}dx-\frac {i \operatorname {PolyLog}\left (2,\frac {2}{i c x+1}-1\right ) (a+b \arctan (c x))}{2 c}\right )\right )}{d}\) |
\(\Big \downarrow \) 7164 |
\(\displaystyle \frac {-\frac {(a+b \arctan (c x))^2}{x}+2 b c \left (i \left (-i \log \left (2-\frac {2}{1-i c x}\right ) (a+b \arctan (c x))-\frac {1}{2} b \operatorname {PolyLog}\left (2,\frac {2}{1-i c x}-1\right )\right )-\frac {i (a+b \arctan (c x))^2}{2 b}\right )}{d}-\frac {i c \left (\log \left (2-\frac {2}{1+i c x}\right ) (a+b \arctan (c x))^2-2 b c \left (-\frac {i \operatorname {PolyLog}\left (2,\frac {2}{i c x+1}-1\right ) (a+b \arctan (c x))}{2 c}-\frac {b \operatorname {PolyLog}\left (3,\frac {2}{i c x+1}-1\right )}{4 c}\right )\right )}{d}\) |
Input:
Int[(a + b*ArcTan[c*x])^2/(x^2*(d + I*c*d*x)),x]
Output:
(-((a + b*ArcTan[c*x])^2/x) + 2*b*c*(((-1/2*I)*(a + b*ArcTan[c*x])^2)/b + I*((-I)*(a + b*ArcTan[c*x])*Log[2 - 2/(1 - I*c*x)] - (b*PolyLog[2, -1 + 2/ (1 - I*c*x)])/2)))/d - (I*c*((a + b*ArcTan[c*x])^2*Log[2 - 2/(1 + I*c*x)] - 2*b*c*(((-1/2*I)*(a + b*ArcTan[c*x])*PolyLog[2, -1 + 2/(1 + I*c*x)])/c - (b*PolyLog[3, -1 + 2/(1 + I*c*x)])/(4*c))))/d
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[Log[u_]*(Pq_)^(m_.), x_Symbol] :> With[{C = FullSimplify[Pq^m*((1 - u)/ D[u, x])]}, Simp[C*PolyLog[2, 1 - u], x] /; FreeQ[C, x]] /; IntegerQ[m] && PolyQ[Pq, x] && RationalFunctionQ[u, x] && LeQ[RationalFunctionExponents[u, x][[2]], Expon[Pq, x]]
Int[((a_.) + ArcTan[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)*((a + b*ArcTan[c*x^n])^p/(m + 1)), x] - Simp[b*c*n*(p/(m + 1)) Int[x^(m + n)*((a + b*ArcTan[c*x^n])^(p - 1)/(1 + c^2*x^(2*n))), x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0] && (EqQ[p, 1] || (EqQ[n, 1] & & IntegerQ[m])) && NeQ[m, -1]
Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_))), x_ Symbol] :> Simp[(a + b*ArcTan[c*x])^p*(Log[2 - 2/(1 + e*(x/d))]/d), x] - Si mp[b*c*(p/d) Int[(a + b*ArcTan[c*x])^(p - 1)*(Log[2 - 2/(1 + e*(x/d))]/(1 + c^2*x^2)), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[c^2* d^2 + e^2, 0]
Int[(((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_))/((d_) + (e _.)*(x_)), x_Symbol] :> Simp[1/d Int[(f*x)^m*(a + b*ArcTan[c*x])^p, x], x ] - Simp[e/(d*f) Int[(f*x)^(m + 1)*((a + b*ArcTan[c*x])^p/(d + e*x)), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IGtQ[p, 0] && EqQ[c^2*d^2 + e^2, 0] && LtQ[m, -1]
Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_)^2)), x_Symbol] :> Simp[(-I)*((a + b*ArcTan[c*x])^(p + 1)/(b*d*(p + 1))), x] + Si mp[I/d Int[(a + b*ArcTan[c*x])^p/(x*(I + c*x)), x], x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[e, c^2*d] && GtQ[p, 0]
Int[(Log[u_]*((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.))/((d_) + (e_.)*(x_)^2 ), x_Symbol] :> Simp[(-I)*(a + b*ArcTan[c*x])^p*(PolyLog[2, 1 - u]/(2*c*d)) , x] + Simp[b*p*(I/2) Int[(a + b*ArcTan[c*x])^(p - 1)*(PolyLog[2, 1 - u]/ (d + e*x^2)), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[e, c ^2*d] && EqQ[(1 - u)^2 - (1 - 2*(I/(I - c*x)))^2, 0]
Int[(u_)*PolyLog[n_, v_], x_Symbol] :> With[{w = DerivativeDivides[v, u*v, x]}, Simp[w*PolyLog[n + 1, v], x] /; !FalseQ[w]] /; FreeQ[n, x]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 12.82 (sec) , antiderivative size = 8468, normalized size of antiderivative = 45.53
method | result | size |
parts | \(\text {Expression too large to display}\) | \(8468\) |
derivativedivides | \(\text {Expression too large to display}\) | \(8470\) |
default | \(\text {Expression too large to display}\) | \(8470\) |
Input:
int((a+b*arctan(c*x))^2/x^2/(d+I*c*d*x),x,method=_RETURNVERBOSE)
Output:
result too large to display
\[ \int \frac {(a+b \arctan (c x))^2}{x^2 (d+i c d x)} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )}^{2}}{{\left (i \, c d x + d\right )} x^{2}} \,d x } \] Input:
integrate((a+b*arctan(c*x))^2/x^2/(d+I*c*d*x),x, algorithm="fricas")
Output:
1/4*(I*b^2*c*x*log(2*c*x/(c*x - I))*log(-(c*x + I)/(c*x - I))^2 + 2*I*b^2* c*x*dilog(-2*c*x/(c*x - I) + 1)*log(-(c*x + I)/(c*x - I)) - 2*I*b^2*c*x*po lylog(3, -(c*x + I)/(c*x - I)) + b^2*log(-(c*x + I)/(c*x - I))^2 + 4*d*x*i ntegral((-I*a^2*c*x + a^2 + ((a*b + I*b^2)*c*x + I*a*b)*log(-(c*x + I)/(c* x - I)))/(c^2*d*x^4 + d*x^2), x))/(d*x)
\[ \int \frac {(a+b \arctan (c x))^2}{x^2 (d+i c d x)} \, dx=- \frac {i \left (\int \frac {a^{2}}{c x^{3} - i x^{2}}\, dx + \int \frac {b^{2} \operatorname {atan}^{2}{\left (c x \right )}}{c x^{3} - i x^{2}}\, dx + \int \frac {2 a b \operatorname {atan}{\left (c x \right )}}{c x^{3} - i x^{2}}\, dx\right )}{d} \] Input:
integrate((a+b*atan(c*x))**2/x**2/(d+I*c*d*x),x)
Output:
-I*(Integral(a**2/(c*x**3 - I*x**2), x) + Integral(b**2*atan(c*x)**2/(c*x* *3 - I*x**2), x) + Integral(2*a*b*atan(c*x)/(c*x**3 - I*x**2), x))/d
\[ \int \frac {(a+b \arctan (c x))^2}{x^2 (d+i c d x)} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )}^{2}}{{\left (i \, c d x + d\right )} x^{2}} \,d x } \] Input:
integrate((a+b*arctan(c*x))^2/x^2/(d+I*c*d*x),x, algorithm="maxima")
Output:
a^2*(I*c*log(I*c*x + 1)/d - I*c*log(x)/d - 1/(d*x)) - 1/96*(24*b^2*c*x*arc tan(c*x)^3 + 3*I*b^2*c*x*log(c^2*x^2 + 1)^3 + 24*b^2*arctan(c*x)^2 - 2*I*( 384*b^2*c^3*integrate(1/16*x^3*arctan(c*x)^2/(c^2*d*x^4 + d*x^2), x) + b^2 *c*log(c^2*x^2 + 1)^3/d + 12*b^2*c*arctan(c*x)^2/d - 576*b^2*c*integrate(1 /16*x*arctan(c*x)^2/(c^2*d*x^4 + d*x^2), x) - 48*b^2*c*integrate(1/16*x*lo g(c^2*x^2 + 1)^2/(c^2*d*x^4 + d*x^2), x) - 1536*a*b*c*integrate(1/16*x*arc tan(c*x)/(c^2*d*x^4 + d*x^2), x) + 192*b^2*c*integrate(1/16*x*log(c^2*x^2 + 1)/(c^2*d*x^4 + d*x^2), x) - 192*b^2*integrate(1/16*arctan(c*x)*log(c^2* x^2 + 1)/(c^2*d*x^4 + d*x^2), x))*d*x - 16*(b^2*c*arctan(c*x)^3/d + 12*b^2 *c^2*integrate(1/16*x^2*log(c^2*x^2 + 1)^2/(c^2*d*x^4 + d*x^2), x) - 24*b^ 2*c^2*integrate(1/16*x^2*log(c^2*x^2 + 1)/(c^2*d*x^4 + d*x^2), x) - 24*b^2 *c*integrate(1/16*x*arctan(c*x)*log(c^2*x^2 + 1)/(c^2*d*x^4 + d*x^2), x) + 48*b^2*c*integrate(1/16*x*arctan(c*x)/(c^2*d*x^4 + d*x^2), x) + 72*b^2*in tegrate(1/16*arctan(c*x)^2/(c^2*d*x^4 + d*x^2), x) + 6*b^2*integrate(1/16* log(c^2*x^2 + 1)^2/(c^2*d*x^4 + d*x^2), x) + 192*a*b*integrate(1/16*arctan (c*x)/(c^2*d*x^4 + d*x^2), x))*d*x + 6*(b^2*c*x*arctan(c*x) - b^2)*log(c^2 *x^2 + 1)^2 + 12*(I*b^2*c*x*arctan(c*x)^2 + 2*I*b^2*arctan(c*x))*log(c^2*x ^2 + 1))/(d*x)
\[ \int \frac {(a+b \arctan (c x))^2}{x^2 (d+i c d x)} \, dx=\int { \frac {{\left (b \arctan \left (c x\right ) + a\right )}^{2}}{{\left (i \, c d x + d\right )} x^{2}} \,d x } \] Input:
integrate((a+b*arctan(c*x))^2/x^2/(d+I*c*d*x),x, algorithm="giac")
Output:
integrate((b*arctan(c*x) + a)^2/((I*c*d*x + d)*x^2), x)
Timed out. \[ \int \frac {(a+b \arctan (c x))^2}{x^2 (d+i c d x)} \, dx=\int \frac {{\left (a+b\,\mathrm {atan}\left (c\,x\right )\right )}^2}{x^2\,\left (d+c\,d\,x\,1{}\mathrm {i}\right )} \,d x \] Input:
int((a + b*atan(c*x))^2/(x^2*(d + c*d*x*1i)),x)
Output:
int((a + b*atan(c*x))^2/(x^2*(d + c*d*x*1i)), x)
\[ \int \frac {(a+b \arctan (c x))^2}{x^2 (d+i c d x)} \, dx=\frac {2 \left (\int \frac {\mathit {atan} \left (c x \right )}{c^{3} i \,x^{5}+c^{2} x^{4}+c i \,x^{3}+x^{2}}d x \right ) a b x +2 \left (\int \frac {\mathit {atan} \left (c x \right )}{c^{3} i \,x^{3}+c^{2} x^{2}+c i x +1}d x \right ) a b \,c^{2} x +\left (\int \frac {\mathit {atan} \left (c x \right )^{2}}{c^{3} i \,x^{5}+c^{2} x^{4}+c i \,x^{3}+x^{2}}d x \right ) b^{2} x +\left (\int \frac {\mathit {atan} \left (c x \right )^{2}}{c^{3} i \,x^{3}+c^{2} x^{2}+c i x +1}d x \right ) b^{2} c^{2} x +\mathrm {log}\left (c i x +1\right ) a^{2} c i x -\mathrm {log}\left (x \right ) a^{2} c i x -a^{2}}{d x} \] Input:
int((a+b*atan(c*x))^2/x^2/(d+I*c*d*x),x)
Output:
(2*int(atan(c*x)/(c**3*i*x**5 + c**2*x**4 + c*i*x**3 + x**2),x)*a*b*x + 2* int(atan(c*x)/(c**3*i*x**3 + c**2*x**2 + c*i*x + 1),x)*a*b*c**2*x + int(at an(c*x)**2/(c**3*i*x**5 + c**2*x**4 + c*i*x**3 + x**2),x)*b**2*x + int(ata n(c*x)**2/(c**3*i*x**3 + c**2*x**2 + c*i*x + 1),x)*b**2*c**2*x + log(c*i*x + 1)*a**2*c*i*x - log(x)*a**2*c*i*x - a**2)/(d*x)