Integrand size = 23, antiderivative size = 183 \[ \int \frac {(a+b \arctan (c+d x))^2}{c e+d e x} \, dx=\frac {2 (a+b \arctan (c+d x))^2 \text {arctanh}\left (1-\frac {2}{1+i (c+d x)}\right )}{d e}-\frac {i b (a+b \arctan (c+d x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1+i (c+d x)}\right )}{d e}+\frac {i b (a+b \arctan (c+d x)) \operatorname {PolyLog}\left (2,-1+\frac {2}{1+i (c+d x)}\right )}{d e}-\frac {b^2 \operatorname {PolyLog}\left (3,1-\frac {2}{1+i (c+d x)}\right )}{2 d e}+\frac {b^2 \operatorname {PolyLog}\left (3,-1+\frac {2}{1+i (c+d x)}\right )}{2 d e} \] Output:
-2*(a+b*arctan(d*x+c))^2*arctanh(-1+2/(1+I*(d*x+c)))/d/e-I*b*(a+b*arctan(d *x+c))*polylog(2,1-2/(1+I*(d*x+c)))/d/e+I*b*(a+b*arctan(d*x+c))*polylog(2, -1+2/(1+I*(d*x+c)))/d/e-1/2*b^2*polylog(3,1-2/(1+I*(d*x+c)))/d/e+1/2*b^2*p olylog(3,-1+2/(1+I*(d*x+c)))/d/e
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(381\) vs. \(2(183)=366\).
Time = 0.28 (sec) , antiderivative size = 381, normalized size of antiderivative = 2.08 \[ \int \frac {(a+b \arctan (c+d x))^2}{c e+d e x} \, dx=\frac {-6 i a b \pi ^2-i b^2 \pi ^3+24 i a b \pi \arctan (c+d x)-48 i a b \arctan (c+d x)^2+16 i b^2 \arctan (c+d x)^3-a b \pi \log (16777216)+24 b^2 \arctan (c+d x)^2 \log \left (1-e^{-2 i \arctan (c+d x)}\right )+24 a b \pi \log \left (1+e^{-2 i \arctan (c+d x)}\right )-48 a b \arctan (c+d x) \log \left (1+e^{-2 i \arctan (c+d x)}\right )+48 a b \arctan (c+d x) \log \left (1-e^{2 i \arctan (c+d x)}\right )-24 b^2 \arctan (c+d x)^2 \log \left (1+e^{2 i \arctan (c+d x)}\right )+24 a^2 \log (c+d x)+12 a b \pi \log \left (1+c^2+2 c d x+d^2 x^2\right )-24 i a b \operatorname {PolyLog}\left (2,-e^{-2 i \arctan (c+d x)}\right )+24 i b^2 \arctan (c+d x) \operatorname {PolyLog}\left (2,e^{-2 i \arctan (c+d x)}\right )+24 i b^2 \arctan (c+d x) \operatorname {PolyLog}\left (2,-e^{2 i \arctan (c+d x)}\right )-24 i a b \operatorname {PolyLog}\left (2,e^{2 i \arctan (c+d x)}\right )+12 b^2 \operatorname {PolyLog}\left (3,e^{-2 i \arctan (c+d x)}\right )-12 b^2 \operatorname {PolyLog}\left (3,-e^{2 i \arctan (c+d x)}\right )}{24 d e} \] Input:
Integrate[(a + b*ArcTan[c + d*x])^2/(c*e + d*e*x),x]
Output:
((-6*I)*a*b*Pi^2 - I*b^2*Pi^3 + (24*I)*a*b*Pi*ArcTan[c + d*x] - (48*I)*a*b *ArcTan[c + d*x]^2 + (16*I)*b^2*ArcTan[c + d*x]^3 - a*b*Pi*Log[16777216] + 24*b^2*ArcTan[c + d*x]^2*Log[1 - E^((-2*I)*ArcTan[c + d*x])] + 24*a*b*Pi* Log[1 + E^((-2*I)*ArcTan[c + d*x])] - 48*a*b*ArcTan[c + d*x]*Log[1 + E^((- 2*I)*ArcTan[c + d*x])] + 48*a*b*ArcTan[c + d*x]*Log[1 - E^((2*I)*ArcTan[c + d*x])] - 24*b^2*ArcTan[c + d*x]^2*Log[1 + E^((2*I)*ArcTan[c + d*x])] + 2 4*a^2*Log[c + d*x] + 12*a*b*Pi*Log[1 + c^2 + 2*c*d*x + d^2*x^2] - (24*I)*a *b*PolyLog[2, -E^((-2*I)*ArcTan[c + d*x])] + (24*I)*b^2*ArcTan[c + d*x]*Po lyLog[2, E^((-2*I)*ArcTan[c + d*x])] + (24*I)*b^2*ArcTan[c + d*x]*PolyLog[ 2, -E^((2*I)*ArcTan[c + d*x])] - (24*I)*a*b*PolyLog[2, E^((2*I)*ArcTan[c + d*x])] + 12*b^2*PolyLog[3, E^((-2*I)*ArcTan[c + d*x])] - 12*b^2*PolyLog[3 , -E^((2*I)*ArcTan[c + d*x])])/(24*d*e)
Time = 0.78 (sec) , antiderivative size = 172, normalized size of antiderivative = 0.94, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {5566, 27, 5357, 5523, 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+d x))^2}{c e+d e x} \, dx\) |
\(\Big \downarrow \) 5566 |
\(\displaystyle \frac {\int \frac {(a+b \arctan (c+d x))^2}{e (c+d x)}d(c+d x)}{d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\int \frac {(a+b \arctan (c+d x))^2}{c+d x}d(c+d x)}{d e}\) |
\(\Big \downarrow \) 5357 |
\(\displaystyle \frac {2 \text {arctanh}\left (1-\frac {2}{1+i (c+d x)}\right ) (a+b \arctan (c+d x))^2-4 b \int \frac {(a+b \arctan (c+d x)) \text {arctanh}\left (1-\frac {2}{i (c+d x)+1}\right )}{(c+d x)^2+1}d(c+d x)}{d e}\) |
\(\Big \downarrow \) 5523 |
\(\displaystyle \frac {2 \text {arctanh}\left (1-\frac {2}{1+i (c+d x)}\right ) (a+b \arctan (c+d x))^2-4 b \left (\frac {1}{2} \int \frac {(a+b \arctan (c+d x)) \log \left (2-\frac {2}{i (c+d x)+1}\right )}{(c+d x)^2+1}d(c+d x)-\frac {1}{2} \int \frac {(a+b \arctan (c+d x)) \log \left (\frac {2}{i (c+d x)+1}\right )}{(c+d x)^2+1}d(c+d x)\right )}{d e}\) |
\(\Big \downarrow \) 5529 |
\(\displaystyle \frac {2 \text {arctanh}\left (1-\frac {2}{1+i (c+d x)}\right ) (a+b \arctan (c+d x))^2-4 b \left (\frac {1}{2} \left (\frac {1}{2} i \operatorname {PolyLog}\left (2,1-\frac {2}{i (c+d x)+1}\right ) (a+b \arctan (c+d x))-\frac {1}{2} i b \int \frac {\operatorname {PolyLog}\left (2,1-\frac {2}{i (c+d x)+1}\right )}{(c+d x)^2+1}d(c+d x)\right )+\frac {1}{2} \left (\frac {1}{2} i b \int \frac {\operatorname {PolyLog}\left (2,\frac {2}{i (c+d x)+1}-1\right )}{(c+d x)^2+1}d(c+d x)-\frac {1}{2} i \operatorname {PolyLog}\left (2,\frac {2}{i (c+d x)+1}-1\right ) (a+b \arctan (c+d x))\right )\right )}{d e}\) |
\(\Big \downarrow \) 7164 |
\(\displaystyle \frac {2 \text {arctanh}\left (1-\frac {2}{1+i (c+d x)}\right ) (a+b \arctan (c+d x))^2-4 b \left (\frac {1}{2} \left (\frac {1}{2} i \operatorname {PolyLog}\left (2,1-\frac {2}{i (c+d x)+1}\right ) (a+b \arctan (c+d x))+\frac {1}{4} b \operatorname {PolyLog}\left (3,1-\frac {2}{i (c+d x)+1}\right )\right )+\frac {1}{2} \left (-\frac {1}{2} i \operatorname {PolyLog}\left (2,\frac {2}{i (c+d x)+1}-1\right ) (a+b \arctan (c+d x))-\frac {1}{4} b \operatorname {PolyLog}\left (3,\frac {2}{i (c+d x)+1}-1\right )\right )\right )}{d e}\) |
Input:
Int[(a + b*ArcTan[c + d*x])^2/(c*e + d*e*x),x]
Output:
(2*(a + b*ArcTan[c + d*x])^2*ArcTanh[1 - 2/(1 + I*(c + d*x))] - 4*b*(((I/2 )*(a + b*ArcTan[c + d*x])*PolyLog[2, 1 - 2/(1 + I*(c + d*x))] + (b*PolyLog [3, 1 - 2/(1 + I*(c + d*x))])/4)/2 + ((-1/2*I)*(a + b*ArcTan[c + d*x])*Pol yLog[2, -1 + 2/(1 + I*(c + d*x))] - (b*PolyLog[3, -1 + 2/(1 + I*(c + d*x)) ])/4)/2))/(d*e)
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_)/(x_), x_Symbol] :> Simp[2*(a + b*ArcTan[c*x])^p*ArcTanh[1 - 2/(1 + I*c*x)], x] - Simp[2*b*c*p Int[(a + b *ArcTan[c*x])^(p - 1)*(ArcTanh[1 - 2/(1 + I*c*x)]/(1 + c^2*x^2)), x], x] /; FreeQ[{a, b, c}, x] && IGtQ[p, 1]
Int[(ArcTanh[u_]*((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.))/((d_) + (e_.)*(x _)^2), x_Symbol] :> Simp[1/2 Int[Log[1 + u]*((a + b*ArcTan[c*x])^p/(d + e *x^2)), x], x] - Simp[1/2 Int[Log[1 - u]*((a + b*ArcTan[c*x])^p/(d + e*x^ 2)), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[e, c^2*d] && EqQ[u^2 - (1 - 2*(I/(I - c*x)))^2, 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[((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]
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 = 2.39 (sec) , antiderivative size = 1154, normalized size of antiderivative = 6.31
method | result | size |
derivativedivides | \(\text {Expression too large to display}\) | \(1154\) |
default | \(\text {Expression too large to display}\) | \(1154\) |
parts | \(\text {Expression too large to display}\) | \(1159\) |
Input:
int((a+b*arctan(d*x+c))^2/(d*e*x+c*e),x,method=_RETURNVERBOSE)
Output:
1/d*(a^2/e*ln(d*x+c)+b^2/e*(ln(d*x+c)*arctan(d*x+c)^2+I*arctan(d*x+c)*poly log(2,-(1+I*(d*x+c))^2/(1+(d*x+c)^2))-1/2*polylog(3,-(1+I*(d*x+c))^2/(1+(d *x+c)^2))-arctan(d*x+c)^2*ln((1+I*(d*x+c))^2/(1+(d*x+c)^2)-1)+arctan(d*x+c )^2*ln(1+(1+I*(d*x+c))/(1+(d*x+c)^2)^(1/2))-2*I*arctan(d*x+c)*polylog(2,-( 1+I*(d*x+c))/(1+(d*x+c)^2)^(1/2))+2*polylog(3,-(1+I*(d*x+c))/(1+(d*x+c)^2) ^(1/2))+arctan(d*x+c)^2*ln(1-(1+I*(d*x+c))/(1+(d*x+c)^2)^(1/2))-2*I*arctan (d*x+c)*polylog(2,(1+I*(d*x+c))/(1+(d*x+c)^2)^(1/2))+2*polylog(3,(1+I*(d*x +c))/(1+(d*x+c)^2)^(1/2))+1/2*I*Pi*(csgn(I*((1+I*(d*x+c))^2/(1+(d*x+c)^2)- 1)/(1+(1+I*(d*x+c))^2/(1+(d*x+c)^2)))*csgn(((1+I*(d*x+c))^2/(1+(d*x+c)^2)- 1)/(1+(1+I*(d*x+c))^2/(1+(d*x+c)^2)))-csgn(((1+I*(d*x+c))^2/(1+(d*x+c)^2)- 1)/(1+(1+I*(d*x+c))^2/(1+(d*x+c)^2)))^2+csgn(I*((1+I*(d*x+c))^2/(1+(d*x+c) ^2)-1))*csgn(I/(1+(1+I*(d*x+c))^2/(1+(d*x+c)^2)))*csgn(I*((1+I*(d*x+c))^2/ (1+(d*x+c)^2)-1)/(1+(1+I*(d*x+c))^2/(1+(d*x+c)^2)))-csgn(I*((1+I*(d*x+c))^ 2/(1+(d*x+c)^2)-1))*csgn(I*((1+I*(d*x+c))^2/(1+(d*x+c)^2)-1)/(1+(1+I*(d*x+ c))^2/(1+(d*x+c)^2)))^2-csgn(I/(1+(1+I*(d*x+c))^2/(1+(d*x+c)^2)))*csgn(I*( (1+I*(d*x+c))^2/(1+(d*x+c)^2)-1)/(1+(1+I*(d*x+c))^2/(1+(d*x+c)^2)))^2+csgn (I*((1+I*(d*x+c))^2/(1+(d*x+c)^2)-1)/(1+(1+I*(d*x+c))^2/(1+(d*x+c)^2)))^3- csgn(I*((1+I*(d*x+c))^2/(1+(d*x+c)^2)-1)/(1+(1+I*(d*x+c))^2/(1+(d*x+c)^2)) )*csgn(((1+I*(d*x+c))^2/(1+(d*x+c)^2)-1)/(1+(1+I*(d*x+c))^2/(1+(d*x+c)^2)) )^2+csgn(((1+I*(d*x+c))^2/(1+(d*x+c)^2)-1)/(1+(1+I*(d*x+c))^2/(1+(d*x+c...
\[ \int \frac {(a+b \arctan (c+d x))^2}{c e+d e x} \, dx=\int { \frac {{\left (b \arctan \left (d x + c\right ) + a\right )}^{2}}{d e x + c e} \,d x } \] Input:
integrate((a+b*arctan(d*x+c))^2/(d*e*x+c*e),x, algorithm="fricas")
Output:
integral((b^2*arctan(d*x + c)^2 + 2*a*b*arctan(d*x + c) + a^2)/(d*e*x + c* e), x)
\[ \int \frac {(a+b \arctan (c+d x))^2}{c e+d e x} \, dx=\frac {\int \frac {a^{2}}{c + d x}\, dx + \int \frac {b^{2} \operatorname {atan}^{2}{\left (c + d x \right )}}{c + d x}\, dx + \int \frac {2 a b \operatorname {atan}{\left (c + d x \right )}}{c + d x}\, dx}{e} \] Input:
integrate((a+b*atan(d*x+c))**2/(d*e*x+c*e),x)
Output:
(Integral(a**2/(c + d*x), x) + Integral(b**2*atan(c + d*x)**2/(c + d*x), x ) + Integral(2*a*b*atan(c + d*x)/(c + d*x), x))/e
\[ \int \frac {(a+b \arctan (c+d x))^2}{c e+d e x} \, dx=\int { \frac {{\left (b \arctan \left (d x + c\right ) + a\right )}^{2}}{d e x + c e} \,d x } \] Input:
integrate((a+b*arctan(d*x+c))^2/(d*e*x+c*e),x, algorithm="maxima")
Output:
a^2*log(d*e*x + c*e)/(d*e) + integrate(1/16*(12*b^2*arctan(d*x + c)^2 + b^ 2*log(d^2*x^2 + 2*c*d*x + c^2 + 1)^2 + 32*a*b*arctan(d*x + c))/(d*e*x + c* e), x)
\[ \int \frac {(a+b \arctan (c+d x))^2}{c e+d e x} \, dx=\int { \frac {{\left (b \arctan \left (d x + c\right ) + a\right )}^{2}}{d e x + c e} \,d x } \] Input:
integrate((a+b*arctan(d*x+c))^2/(d*e*x+c*e),x, algorithm="giac")
Output:
integrate((b*arctan(d*x + c) + a)^2/(d*e*x + c*e), x)
Timed out. \[ \int \frac {(a+b \arctan (c+d x))^2}{c e+d e x} \, dx=\int \frac {{\left (a+b\,\mathrm {atan}\left (c+d\,x\right )\right )}^2}{c\,e+d\,e\,x} \,d x \] Input:
int((a + b*atan(c + d*x))^2/(c*e + d*e*x),x)
Output:
int((a + b*atan(c + d*x))^2/(c*e + d*e*x), x)
\[ \int \frac {(a+b \arctan (c+d x))^2}{c e+d e x} \, dx=\frac {2 \left (\int \frac {\mathit {atan} \left (d x +c \right )}{d x +c}d x \right ) a b d +\left (\int \frac {\mathit {atan} \left (d x +c \right )^{2}}{d x +c}d x \right ) b^{2} d +\mathrm {log}\left (d x +c \right ) a^{2}}{d e} \] Input:
int((a+b*atan(d*x+c))^2/(d*e*x+c*e),x)
Output:
(2*int(atan(c + d*x)/(c + d*x),x)*a*b*d + int(atan(c + d*x)**2/(c + d*x),x )*b**2*d + log(c + d*x)*a**2)/(d*e)