Integrand size = 20, antiderivative size = 382 \[ \int (e+f x)^2 \left (a+b \cot ^{-1}(c+d x)\right )^2 \, dx=\frac {b^2 f^2 x}{3 d^2}+\frac {2 a b f (d e-c f) x}{d^2}+\frac {2 b^2 f (d e-c f) (c+d x) \cot ^{-1}(c+d x)}{d^3}+\frac {b f^2 (c+d x)^2 \left (a+b \cot ^{-1}(c+d x)\right )}{3 d^3}+\frac {i \left (3 d^2 e^2-6 c d e f-\left (1-3 c^2\right ) f^2\right ) \left (a+b \cot ^{-1}(c+d x)\right )^2}{3 d^3}-\frac {(d e-c f) \left (d^2 e^2-2 c d e f-\left (3-c^2\right ) f^2\right ) \left (a+b \cot ^{-1}(c+d x)\right )^2}{3 d^3 f}+\frac {(e+f x)^3 \left (a+b \cot ^{-1}(c+d x)\right )^2}{3 f}-\frac {b^2 f^2 \arctan (c+d x)}{3 d^3}-\frac {2 b \left (3 d^2 e^2-6 c d e f-\left (1-3 c^2\right ) f^2\right ) \left (a+b \cot ^{-1}(c+d x)\right ) \log \left (\frac {2}{1+i (c+d x)}\right )}{3 d^3}+\frac {b^2 f (d e-c f) \log \left (1+(c+d x)^2\right )}{d^3}+\frac {i b^2 \left (3 d^2 e^2-6 c d e f-\left (1-3 c^2\right ) f^2\right ) \operatorname {PolyLog}\left (2,1-\frac {2}{1+i (c+d x)}\right )}{3 d^3} \]
[Out]
Time = 0.42 (sec) , antiderivative size = 382, normalized size of antiderivative = 1.00, number of steps used = 16, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.650, Rules used = {5156, 4975, 4931, 266, 4947, 327, 209, 5105, 5005, 5041, 4965, 2449, 2352} \[ \int (e+f x)^2 \left (a+b \cot ^{-1}(c+d x)\right )^2 \, dx=\frac {i \left (-\left (1-3 c^2\right ) f^2-6 c d e f+3 d^2 e^2\right ) \left (a+b \cot ^{-1}(c+d x)\right )^2}{3 d^3}-\frac {(d e-c f) \left (-\left (3-c^2\right ) f^2-2 c d e f+d^2 e^2\right ) \left (a+b \cot ^{-1}(c+d x)\right )^2}{3 d^3 f}-\frac {2 b \left (-\left (1-3 c^2\right ) f^2-6 c d e f+3 d^2 e^2\right ) \log \left (\frac {2}{1+i (c+d x)}\right ) \left (a+b \cot ^{-1}(c+d x)\right )}{3 d^3}+\frac {b f^2 (c+d x)^2 \left (a+b \cot ^{-1}(c+d x)\right )}{3 d^3}+\frac {2 a b f x (d e-c f)}{d^2}+\frac {(e+f x)^3 \left (a+b \cot ^{-1}(c+d x)\right )^2}{3 f}-\frac {b^2 f^2 \arctan (c+d x)}{3 d^3}+\frac {i b^2 \left (-\left (1-3 c^2\right ) f^2-6 c d e f+3 d^2 e^2\right ) \operatorname {PolyLog}\left (2,1-\frac {2}{i (c+d x)+1}\right )}{3 d^3}+\frac {b^2 f (d e-c f) \log \left ((c+d x)^2+1\right )}{d^3}+\frac {2 b^2 f (c+d x) (d e-c f) \cot ^{-1}(c+d x)}{d^3}+\frac {b^2 f^2 x}{3 d^2} \]
[In]
[Out]
Rule 209
Rule 266
Rule 327
Rule 2352
Rule 2449
Rule 4931
Rule 4947
Rule 4965
Rule 4975
Rule 5005
Rule 5041
Rule 5105
Rule 5156
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \left (\frac {d e-c f}{d}+\frac {f x}{d}\right )^2 \left (a+b \cot ^{-1}(x)\right )^2 \, dx,x,c+d x\right )}{d} \\ & = \frac {(e+f x)^3 \left (a+b \cot ^{-1}(c+d x)\right )^2}{3 f}+\frac {(2 b) \text {Subst}\left (\int \left (\frac {3 f^2 (d e-c f) \left (a+b \cot ^{-1}(x)\right )}{d^3}+\frac {f^3 x \left (a+b \cot ^{-1}(x)\right )}{d^3}+\frac {\left ((d e-c f) \left (d^2 e^2-2 c d e f-3 f^2+c^2 f^2\right )+f \left (3 d^2 e^2-6 c d e f-\left (1-3 c^2\right ) f^2\right ) x\right ) \left (a+b \cot ^{-1}(x)\right )}{d^3 \left (1+x^2\right )}\right ) \, dx,x,c+d x\right )}{3 f} \\ & = \frac {(e+f x)^3 \left (a+b \cot ^{-1}(c+d x)\right )^2}{3 f}+\frac {(2 b) \text {Subst}\left (\int \frac {\left ((d e-c f) \left (d^2 e^2-2 c d e f-3 f^2+c^2 f^2\right )+f \left (3 d^2 e^2-6 c d e f-\left (1-3 c^2\right ) f^2\right ) x\right ) \left (a+b \cot ^{-1}(x)\right )}{1+x^2} \, dx,x,c+d x\right )}{3 d^3 f}+\frac {\left (2 b f^2\right ) \text {Subst}\left (\int x \left (a+b \cot ^{-1}(x)\right ) \, dx,x,c+d x\right )}{3 d^3}+\frac {(2 b f (d e-c f)) \text {Subst}\left (\int \left (a+b \cot ^{-1}(x)\right ) \, dx,x,c+d x\right )}{d^3} \\ & = \frac {2 a b f (d e-c f) x}{d^2}+\frac {b f^2 (c+d x)^2 \left (a+b \cot ^{-1}(c+d x)\right )}{3 d^3}+\frac {(e+f x)^3 \left (a+b \cot ^{-1}(c+d x)\right )^2}{3 f}+\frac {(2 b) \text {Subst}\left (\int \left (\frac {(d e-c f) \left (d^2 e^2-2 c d e f-\left (3-c^2\right ) f^2\right ) \left (a+b \cot ^{-1}(x)\right )}{1+x^2}+\frac {f \left (3 d^2 e^2-6 c d e f-\left (1-3 c^2\right ) f^2\right ) x \left (a+b \cot ^{-1}(x)\right )}{1+x^2}\right ) \, dx,x,c+d x\right )}{3 d^3 f}+\frac {\left (b^2 f^2\right ) \text {Subst}\left (\int \frac {x^2}{1+x^2} \, dx,x,c+d x\right )}{3 d^3}+\frac {\left (2 b^2 f (d e-c f)\right ) \text {Subst}\left (\int \cot ^{-1}(x) \, dx,x,c+d x\right )}{d^3} \\ & = \frac {b^2 f^2 x}{3 d^2}+\frac {2 a b f (d e-c f) x}{d^2}+\frac {2 b^2 f (d e-c f) (c+d x) \cot ^{-1}(c+d x)}{d^3}+\frac {b f^2 (c+d x)^2 \left (a+b \cot ^{-1}(c+d x)\right )}{3 d^3}+\frac {(e+f x)^3 \left (a+b \cot ^{-1}(c+d x)\right )^2}{3 f}-\frac {\left (b^2 f^2\right ) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,c+d x\right )}{3 d^3}+\frac {\left (2 b^2 f (d e-c f)\right ) \text {Subst}\left (\int \frac {x}{1+x^2} \, dx,x,c+d x\right )}{d^3}+\frac {\left (2 b \left (3 d^2 e^2-6 c d e f-\left (1-3 c^2\right ) f^2\right )\right ) \text {Subst}\left (\int \frac {x \left (a+b \cot ^{-1}(x)\right )}{1+x^2} \, dx,x,c+d x\right )}{3 d^3}+\frac {\left (2 b (d e-c f) \left (d^2 e^2-2 c d e f-\left (3-c^2\right ) f^2\right )\right ) \text {Subst}\left (\int \frac {a+b \cot ^{-1}(x)}{1+x^2} \, dx,x,c+d x\right )}{3 d^3 f} \\ & = \frac {b^2 f^2 x}{3 d^2}+\frac {2 a b f (d e-c f) x}{d^2}+\frac {2 b^2 f (d e-c f) (c+d x) \cot ^{-1}(c+d x)}{d^3}+\frac {b f^2 (c+d x)^2 \left (a+b \cot ^{-1}(c+d x)\right )}{3 d^3}+\frac {i \left (3 d^2 e^2-6 c d e f-\left (1-3 c^2\right ) f^2\right ) \left (a+b \cot ^{-1}(c+d x)\right )^2}{3 d^3}-\frac {(d e-c f) \left (d^2 e^2-2 c d e f-\left (3-c^2\right ) f^2\right ) \left (a+b \cot ^{-1}(c+d x)\right )^2}{3 d^3 f}+\frac {(e+f x)^3 \left (a+b \cot ^{-1}(c+d x)\right )^2}{3 f}-\frac {b^2 f^2 \arctan (c+d x)}{3 d^3}+\frac {b^2 f (d e-c f) \log \left (1+(c+d x)^2\right )}{d^3}-\frac {\left (2 b \left (3 d^2 e^2-6 c d e f-\left (1-3 c^2\right ) f^2\right )\right ) \text {Subst}\left (\int \frac {a+b \cot ^{-1}(x)}{i-x} \, dx,x,c+d x\right )}{3 d^3} \\ & = \frac {b^2 f^2 x}{3 d^2}+\frac {2 a b f (d e-c f) x}{d^2}+\frac {2 b^2 f (d e-c f) (c+d x) \cot ^{-1}(c+d x)}{d^3}+\frac {b f^2 (c+d x)^2 \left (a+b \cot ^{-1}(c+d x)\right )}{3 d^3}+\frac {i \left (3 d^2 e^2-6 c d e f-\left (1-3 c^2\right ) f^2\right ) \left (a+b \cot ^{-1}(c+d x)\right )^2}{3 d^3}-\frac {(d e-c f) \left (d^2 e^2-2 c d e f-\left (3-c^2\right ) f^2\right ) \left (a+b \cot ^{-1}(c+d x)\right )^2}{3 d^3 f}+\frac {(e+f x)^3 \left (a+b \cot ^{-1}(c+d x)\right )^2}{3 f}-\frac {b^2 f^2 \arctan (c+d x)}{3 d^3}-\frac {2 b \left (3 d^2 e^2-6 c d e f-\left (1-3 c^2\right ) f^2\right ) \left (a+b \cot ^{-1}(c+d x)\right ) \log \left (\frac {2}{1+i (c+d x)}\right )}{3 d^3}+\frac {b^2 f (d e-c f) \log \left (1+(c+d x)^2\right )}{d^3}-\frac {\left (2 b^2 \left (3 d^2 e^2-6 c d e f-\left (1-3 c^2\right ) f^2\right )\right ) \text {Subst}\left (\int \frac {\log \left (\frac {2}{1+i x}\right )}{1+x^2} \, dx,x,c+d x\right )}{3 d^3} \\ & = \frac {b^2 f^2 x}{3 d^2}+\frac {2 a b f (d e-c f) x}{d^2}+\frac {2 b^2 f (d e-c f) (c+d x) \cot ^{-1}(c+d x)}{d^3}+\frac {b f^2 (c+d x)^2 \left (a+b \cot ^{-1}(c+d x)\right )}{3 d^3}+\frac {i \left (3 d^2 e^2-6 c d e f-\left (1-3 c^2\right ) f^2\right ) \left (a+b \cot ^{-1}(c+d x)\right )^2}{3 d^3}-\frac {(d e-c f) \left (d^2 e^2-2 c d e f-\left (3-c^2\right ) f^2\right ) \left (a+b \cot ^{-1}(c+d x)\right )^2}{3 d^3 f}+\frac {(e+f x)^3 \left (a+b \cot ^{-1}(c+d x)\right )^2}{3 f}-\frac {b^2 f^2 \arctan (c+d x)}{3 d^3}-\frac {2 b \left (3 d^2 e^2-6 c d e f-\left (1-3 c^2\right ) f^2\right ) \left (a+b \cot ^{-1}(c+d x)\right ) \log \left (\frac {2}{1+i (c+d x)}\right )}{3 d^3}+\frac {b^2 f (d e-c f) \log \left (1+(c+d x)^2\right )}{d^3}+\frac {\left (2 i b^2 \left (3 d^2 e^2-6 c d e f-\left (1-3 c^2\right ) f^2\right )\right ) \text {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1+i (c+d x)}\right )}{3 d^3} \\ & = \frac {b^2 f^2 x}{3 d^2}+\frac {2 a b f (d e-c f) x}{d^2}+\frac {2 b^2 f (d e-c f) (c+d x) \cot ^{-1}(c+d x)}{d^3}+\frac {b f^2 (c+d x)^2 \left (a+b \cot ^{-1}(c+d x)\right )}{3 d^3}+\frac {i \left (3 d^2 e^2-6 c d e f-\left (1-3 c^2\right ) f^2\right ) \left (a+b \cot ^{-1}(c+d x)\right )^2}{3 d^3}-\frac {(d e-c f) \left (d^2 e^2-2 c d e f-\left (3-c^2\right ) f^2\right ) \left (a+b \cot ^{-1}(c+d x)\right )^2}{3 d^3 f}+\frac {(e+f x)^3 \left (a+b \cot ^{-1}(c+d x)\right )^2}{3 f}-\frac {b^2 f^2 \arctan (c+d x)}{3 d^3}-\frac {2 b \left (3 d^2 e^2-6 c d e f-\left (1-3 c^2\right ) f^2\right ) \left (a+b \cot ^{-1}(c+d x)\right ) \log \left (\frac {2}{1+i (c+d x)}\right )}{3 d^3}+\frac {b^2 f (d e-c f) \log \left (1+(c+d x)^2\right )}{d^3}+\frac {i b^2 \left (3 d^2 e^2-6 c d e f-\left (1-3 c^2\right ) f^2\right ) \operatorname {PolyLog}\left (2,1-\frac {2}{1+i (c+d x)}\right )}{3 d^3} \\ \end{align*}
Time = 6.67 (sec) , antiderivative size = 586, normalized size of antiderivative = 1.53 \[ \int (e+f x)^2 \left (a+b \cot ^{-1}(c+d x)\right )^2 \, dx=\frac {b^2 c f^2+3 a^2 d^3 e^2 x+6 a b d^2 e f x+b^2 d f^2 x-4 a b c d f^2 x+3 a^2 d^3 e f x^2+a b d^2 f^2 x^2+a^2 d^3 f^2 x^3+b^2 (i+c+d x) \left ((i+c)^2 f^2-(i+c) d f (3 e+f x)+d^2 \left (3 e^2+3 e f x+f^2 x^2\right )\right ) \cot ^{-1}(c+d x)^2-6 a b c d^2 e^2 \arctan (c+d x)-6 a b d e f \arctan (c+d x)+6 a b c^2 d e f \arctan (c+d x)+6 a b c f^2 \arctan (c+d x)-2 a b c^3 f^2 \arctan (c+d x)-b \cot ^{-1}(c+d x) \left (-2 a d^3 x \left (3 e^2+3 e f x+f^2 x^2\right )+b f \left (5 c^2 f-6 d^2 e x+c d (-6 e+4 f x)-f \left (1+d^2 x^2\right )\right )+2 b \left (3 d^2 e^2-6 c d e f+\left (-1+3 c^2\right ) f^2\right ) \log \left (1-e^{2 i \cot ^{-1}(c+d x)}\right )\right )+6 b^2 c f^2 \log \left (\frac {1}{c+d x}\right )+3 a b d^2 e^2 \log \left (1+c^2+2 c d x+d^2 x^2\right )-6 a b c d e f \log \left (1+c^2+2 c d x+d^2 x^2\right )-a b f^2 \log \left (1+c^2+2 c d x+d^2 x^2\right )+3 a b c^2 f^2 \log \left (1+c^2+2 c d x+d^2 x^2\right )+6 b^2 c f^2 \log \left (\frac {1}{\sqrt {1+\frac {1}{(c+d x)^2}}}\right )-6 b^2 d e f \log \left (\frac {1}{(c+d x) \sqrt {1+\frac {1}{(c+d x)^2}}}\right )+i b^2 \left (3 d^2 e^2-6 c d e f+\left (-1+3 c^2\right ) f^2\right ) \operatorname {PolyLog}\left (2,e^{2 i \cot ^{-1}(c+d x)}\right )}{3 d^3} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1071 vs. \(2 (362 ) = 724\).
Time = 1.34 (sec) , antiderivative size = 1072, normalized size of antiderivative = 2.81
method | result | size |
parts | \(\text {Expression too large to display}\) | \(1072\) |
derivativedivides | \(\text {Expression too large to display}\) | \(1087\) |
default | \(\text {Expression too large to display}\) | \(1087\) |
risch | \(\text {Expression too large to display}\) | \(3165\) |
[In]
[Out]
\[ \int (e+f x)^2 \left (a+b \cot ^{-1}(c+d x)\right )^2 \, dx=\int { {\left (f x + e\right )}^{2} {\left (b \operatorname {arccot}\left (d x + c\right ) + a\right )}^{2} \,d x } \]
[In]
[Out]
Timed out. \[ \int (e+f x)^2 \left (a+b \cot ^{-1}(c+d x)\right )^2 \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int (e+f x)^2 \left (a+b \cot ^{-1}(c+d x)\right )^2 \, dx=\int { {\left (f x + e\right )}^{2} {\left (b \operatorname {arccot}\left (d x + c\right ) + a\right )}^{2} \,d x } \]
[In]
[Out]
\[ \int (e+f x)^2 \left (a+b \cot ^{-1}(c+d x)\right )^2 \, dx=\int { {\left (f x + e\right )}^{2} {\left (b \operatorname {arccot}\left (d x + c\right ) + a\right )}^{2} \,d x } \]
[In]
[Out]
Timed out. \[ \int (e+f x)^2 \left (a+b \cot ^{-1}(c+d x)\right )^2 \, dx=\int {\left (e+f\,x\right )}^2\,{\left (a+b\,\mathrm {acot}\left (c+d\,x\right )\right )}^2 \,d x \]
[In]
[Out]