Integrand size = 23, antiderivative size = 119 \[ \int \frac {(a+b \arctan (c+d x))^2}{(c e+d e x)^2} \, dx=-\frac {i (a+b \arctan (c+d x))^2}{d e^2}-\frac {(a+b \arctan (c+d x))^2}{d e^2 (c+d x)}+\frac {2 b (a+b \arctan (c+d x)) \log \left (2-\frac {2}{1-i (c+d x)}\right )}{d e^2}-\frac {i b^2 \operatorname {PolyLog}\left (2,-1+\frac {2}{1-i (c+d x)}\right )}{d e^2} \] Output:
-I*(a+b*arctan(d*x+c))^2/d/e^2-(a+b*arctan(d*x+c))^2/d/e^2/(d*x+c)+2*b*(a+ b*arctan(d*x+c))*ln(2-2/(1-I*(d*x+c)))/d/e^2-I*b^2*polylog(2,-1+2/(1-I*(d* x+c)))/d/e^2
Time = 0.25 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.13 \[ \int \frac {(a+b \arctan (c+d x))^2}{(c e+d e x)^2} \, dx=\frac {-i b^2 (-i+c+d x) \arctan (c+d x)^2+2 b \arctan (c+d x) \left (-a+b (c+d x) \log \left (1-e^{2 i \arctan (c+d x)}\right )\right )+a \left (-a+2 b (c+d x) \log \left (\frac {c+d x}{\sqrt {1+(c+d x)^2}}\right )\right )-i b^2 (c+d x) \operatorname {PolyLog}\left (2,e^{2 i \arctan (c+d x)}\right )}{d e^2 (c+d x)} \] Input:
Integrate[(a + b*ArcTan[c + d*x])^2/(c*e + d*e*x)^2,x]
Output:
((-I)*b^2*(-I + c + d*x)*ArcTan[c + d*x]^2 + 2*b*ArcTan[c + d*x]*(-a + b*( c + d*x)*Log[1 - E^((2*I)*ArcTan[c + d*x])]) + a*(-a + 2*b*(c + d*x)*Log[( c + d*x)/Sqrt[1 + (c + d*x)^2]]) - I*b^2*(c + d*x)*PolyLog[2, E^((2*I)*Arc Tan[c + d*x])])/(d*e^2*(c + d*x))
Time = 0.56 (sec) , antiderivative size = 115, normalized size of antiderivative = 0.97, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {5566, 27, 5361, 5459, 5403, 2897}
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+d x))^2}{(c e+d e x)^2} \, dx\) |
\(\Big \downarrow \) 5566 |
\(\displaystyle \frac {\int \frac {(a+b \arctan (c+d x))^2}{e^2 (c+d x)^2}d(c+d x)}{d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\int \frac {(a+b \arctan (c+d x))^2}{(c+d x)^2}d(c+d x)}{d e^2}\) |
\(\Big \downarrow \) 5361 |
\(\displaystyle \frac {2 b \int \frac {a+b \arctan (c+d x)}{(c+d x) \left ((c+d x)^2+1\right )}d(c+d x)-\frac {(a+b \arctan (c+d x))^2}{c+d x}}{d e^2}\) |
\(\Big \downarrow \) 5459 |
\(\displaystyle \frac {-\frac {(a+b \arctan (c+d x))^2}{c+d x}+2 b \left (i \int \frac {a+b \arctan (c+d x)}{(c+d x) (c+d x+i)}d(c+d x)-\frac {i (a+b \arctan (c+d x))^2}{2 b}\right )}{d e^2}\) |
\(\Big \downarrow \) 5403 |
\(\displaystyle \frac {-\frac {(a+b \arctan (c+d x))^2}{c+d x}+2 b \left (i \left (i b \int \frac {\log \left (2-\frac {2}{1-i (c+d x)}\right )}{(c+d x)^2+1}d(c+d x)-i \log \left (2-\frac {2}{1-i (c+d x)}\right ) (a+b \arctan (c+d x))\right )-\frac {i (a+b \arctan (c+d x))^2}{2 b}\right )}{d e^2}\) |
\(\Big \downarrow \) 2897 |
\(\displaystyle \frac {-\frac {(a+b \arctan (c+d x))^2}{c+d x}+2 b \left (i \left (-i \log \left (2-\frac {2}{1-i (c+d x)}\right ) (a+b \arctan (c+d x))-\frac {1}{2} b \operatorname {PolyLog}\left (2,\frac {2}{1-i (c+d x)}-1\right )\right )-\frac {i (a+b \arctan (c+d x))^2}{2 b}\right )}{d e^2}\) |
Input:
Int[(a + b*ArcTan[c + d*x])^2/(c*e + d*e*x)^2,x]
Output:
(-((a + b*ArcTan[c + d*x])^2/(c + d*x)) + 2*b*(((-1/2*I)*(a + b*ArcTan[c + d*x])^2)/b + I*((-I)*(a + b*ArcTan[c + d*x])*Log[2 - 2/(1 - I*(c + d*x))] - (b*PolyLog[2, -1 + 2/(1 - I*(c + d*x))])/2)))/(d*e^2)
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_.)/((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[((a_.) + ArcTan[(c_) + (d_.)*(x_)]*(b_.))^(p_.)*((e_.) + (f_.)*(x_))^(m _.), x_Symbol] :> Simp[1/d Subst[Int[(f*(x/d))^m*(a + b*ArcTan[x])^p, x], x, c + d*x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[d*e - c*f, 0] && IGtQ[p, 0]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 324 vs. \(2 (115 ) = 230\).
Time = 0.92 (sec) , antiderivative size = 325, normalized size of antiderivative = 2.73
method | result | size |
derivativedivides | \(\frac {-\frac {a^{2}}{e^{2} \left (d x +c \right )}+\frac {b^{2} \left (-\frac {\arctan \left (d x +c \right )^{2}}{d x +c}+2 \ln \left (d x +c \right ) \arctan \left (d x +c \right )-\arctan \left (d x +c \right ) \ln \left (1+\left (d x +c \right )^{2}\right )-\frac {i \left (\ln \left (d x +c -i\right ) \ln \left (1+\left (d x +c \right )^{2}\right )-\frac {\ln \left (d x +c -i\right )^{2}}{2}-\operatorname {dilog}\left (-\frac {i \left (d x +c +i\right )}{2}\right )-\ln \left (d x +c -i\right ) \ln \left (-\frac {i \left (d x +c +i\right )}{2}\right )\right )}{2}+\frac {i \left (\ln \left (d x +c +i\right ) \ln \left (1+\left (d x +c \right )^{2}\right )-\frac {\ln \left (d x +c +i\right )^{2}}{2}-\operatorname {dilog}\left (\frac {i \left (d x +c -i\right )}{2}\right )-\ln \left (d x +c +i\right ) \ln \left (\frac {i \left (d x +c -i\right )}{2}\right )\right )}{2}+i \ln \left (d x +c \right ) \ln \left (1+i \left (d x +c \right )\right )-i \ln \left (d x +c \right ) \ln \left (1-i \left (d x +c \right )\right )+i \operatorname {dilog}\left (1+i \left (d x +c \right )\right )-i \operatorname {dilog}\left (1-i \left (d x +c \right )\right )\right )}{e^{2}}+\frac {2 a b \left (-\frac {\arctan \left (d x +c \right )}{d x +c}+\ln \left (d x +c \right )-\frac {\ln \left (1+\left (d x +c \right )^{2}\right )}{2}\right )}{e^{2}}}{d}\) | \(325\) |
default | \(\frac {-\frac {a^{2}}{e^{2} \left (d x +c \right )}+\frac {b^{2} \left (-\frac {\arctan \left (d x +c \right )^{2}}{d x +c}+2 \ln \left (d x +c \right ) \arctan \left (d x +c \right )-\arctan \left (d x +c \right ) \ln \left (1+\left (d x +c \right )^{2}\right )-\frac {i \left (\ln \left (d x +c -i\right ) \ln \left (1+\left (d x +c \right )^{2}\right )-\frac {\ln \left (d x +c -i\right )^{2}}{2}-\operatorname {dilog}\left (-\frac {i \left (d x +c +i\right )}{2}\right )-\ln \left (d x +c -i\right ) \ln \left (-\frac {i \left (d x +c +i\right )}{2}\right )\right )}{2}+\frac {i \left (\ln \left (d x +c +i\right ) \ln \left (1+\left (d x +c \right )^{2}\right )-\frac {\ln \left (d x +c +i\right )^{2}}{2}-\operatorname {dilog}\left (\frac {i \left (d x +c -i\right )}{2}\right )-\ln \left (d x +c +i\right ) \ln \left (\frac {i \left (d x +c -i\right )}{2}\right )\right )}{2}+i \ln \left (d x +c \right ) \ln \left (1+i \left (d x +c \right )\right )-i \ln \left (d x +c \right ) \ln \left (1-i \left (d x +c \right )\right )+i \operatorname {dilog}\left (1+i \left (d x +c \right )\right )-i \operatorname {dilog}\left (1-i \left (d x +c \right )\right )\right )}{e^{2}}+\frac {2 a b \left (-\frac {\arctan \left (d x +c \right )}{d x +c}+\ln \left (d x +c \right )-\frac {\ln \left (1+\left (d x +c \right )^{2}\right )}{2}\right )}{e^{2}}}{d}\) | \(325\) |
parts | \(-\frac {a^{2}}{e^{2} \left (d x +c \right ) d}+\frac {b^{2} \left (-\frac {\arctan \left (d x +c \right )^{2}}{d x +c}+2 \ln \left (d x +c \right ) \arctan \left (d x +c \right )-\arctan \left (d x +c \right ) \ln \left (1+\left (d x +c \right )^{2}\right )-\frac {i \left (\ln \left (d x +c -i\right ) \ln \left (1+\left (d x +c \right )^{2}\right )-\frac {\ln \left (d x +c -i\right )^{2}}{2}-\operatorname {dilog}\left (-\frac {i \left (d x +c +i\right )}{2}\right )-\ln \left (d x +c -i\right ) \ln \left (-\frac {i \left (d x +c +i\right )}{2}\right )\right )}{2}+\frac {i \left (\ln \left (d x +c +i\right ) \ln \left (1+\left (d x +c \right )^{2}\right )-\frac {\ln \left (d x +c +i\right )^{2}}{2}-\operatorname {dilog}\left (\frac {i \left (d x +c -i\right )}{2}\right )-\ln \left (d x +c +i\right ) \ln \left (\frac {i \left (d x +c -i\right )}{2}\right )\right )}{2}+i \ln \left (d x +c \right ) \ln \left (1+i \left (d x +c \right )\right )-i \ln \left (d x +c \right ) \ln \left (1-i \left (d x +c \right )\right )+i \operatorname {dilog}\left (1+i \left (d x +c \right )\right )-i \operatorname {dilog}\left (1-i \left (d x +c \right )\right )\right )}{e^{2} d}+\frac {2 a b \left (-\frac {\arctan \left (d x +c \right )}{d x +c}+\ln \left (d x +c \right )-\frac {\ln \left (1+\left (d x +c \right )^{2}\right )}{2}\right )}{e^{2} d}\) | \(330\) |
Input:
int((a+b*arctan(d*x+c))^2/(d*e*x+c*e)^2,x,method=_RETURNVERBOSE)
Output:
1/d*(-a^2/e^2/(d*x+c)+b^2/e^2*(-1/(d*x+c)*arctan(d*x+c)^2+2*ln(d*x+c)*arct an(d*x+c)-arctan(d*x+c)*ln(1+(d*x+c)^2)-1/2*I*(ln(d*x+c-I)*ln(1+(d*x+c)^2) -1/2*ln(d*x+c-I)^2-dilog(-1/2*I*(d*x+c+I))-ln(d*x+c-I)*ln(-1/2*I*(d*x+c+I) ))+1/2*I*(ln(d*x+c+I)*ln(1+(d*x+c)^2)-1/2*ln(d*x+c+I)^2-dilog(1/2*I*(d*x+c -I))-ln(d*x+c+I)*ln(1/2*I*(d*x+c-I)))+I*ln(d*x+c)*ln(1+I*(d*x+c))-I*ln(d*x +c)*ln(1-I*(d*x+c))+I*dilog(1+I*(d*x+c))-I*dilog(1-I*(d*x+c)))+2*a*b/e^2*( -1/(d*x+c)*arctan(d*x+c)+ln(d*x+c)-1/2*ln(1+(d*x+c)^2)))
\[ \int \frac {(a+b \arctan (c+d x))^2}{(c e+d e x)^2} \, dx=\int { \frac {{\left (b \arctan \left (d x + c\right ) + a\right )}^{2}}{{\left (d e x + c e\right )}^{2}} \,d x } \] Input:
integrate((a+b*arctan(d*x+c))^2/(d*e*x+c*e)^2,x, algorithm="fricas")
Output:
integral((b^2*arctan(d*x + c)^2 + 2*a*b*arctan(d*x + c) + a^2)/(d^2*e^2*x^ 2 + 2*c*d*e^2*x + c^2*e^2), x)
\[ \int \frac {(a+b \arctan (c+d x))^2}{(c e+d e x)^2} \, dx=\frac {\int \frac {a^{2}}{c^{2} + 2 c d x + d^{2} x^{2}}\, dx + \int \frac {b^{2} \operatorname {atan}^{2}{\left (c + d x \right )}}{c^{2} + 2 c d x + d^{2} x^{2}}\, dx + \int \frac {2 a b \operatorname {atan}{\left (c + d x \right )}}{c^{2} + 2 c d x + d^{2} x^{2}}\, dx}{e^{2}} \] Input:
integrate((a+b*atan(d*x+c))**2/(d*e*x+c*e)**2,x)
Output:
(Integral(a**2/(c**2 + 2*c*d*x + d**2*x**2), x) + Integral(b**2*atan(c + d *x)**2/(c**2 + 2*c*d*x + d**2*x**2), x) + Integral(2*a*b*atan(c + d*x)/(c* *2 + 2*c*d*x + d**2*x**2), x))/e**2
\[ \int \frac {(a+b \arctan (c+d x))^2}{(c e+d e x)^2} \, dx=\int { \frac {{\left (b \arctan \left (d x + c\right ) + a\right )}^{2}}{{\left (d e x + c e\right )}^{2}} \,d x } \] Input:
integrate((a+b*arctan(d*x+c))^2/(d*e*x+c*e)^2,x, algorithm="maxima")
Output:
-(d*(log(d^2*x^2 + 2*c*d*x + c^2 + 1)/(d^2*e^2) - 2*log(d*x + c)/(d^2*e^2) ) + 2*arctan(d*x + c)/(d^2*e^2*x + c*d*e^2))*a*b - 1/16*(4*arctan(d*x + c) ^2 - 16*(d^2*e^2*x + c*d*e^2)*integrate(1/16*(12*(d^2*x^2 + 2*c*d*x + c^2 + 1)*arctan(d*x + c)^2 + (d^2*x^2 + 2*c*d*x + c^2 + 1)*log(d^2*x^2 + 2*c*d *x + c^2 + 1)^2 + 8*(d*x + c)*arctan(d*x + c) - 4*(d^2*x^2 + 2*c*d*x + c^2 )*log(d^2*x^2 + 2*c*d*x + c^2 + 1))/(d^4*e^2*x^4 + 4*c*d^3*e^2*x^3 + (6*c^ 2 + 1)*d^2*e^2*x^2 + 2*(2*c^3 + c)*d*e^2*x + (c^4 + c^2)*e^2), x) - log(d^ 2*x^2 + 2*c*d*x + c^2 + 1)^2)*b^2/(d^2*e^2*x + c*d*e^2) - a^2/(d^2*e^2*x + c*d*e^2)
\[ \int \frac {(a+b \arctan (c+d x))^2}{(c e+d e x)^2} \, dx=\int { \frac {{\left (b \arctan \left (d x + c\right ) + a\right )}^{2}}{{\left (d e x + c e\right )}^{2}} \,d x } \] Input:
integrate((a+b*arctan(d*x+c))^2/(d*e*x+c*e)^2,x, algorithm="giac")
Output:
integrate((b*arctan(d*x + c) + a)^2/(d*e*x + c*e)^2, x)
Timed out. \[ \int \frac {(a+b \arctan (c+d x))^2}{(c e+d e x)^2} \, dx=\int \frac {{\left (a+b\,\mathrm {atan}\left (c+d\,x\right )\right )}^2}{{\left (c\,e+d\,e\,x\right )}^2} \,d x \] Input:
int((a + b*atan(c + d*x))^2/(c*e + d*e*x)^2,x)
Output:
int((a + b*atan(c + d*x))^2/(c*e + d*e*x)^2, x)
\[ \int \frac {(a+b \arctan (c+d x))^2}{(c e+d e x)^2} \, dx=\frac {-\mathit {atan} \left (d x +c \right )^{2} b^{2} c^{3}-\mathit {atan} \left (d x +c \right )^{2} b^{2} c^{2} d x -\mathit {atan} \left (d x +c \right )^{2} b^{2} c +\mathit {atan} \left (d x +c \right )^{2} b^{2} d x -4 \mathit {atan} \left (d x +c \right ) a b c -2 \mathit {atan} \left (d x +c \right ) b^{2} c^{2}-2 \left (\int \frac {\mathit {atan} \left (d x +c \right ) x^{2}}{d^{4} x^{4}+4 c \,d^{3} x^{3}+6 c^{2} d^{2} x^{2}+4 c^{3} d x +c^{4}+d^{2} x^{2}+2 c d x +c^{2}}d x \right ) b^{2} c \,d^{3}-2 \left (\int \frac {\mathit {atan} \left (d x +c \right ) x^{2}}{d^{4} x^{4}+4 c \,d^{3} x^{3}+6 c^{2} d^{2} x^{2}+4 c^{3} d x +c^{4}+d^{2} x^{2}+2 c d x +c^{2}}d x \right ) b^{2} d^{4} x -2 \,\mathrm {log}\left (d^{2} x^{2}+2 c d x +c^{2}+1\right ) a b \,c^{2}-2 \,\mathrm {log}\left (d^{2} x^{2}+2 c d x +c^{2}+1\right ) a b c d x -\mathrm {log}\left (d^{2} x^{2}+2 c d x +c^{2}+1\right ) b^{2} c^{3}-\mathrm {log}\left (d^{2} x^{2}+2 c d x +c^{2}+1\right ) b^{2} c^{2} d x +4 \,\mathrm {log}\left (d x +c \right ) a b \,c^{2}+4 \,\mathrm {log}\left (d x +c \right ) a b c d x +2 \,\mathrm {log}\left (d x +c \right ) b^{2} c^{3}+2 \,\mathrm {log}\left (d x +c \right ) b^{2} c^{2} d x +2 a^{2} d x}{2 c d \,e^{2} \left (d x +c \right )} \] Input:
int((a+b*atan(d*x+c))^2/(d*e*x+c*e)^2,x)
Output:
( - atan(c + d*x)**2*b**2*c**3 - atan(c + d*x)**2*b**2*c**2*d*x - atan(c + d*x)**2*b**2*c + atan(c + d*x)**2*b**2*d*x - 4*atan(c + d*x)*a*b*c - 2*at an(c + d*x)*b**2*c**2 - 2*int((atan(c + d*x)*x**2)/(c**4 + 4*c**3*d*x + 6* c**2*d**2*x**2 + c**2 + 4*c*d**3*x**3 + 2*c*d*x + d**4*x**4 + d**2*x**2),x )*b**2*c*d**3 - 2*int((atan(c + d*x)*x**2)/(c**4 + 4*c**3*d*x + 6*c**2*d** 2*x**2 + c**2 + 4*c*d**3*x**3 + 2*c*d*x + d**4*x**4 + d**2*x**2),x)*b**2*d **4*x - 2*log(c**2 + 2*c*d*x + d**2*x**2 + 1)*a*b*c**2 - 2*log(c**2 + 2*c* d*x + d**2*x**2 + 1)*a*b*c*d*x - log(c**2 + 2*c*d*x + d**2*x**2 + 1)*b**2* c**3 - log(c**2 + 2*c*d*x + d**2*x**2 + 1)*b**2*c**2*d*x + 4*log(c + d*x)* a*b*c**2 + 4*log(c + d*x)*a*b*c*d*x + 2*log(c + d*x)*b**2*c**3 + 2*log(c + d*x)*b**2*c**2*d*x + 2*a**2*d*x)/(2*c*d*e**2*(c + d*x))