Integrand size = 18, antiderivative size = 220 \[ \int (e+f x) \left (a+b \cot ^{-1}(c+d x)\right )^2 \, dx=\frac {a b f x}{d}+\frac {b^2 f (c+d x) \cot ^{-1}(c+d x)}{d^2}+\frac {i (d e-c f) \left (a+b \cot ^{-1}(c+d x)\right )^2}{d^2}-\frac {(d e+f-c f) (d e-(1+c) f) \left (a+b \cot ^{-1}(c+d x)\right )^2}{2 d^2 f}+\frac {(e+f x)^2 \left (a+b \cot ^{-1}(c+d x)\right )^2}{2 f}-\frac {2 b (d e-c f) \left (a+b \cot ^{-1}(c+d x)\right ) \log \left (\frac {2}{1+i (c+d x)}\right )}{d^2}+\frac {b^2 f \log \left (1+(c+d x)^2\right )}{2 d^2}+\frac {i b^2 (d e-c f) \operatorname {PolyLog}\left (2,1-\frac {2}{1+i (c+d x)}\right )}{d^2} \]
a*b*f*x/d+b^2*f*(d*x+c)*arccot(d*x+c)/d^2+I*(-c*f+d*e)*(a+b*arccot(d*x+c)) ^2/d^2-1/2*(-c*f+d*e+f)*(d*e-(1+c)*f)*(a+b*arccot(d*x+c))^2/d^2/f+1/2*(f*x +e)^2*(a+b*arccot(d*x+c))^2/f-2*b*(-c*f+d*e)*(a+b*arccot(d*x+c))*ln(2/(1+I *(d*x+c)))/d^2+1/2*b^2*f*ln(1+(d*x+c)^2)/d^2+I*b^2*(-c*f+d*e)*polylog(2,1- 2/(1+I*(d*x+c)))/d^2
Time = 1.05 (sec) , antiderivative size = 286, normalized size of antiderivative = 1.30 \[ \int (e+f x) \left (a+b \cot ^{-1}(c+d x)\right )^2 \, dx=\frac {2 a^2 c d e+2 a b c f-a^2 c^2 f+2 a^2 d^2 e x+2 a b d f x+a^2 d^2 f x^2+b^2 (i+c+d x) (-((i+c) f)+d (2 e+f x)) \cot ^{-1}(c+d x)^2-2 a b f \arctan (c+d x)+2 b \cot ^{-1}(c+d x) \left (-((c+d x) (-b f+a c f-a d (2 e+f x)))-2 b (d e-c f) \log \left (1-e^{2 i \cot ^{-1}(c+d x)}\right )\right )-4 a b d e \log \left (\frac {1}{(c+d x) \sqrt {1+\frac {1}{(c+d x)^2}}}\right )-2 b^2 f \log \left (\frac {1}{(c+d x) \sqrt {1+\frac {1}{(c+d x)^2}}}\right )+4 a b c f \log \left (\frac {1}{(c+d x) \sqrt {1+\frac {1}{(c+d x)^2}}}\right )+2 i b^2 (d e-c f) \operatorname {PolyLog}\left (2,e^{2 i \cot ^{-1}(c+d x)}\right )}{2 d^2} \]
(2*a^2*c*d*e + 2*a*b*c*f - a^2*c^2*f + 2*a^2*d^2*e*x + 2*a*b*d*f*x + a^2*d ^2*f*x^2 + b^2*(I + c + d*x)*(-((I + c)*f) + d*(2*e + f*x))*ArcCot[c + d*x ]^2 - 2*a*b*f*ArcTan[c + d*x] + 2*b*ArcCot[c + d*x]*(-((c + d*x)*(-(b*f) + a*c*f - a*d*(2*e + f*x))) - 2*b*(d*e - c*f)*Log[1 - E^((2*I)*ArcCot[c + d *x])]) - 4*a*b*d*e*Log[1/((c + d*x)*Sqrt[1 + (c + d*x)^(-2)])] - 2*b^2*f*L og[1/((c + d*x)*Sqrt[1 + (c + d*x)^(-2)])] + 4*a*b*c*f*Log[1/((c + d*x)*Sq rt[1 + (c + d*x)^(-2)])] + (2*I)*b^2*(d*e - c*f)*PolyLog[2, E^((2*I)*ArcCo t[c + d*x])])/(2*d^2)
Time = 0.59 (sec) , antiderivative size = 227, normalized size of antiderivative = 1.03, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {5571, 27, 5390, 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 (e+f x) \left (a+b \cot ^{-1}(c+d x)\right )^2 \, dx\) |
\(\Big \downarrow \) 5571 |
\(\displaystyle \frac {\int \frac {\left (d \left (e-\frac {c f}{d}\right )+f (c+d x)\right ) \left (a+b \cot ^{-1}(c+d x)\right )^2}{d}d(c+d x)}{d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\int (d e-c f+f (c+d x)) \left (a+b \cot ^{-1}(c+d x)\right )^2d(c+d x)}{d^2}\) |
\(\Big \downarrow \) 5390 |
\(\displaystyle \frac {\frac {b \int \left (\left (a+b \cot ^{-1}(c+d x)\right ) f^2+\frac {((d e-c f+f) (d e-(c+1) f)+2 f (d e-c f) (c+d x)) \left (a+b \cot ^{-1}(c+d x)\right )}{(c+d x)^2+1}\right )d(c+d x)}{f}+\frac {(f (c+d x)-c f+d e)^2 \left (a+b \cot ^{-1}(c+d x)\right )^2}{2 f}}{d^2}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {(f (c+d x)-c f+d e)^2 \left (a+b \cot ^{-1}(c+d x)\right )^2}{2 f}+\frac {b \left (\frac {i f (d e-c f) \left (a+b \cot ^{-1}(c+d x)\right )^2}{b}-\frac {(-c f+d e+f) (d e-(c+1) f) \left (a+b \cot ^{-1}(c+d x)\right )^2}{2 b}-2 f (d e-c f) \log \left (\frac {2}{1+i (c+d x)}\right ) \left (a+b \cot ^{-1}(c+d x)\right )+a f^2 (c+d x)+i b f (d e-c f) \operatorname {PolyLog}\left (2,1-\frac {2}{i (c+d x)+1}\right )+\frac {1}{2} b f^2 \log \left ((c+d x)^2+1\right )+b f^2 (c+d x) \cot ^{-1}(c+d x)\right )}{f}}{d^2}\) |
(((d*e - c*f + f*(c + d*x))^2*(a + b*ArcCot[c + d*x])^2)/(2*f) + (b*(a*f^2 *(c + d*x) + b*f^2*(c + d*x)*ArcCot[c + d*x] + (I*f*(d*e - c*f)*(a + b*Arc Cot[c + d*x])^2)/b - ((d*e + f - c*f)*(d*e - (1 + c)*f)*(a + b*ArcCot[c + d*x])^2)/(2*b) - 2*f*(d*e - c*f)*(a + b*ArcCot[c + d*x])*Log[2/(1 + I*(c + d*x))] + (b*f^2*Log[1 + (c + d*x)^2])/2 + I*b*f*(d*e - c*f)*PolyLog[2, 1 - 2/(1 + I*(c + d*x))]))/f)/d^2
3.2.37.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_.) + ArcCot[(c_.)*(x_)]*(b_.))^(p_)*((d_) + (e_.)*(x_))^(q_.), x_Sy mbol] :> Simp[(d + e*x)^(q + 1)*((a + b*ArcCot[c*x])^p/(e*(q + 1))), x] + S imp[b*c*(p/(e*(q + 1))) Int[ExpandIntegrand[(a + b*ArcCot[c*x])^(p - 1), (d + e*x)^(q + 1)/(1 + c^2*x^2), x], x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 1] && IntegerQ[q] && NeQ[q, -1]
Int[((a_.) + ArcCot[(c_) + (d_.)*(x_)]*(b_.))^(p_.)*((e_.) + (f_.)*(x_))^(m _.), x_Symbol] :> Simp[1/d Subst[Int[((d*e - c*f)/d + f*(x/d))^m*(a + b*A rcCot[x])^p, x], x, c + d*x], x] /; FreeQ[{a, b, c, d, e, f, m, p}, x] && I GtQ[p, 0]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 426 vs. \(2 (210 ) = 420\).
Time = 0.88 (sec) , antiderivative size = 427, normalized size of antiderivative = 1.94
method | result | size |
parts | \(a^{2} \left (\frac {1}{2} f \,x^{2}+e x \right )+\frac {b^{2} \left (\frac {\operatorname {arccot}\left (d x +c \right )^{2} \left (d x +c \right )^{2} f}{2 d}-\frac {\operatorname {arccot}\left (d x +c \right )^{2} c f \left (d x +c \right )}{d}+\operatorname {arccot}\left (d x +c \right )^{2} e \left (d x +c \right )+\frac {-\operatorname {arccot}\left (d x +c \right ) \ln \left (1+\left (d x +c \right )^{2}\right ) c f +\operatorname {arccot}\left (d x +c \right ) \ln \left (1+\left (d x +c \right )^{2}\right ) d e -\operatorname {arccot}\left (d x +c \right ) \arctan \left (d x +c \right ) f +\operatorname {arccot}\left (d x +c \right ) \left (d x +c \right ) f +\frac {f \ln \left (1+\left (d x +c \right )^{2}\right )}{2}-\frac {\arctan \left (d x +c \right )^{2} f}{2}+\frac {\left (-2 c f +2 d e \right ) \left (-\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}\right )}{2}}{d}\right )}{d}+\frac {2 a b \left (\frac {\operatorname {arccot}\left (d x +c \right ) \left (d x +c \right )^{2} f}{2 d}-\frac {\operatorname {arccot}\left (d x +c \right ) c f \left (d x +c \right )}{d}+\operatorname {arccot}\left (d x +c \right ) e \left (d x +c \right )+\frac {f \left (d x +c \right )+\frac {\left (-2 c f +2 d e \right ) \ln \left (1+\left (d x +c \right )^{2}\right )}{2}-f \arctan \left (d x +c \right )}{2 d}\right )}{d}\) | \(427\) |
derivativedivides | \(\frac {-\frac {a^{2} \left (f c \left (d x +c \right )-e d \left (d x +c \right )-\frac {f \left (d x +c \right )^{2}}{2}\right )}{d}-\frac {b^{2} \left (\operatorname {arccot}\left (d x +c \right )^{2} f c \left (d x +c \right )-\operatorname {arccot}\left (d x +c \right )^{2} e d \left (d x +c \right )-\frac {\operatorname {arccot}\left (d x +c \right )^{2} f \left (d x +c \right )^{2}}{2}+\operatorname {arccot}\left (d x +c \right ) \ln \left (1+\left (d x +c \right )^{2}\right ) c f -\operatorname {arccot}\left (d x +c \right ) \ln \left (1+\left (d x +c \right )^{2}\right ) d e +\operatorname {arccot}\left (d x +c \right ) \arctan \left (d x +c \right ) f -\operatorname {arccot}\left (d x +c \right ) \left (d x +c \right ) f -\frac {f \ln \left (1+\left (d x +c \right )^{2}\right )}{2}+\frac {\arctan \left (d x +c \right )^{2} f}{2}+\frac {\left (2 c f -2 d e \right ) \left (-\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}\right )}{2}\right )}{d}-\frac {2 a b \left (\operatorname {arccot}\left (d x +c \right ) f c \left (d x +c \right )-\operatorname {arccot}\left (d x +c \right ) e d \left (d x +c \right )-\frac {\operatorname {arccot}\left (d x +c \right ) f \left (d x +c \right )^{2}}{2}-\frac {f \left (d x +c \right )}{2}+\frac {\left (2 c f -2 d e \right ) \ln \left (1+\left (d x +c \right )^{2}\right )}{4}+\frac {f \arctan \left (d x +c \right )}{2}\right )}{d}}{d}\) | \(434\) |
default | \(\frac {-\frac {a^{2} \left (f c \left (d x +c \right )-e d \left (d x +c \right )-\frac {f \left (d x +c \right )^{2}}{2}\right )}{d}-\frac {b^{2} \left (\operatorname {arccot}\left (d x +c \right )^{2} f c \left (d x +c \right )-\operatorname {arccot}\left (d x +c \right )^{2} e d \left (d x +c \right )-\frac {\operatorname {arccot}\left (d x +c \right )^{2} f \left (d x +c \right )^{2}}{2}+\operatorname {arccot}\left (d x +c \right ) \ln \left (1+\left (d x +c \right )^{2}\right ) c f -\operatorname {arccot}\left (d x +c \right ) \ln \left (1+\left (d x +c \right )^{2}\right ) d e +\operatorname {arccot}\left (d x +c \right ) \arctan \left (d x +c \right ) f -\operatorname {arccot}\left (d x +c \right ) \left (d x +c \right ) f -\frac {f \ln \left (1+\left (d x +c \right )^{2}\right )}{2}+\frac {\arctan \left (d x +c \right )^{2} f}{2}+\frac {\left (2 c f -2 d e \right ) \left (-\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}\right )}{2}\right )}{d}-\frac {2 a b \left (\operatorname {arccot}\left (d x +c \right ) f c \left (d x +c \right )-\operatorname {arccot}\left (d x +c \right ) e d \left (d x +c \right )-\frac {\operatorname {arccot}\left (d x +c \right ) f \left (d x +c \right )^{2}}{2}-\frac {f \left (d x +c \right )}{2}+\frac {\left (2 c f -2 d e \right ) \ln \left (1+\left (d x +c \right )^{2}\right )}{4}+\frac {f \arctan \left (d x +c \right )}{2}\right )}{d}}{d}\) | \(434\) |
risch | \(\text {Expression too large to display}\) | \(1781\) |
a^2*(1/2*f*x^2+e*x)+b^2/d*(1/2/d*arccot(d*x+c)^2*(d*x+c)^2*f-1/d*arccot(d* x+c)^2*c*f*(d*x+c)+arccot(d*x+c)^2*e*(d*x+c)+1/d*(-arccot(d*x+c)*ln(1+(d*x +c)^2)*c*f+arccot(d*x+c)*ln(1+(d*x+c)^2)*d*e-arccot(d*x+c)*arctan(d*x+c)*f +arccot(d*x+c)*(d*x+c)*f+1/2*f*ln(1+(d*x+c)^2)-1/2*arctan(d*x+c)^2*f+1/2*( -2*c*f+2*d*e)*(-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))))))+2*a*b/d*(1/2/d*arccot(d*x+c)*(d*x+c)^2*f-1/d*arccot(d*x+c )*c*f*(d*x+c)+arccot(d*x+c)*e*(d*x+c)+1/2/d*(f*(d*x+c)+1/2*(-2*c*f+2*d*e)* ln(1+(d*x+c)^2)-f*arctan(d*x+c)))
\[ \int (e+f x) \left (a+b \cot ^{-1}(c+d x)\right )^2 \, dx=\int { {\left (f x + e\right )} {\left (b \operatorname {arccot}\left (d x + c\right ) + a\right )}^{2} \,d x } \]
integral(a^2*f*x + a^2*e + (b^2*f*x + b^2*e)*arccot(d*x + c)^2 + 2*(a*b*f* x + a*b*e)*arccot(d*x + c), x)
\[ \int (e+f x) \left (a+b \cot ^{-1}(c+d x)\right )^2 \, dx=\int \left (a + b \operatorname {acot}{\left (c + d x \right )}\right )^{2} \left (e + f x\right )\, dx \]
\[ \int (e+f x) \left (a+b \cot ^{-1}(c+d x)\right )^2 \, dx=\int { {\left (f x + e\right )} {\left (b \operatorname {arccot}\left (d x + c\right ) + a\right )}^{2} \,d x } \]
1/8*b^2*f*x^2*arctan2(1, d*x + c)^2 + 1/4*b^2*e*x*arctan2(1, d*x + c)^2 + 1/2*a^2*f*x^2 + (x^2*arccot(d*x + c) + d*(x/d^2 + (c^2 - 1)*arctan((d^2*x + c*d)/d)/d^3 - c*log(d^2*x^2 + 2*c*d*x + c^2 + 1)/d^3))*a*b*f + a^2*e*x + (2*(d*x + c)*arccot(d*x + c) + log((d*x + c)^2 + 1))*a*b*e/d - 1/32*(b^2* f*x^2 + 2*b^2*e*x)*log(d^2*x^2 + 2*c*d*x + c^2 + 1)^2 + integrate(1/16*(12 *b^2*d^2*f*x^3*arctan2(1, d*x + c)^2 + 4*(3*b^2*d^2*e*arctan2(1, d*x + c)^ 2 + (6*b^2*c*arctan2(1, d*x + c)^2 + b^2*arctan2(1, d*x + c))*d*f)*x^2 + ( b^2*d^2*f*x^3 + (b^2*d^2*e + 2*b^2*c*d*f)*x^2 + (b^2*c^2 + b^2)*e + (2*b^2 *c*d*e + (b^2*c^2 + b^2)*f)*x)*log(d^2*x^2 + 2*c*d*x + c^2 + 1)^2 + 12*(b^ 2*c^2*arctan2(1, d*x + c)^2 + b^2*arctan2(1, d*x + c)^2)*e + 4*(2*(3*b^2*c *arctan2(1, d*x + c)^2 + b^2*arctan2(1, d*x + c))*d*e + 3*(b^2*c^2*arctan2 (1, d*x + c)^2 + b^2*arctan2(1, d*x + c)^2)*f)*x + 2*(b^2*d^2*f*x^3 + 2*b^ 2*c*d*e*x + (2*b^2*d^2*e + b^2*c*d*f)*x^2)*log(d^2*x^2 + 2*c*d*x + c^2 + 1 ))/(d^2*x^2 + 2*c*d*x + c^2 + 1), x)
\[ \int (e+f x) \left (a+b \cot ^{-1}(c+d x)\right )^2 \, dx=\int { {\left (f x + e\right )} {\left (b \operatorname {arccot}\left (d x + c\right ) + a\right )}^{2} \,d x } \]
Timed out. \[ \int (e+f x) \left (a+b \cot ^{-1}(c+d x)\right )^2 \, dx=\int \left (e+f\,x\right )\,{\left (a+b\,\mathrm {acot}\left (c+d\,x\right )\right )}^2 \,d x \]