Integrand size = 56, antiderivative size = 365 \[ \int \left (a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}\right )^2 \left (d+e x+f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}\right )^n \, dx=\frac {\left (d^2-a f^2\right )^5 \left (d+e x+f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}\right )^{-5+n}}{32 e f^4 (5-n)}-\frac {5 \left (d^2-a f^2\right )^4 \left (d+e x+f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}\right )^{-3+n}}{32 e f^4 (3-n)}+\frac {5 \left (d^2-a f^2\right )^3 \left (d+e x+f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}\right )^{-1+n}}{16 e f^4 (1-n)}+\frac {5 \left (d^2-a f^2\right )^2 \left (d+e x+f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}\right )^{1+n}}{16 e f^4 (1+n)}-\frac {5 \left (d^2-a f^2\right ) \left (d+e x+f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}\right )^{3+n}}{32 e f^4 (3+n)}+\frac {\left (d+e x+f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}\right )^{5+n}}{32 e f^4 (5+n)} \]
[Out]
Time = 0.29 (sec) , antiderivative size = 365, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.054, Rules used = {2146, 12, 276} \[ \int \left (a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}\right )^2 \left (d+e x+f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}\right )^n \, dx=\frac {\left (d^2-a f^2\right )^5 \left (f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}+d+e x\right )^{n-5}}{32 e f^4 (5-n)}-\frac {5 \left (d^2-a f^2\right )^4 \left (f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}+d+e x\right )^{n-3}}{32 e f^4 (3-n)}+\frac {5 \left (d^2-a f^2\right )^3 \left (f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}+d+e x\right )^{n-1}}{16 e f^4 (1-n)}+\frac {5 \left (d^2-a f^2\right )^2 \left (f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}+d+e x\right )^{n+1}}{16 e f^4 (n+1)}-\frac {5 \left (d^2-a f^2\right ) \left (f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}+d+e x\right )^{n+3}}{32 e f^4 (n+3)}+\frac {\left (f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}+d+e x\right )^{n+5}}{32 e f^4 (n+5)} \]
[In]
[Out]
Rule 12
Rule 276
Rule 2146
Rubi steps \begin{align*} \text {integral}& = \frac {2 \text {Subst}\left (\int \frac {x^{-6+n} \left (d^2 e-\left (-a e+\frac {2 d^2 e}{f^2}\right ) f^2+e x^2\right )^5}{64 e^6} \, dx,x,d+e x+f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}\right )}{f^4} \\ & = \frac {\text {Subst}\left (\int x^{-6+n} \left (d^2 e-\left (-a e+\frac {2 d^2 e}{f^2}\right ) f^2+e x^2\right )^5 \, dx,x,d+e x+f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}\right )}{32 e^6 f^4} \\ & = \frac {\text {Subst}\left (\int \left (-e^5 \left (d^2-a f^2\right )^5 x^{-6+n}+5 e^5 \left (d^2-a f^2\right )^4 x^{-4+n}-10 e^5 \left (d^2-a f^2\right )^3 x^{-2+n}+10 e^5 \left (d^2-a f^2\right )^2 x^n-5 e^5 \left (d^2-a f^2\right ) x^{2+n}+e^5 x^{4+n}\right ) \, dx,x,d+e x+f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}\right )}{32 e^6 f^4} \\ & = \frac {\left (d^2-a f^2\right )^5 \left (d+e x+f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}\right )^{-5+n}}{32 e f^4 (5-n)}-\frac {5 \left (d^2-a f^2\right )^4 \left (d+e x+f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}\right )^{-3+n}}{32 e f^4 (3-n)}+\frac {5 \left (d^2-a f^2\right )^3 \left (d+e x+f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}\right )^{-1+n}}{16 e f^4 (1-n)}+\frac {5 \left (d^2-a f^2\right )^2 \left (d+e x+f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}\right )^{1+n}}{16 e f^4 (1+n)}-\frac {5 \left (d^2-a f^2\right ) \left (d+e x+f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}\right )^{3+n}}{32 e f^4 (3+n)}+\frac {\left (d+e x+f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}\right )^{5+n}}{32 e f^4 (5+n)} \\ \end{align*}
Time = 4.20 (sec) , antiderivative size = 280, normalized size of antiderivative = 0.77 \[ \int \left (a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}\right )^2 \left (d+e x+f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}\right )^n \, dx=\frac {\left (d+e x+f \sqrt {a+\frac {e x (2 d+e x)}{f^2}}\right )^{-5+n} \left (-\frac {\left (d^2-a f^2\right )^5}{-5+n}+\frac {5 \left (d^2-a f^2\right )^4 \left (d+e x+f \sqrt {a+\frac {e x (2 d+e x)}{f^2}}\right )^2}{-3+n}-\frac {10 \left (d^2-a f^2\right )^3 \left (d+e x+f \sqrt {a+\frac {e x (2 d+e x)}{f^2}}\right )^4}{-1+n}+\frac {10 \left (d^2-a f^2\right )^2 \left (d+e x+f \sqrt {a+\frac {e x (2 d+e x)}{f^2}}\right )^6}{1+n}-\frac {5 \left (d^2-a f^2\right ) \left (d+e x+f \sqrt {a+\frac {e x (2 d+e x)}{f^2}}\right )^8}{3+n}+\frac {\left (d+e x+f \sqrt {a+\frac {e x (2 d+e x)}{f^2}}\right )^{10}}{5+n}\right )}{32 e f^4} \]
[In]
[Out]
\[\int \left (a +\frac {2 d e x}{f^{2}}+\frac {e^{2} x^{2}}{f^{2}}\right )^{2} {\left (d +e x +f \sqrt {a +\frac {2 d e x}{f^{2}}+\frac {e^{2} x^{2}}{f^{2}}}\right )}^{n}d x\]
[In]
[Out]
none
Time = 0.31 (sec) , antiderivative size = 654, normalized size of antiderivative = 1.79 \[ \int \left (a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}\right )^2 \left (d+e x+f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}\right )^n \, dx=-\frac {{\left (5 \, a^{2} d f^{4} n^{4} + 225 \, a^{2} d f^{4} - 300 \, a d^{3} f^{2} + 5 \, {\left (e^{5} n^{4} - 10 \, e^{5} n^{2} + 9 \, e^{5}\right )} x^{5} + 120 \, d^{5} + 25 \, {\left (d e^{4} n^{4} - 10 \, d e^{4} n^{2} + 9 \, d e^{4}\right )} x^{4} + 10 \, {\left (15 \, a e^{3} f^{2} + 30 \, d^{2} e^{3} + {\left (a e^{3} f^{2} + 4 \, d^{2} e^{3}\right )} n^{4} - 2 \, {\left (8 \, a e^{3} f^{2} + 17 \, d^{2} e^{3}\right )} n^{2}\right )} x^{3} - 10 \, {\left (11 \, a^{2} d f^{4} - 6 \, a d^{3} f^{2}\right )} n^{2} + 10 \, {\left (45 \, a d e^{2} f^{2} + {\left (3 \, a d e^{2} f^{2} + 2 \, d^{3} e^{2}\right )} n^{4} - 2 \, {\left (24 \, a d e^{2} f^{2} + d^{3} e^{2}\right )} n^{2}\right )} x^{2} + 5 \, {\left (45 \, a^{2} e f^{4} + {\left (a^{2} e f^{4} + 4 \, a d^{2} e f^{2}\right )} n^{4} - 2 \, {\left (11 \, a^{2} e f^{4} + 26 \, a d^{2} e f^{2} - 12 \, d^{4} e\right )} n^{2}\right )} x - {\left (a^{2} f^{5} n^{5} + {\left (e^{4} f n^{5} - 10 \, e^{4} f n^{3} + 9 \, e^{4} f n\right )} x^{4} - 10 \, {\left (3 \, a^{2} f^{5} - 2 \, a d^{2} f^{3}\right )} n^{3} + 4 \, {\left (d e^{3} f n^{5} - 10 \, d e^{3} f n^{3} + 9 \, d e^{3} f n\right )} x^{3} + 2 \, {\left ({\left (a e^{2} f^{3} + 2 \, d^{2} e^{2} f\right )} n^{5} - 10 \, {\left (2 \, a e^{2} f^{3} + d^{2} e^{2} f\right )} n^{3} + {\left (19 \, a e^{2} f^{3} + 8 \, d^{2} e^{2} f\right )} n\right )} x^{2} + {\left (149 \, a^{2} f^{5} - 260 \, a d^{2} f^{3} + 120 \, d^{4} f\right )} n + 4 \, {\left (a d e f^{3} n^{5} - 10 \, {\left (2 \, a d e f^{3} - d^{3} e f\right )} n^{3} + {\left (19 \, a d e f^{3} - 10 \, d^{3} e f\right )} n\right )} x\right )} \sqrt {\frac {e^{2} x^{2} + a f^{2} + 2 \, d e x}{f^{2}}}\right )} {\left (e x + f \sqrt {\frac {e^{2} x^{2} + a f^{2} + 2 \, d e x}{f^{2}}} + d\right )}^{n}}{e f^{4} n^{6} - 35 \, e f^{4} n^{4} + 259 \, e f^{4} n^{2} - 225 \, e f^{4}} \]
[In]
[Out]
Exception generated. \[ \int \left (a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}\right )^2 \left (d+e x+f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}\right )^n \, dx=\text {Exception raised: HeuristicGCDFailed} \]
[In]
[Out]
\[ \int \left (a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}\right )^2 \left (d+e x+f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}\right )^n \, dx=\int { {\left (\frac {e^{2} x^{2}}{f^{2}} + a + \frac {2 \, d e x}{f^{2}}\right )}^{2} {\left (e x + \sqrt {\frac {e^{2} x^{2}}{f^{2}} + a + \frac {2 \, d e x}{f^{2}}} f + d\right )}^{n} \,d x } \]
[In]
[Out]
\[ \int \left (a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}\right )^2 \left (d+e x+f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}\right )^n \, dx=\int { {\left (\frac {e^{2} x^{2}}{f^{2}} + a + \frac {2 \, d e x}{f^{2}}\right )}^{2} {\left (e x + \sqrt {\frac {e^{2} x^{2}}{f^{2}} + a + \frac {2 \, d e x}{f^{2}}} f + d\right )}^{n} \,d x } \]
[In]
[Out]
Timed out. \[ \int \left (a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}\right )^2 \left (d+e x+f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}\right )^n \, dx=\int {\left (d+f\,\sqrt {a+\frac {e^2\,x^2}{f^2}+\frac {2\,d\,e\,x}{f^2}}+e\,x\right )}^n\,{\left (a+\frac {e^2\,x^2}{f^2}+\frac {2\,d\,e\,x}{f^2}\right )}^2 \,d x \]
[In]
[Out]