Optimal. Leaf size=327 \[ -\frac {\left (d^2-a f^2\right )^2 \sqrt {a g+\frac {2 d e g x}{f^2}+\frac {e^2 g x^2}{f^2}} \left (f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}+d+e x\right )^{n-2}}{4 e f (2-n) \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}}-\frac {\left (d^2-a f^2\right ) \sqrt {a g+\frac {2 d e g x}{f^2}+\frac {e^2 g x^2}{f^2}} \left (f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}+d+e x\right )^n}{2 e f n \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}}+\frac {\sqrt {a g+\frac {2 d e g x}{f^2}+\frac {e^2 g x^2}{f^2}} \left (f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}+d+e x\right )^{n+2}}{4 e f (n+2) \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.62, antiderivative size = 327, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 62, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.065, Rules used = {2123, 2121, 12, 270} \[ -\frac {\left (d^2-a f^2\right )^2 \sqrt {a g+\frac {2 d e g x}{f^2}+\frac {e^2 g x^2}{f^2}} \left (f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}+d+e x\right )^{n-2}}{4 e f (2-n) \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}}-\frac {\left (d^2-a f^2\right ) \sqrt {a g+\frac {2 d e g x}{f^2}+\frac {e^2 g x^2}{f^2}} \left (f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}+d+e x\right )^n}{2 e f n \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}}+\frac {\sqrt {a g+\frac {2 d e g x}{f^2}+\frac {e^2 g x^2}{f^2}} \left (f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}+d+e x\right )^{n+2}}{4 e f (n+2) \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 270
Rule 2121
Rule 2123
Rubi steps
\begin {align*} \int \sqrt {a g+\frac {2 d e g x}{f^2}+\frac {e^2 g x^2}{f^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 {\sqrt {a g+\frac {2 d e g x}{f^2}+\frac {e^2 g x^2}{f^2}} \int \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^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}{\sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}}\\ &=\frac {\left (2 \sqrt {a g+\frac {2 d e g x}{f^2}+\frac {e^2 g x^2}{f^2}}\right ) \operatorname {Subst}\left (\int \frac {x^{-3+n} \left (d^2 e-\left (-a e+\frac {2 d^2 e}{f^2}\right ) f^2+e x^2\right )^2}{8 e^3} \, dx,x,d+e x+f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}\right )}{f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}}\\ &=\frac {\sqrt {a g+\frac {2 d e g x}{f^2}+\frac {e^2 g x^2}{f^2}} \operatorname {Subst}\left (\int x^{-3+n} \left (d^2 e-\left (-a e+\frac {2 d^2 e}{f^2}\right ) f^2+e x^2\right )^2 \, dx,x,d+e x+f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}\right )}{4 e^3 f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}}\\ &=\frac {\sqrt {a g+\frac {2 d e g x}{f^2}+\frac {e^2 g x^2}{f^2}} \operatorname {Subst}\left (\int \left (e^2 \left (d^2-a f^2\right )^2 x^{-3+n}-2 e^2 \left (d^2-a f^2\right ) x^{-1+n}+e^2 x^{1+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 )}{4 e^3 f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}}\\ &=-\frac {\left (d^2-a f^2\right )^2 \sqrt {a g+\frac {2 d e g x}{f^2}+\frac {e^2 g x^2}{f^2}} \left (d+e x+f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}\right )^{-2+n}}{4 e f (2-n) \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}}-\frac {\left (d^2-a f^2\right ) \sqrt {a g+\frac {2 d e g x}{f^2}+\frac {e^2 g x^2}{f^2}} \left (d+e x+f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}\right )^n}{2 e f n \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}}+\frac {\sqrt {a g+\frac {2 d e g x}{f^2}+\frac {e^2 g x^2}{f^2}} \left (d+e x+f \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}\right )^{2+n}}{4 e f (2+n) \sqrt {a+\frac {2 d e x}{f^2}+\frac {e^2 x^2}{f^2}}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.23, size = 175, normalized size = 0.54 \[ \frac {\sqrt {g \left (a+\frac {e x (2 d+e x)}{f^2}\right )} \left (f \sqrt {a+\frac {e x (2 d+e x)}{f^2}}+d+e x\right )^n \left (\frac {\left (d^2-a f^2\right )^2}{(n-2) \left (f \sqrt {a+\frac {e x (2 d+e x)}{f^2}}+d+e x\right )^2}+\frac {2 \left (a f^2-d^2\right )}{n}+\frac {\left (f \sqrt {a+\frac {e x (2 d+e x)}{f^2}}+d+e x\right )^2}{n+2}\right )}{4 e f \sqrt {a+\frac {e x (2 d+e x)}{f^2}}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.48, size = 231, normalized size = 0.71 \[ -\frac {{\left (2 \, e^{3} n x^{3} + 6 \, d e^{2} n x^{2} + 2 \, a d f^{2} n + 2 \, {\left (a e f^{2} + 2 \, d^{2} e\right )} n x - {\left (e^{2} f n^{2} x^{2} + a f^{3} n^{2} + 2 \, d e f n^{2} x - 2 \, a f^{3} + 2 \, d^{2} f\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} \sqrt {\frac {e^{2} g x^{2} + a f^{2} g + 2 \, d e g x}{f^{2}}}}{a e f^{2} n^{3} - 4 \, a e f^{2} n + {\left (e^{3} n^{3} - 4 \, e^{3} n\right )} x^{2} + 2 \, {\left (d e^{2} n^{3} - 4 \, d e^{2} n\right )} x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {\frac {e^{2} g x^{2}}{f^{2}} + a g + \frac {2 \, d e g x}{f^{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} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 0.11, size = 0, normalized size = 0.00 \[ \int \sqrt {\frac {e^{2} g \,x^{2}}{f^{2}}+a g +\frac {2 d e g x}{f^{2}}}\, \left (e x +d +\sqrt {\frac {e^{2} x^{2}}{f^{2}}+a +\frac {2 d e x}{f^{2}}}\, f \right )^{n}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {\frac {e^{2} g x^{2}}{f^{2}} + a g + \frac {2 \, d e g x}{f^{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} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int {\left (d+f\,\sqrt {a+\frac {e^2\,x^2}{f^2}+\frac {2\,d\,e\,x}{f^2}}+e\,x\right )}^n\,\sqrt {a\,g+\frac {e^2\,g\,x^2}{f^2}+\frac {2\,d\,e\,g\,x}{f^2}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {g \left (a + \frac {2 d e x}{f^{2}} + \frac {e^{2} x^{2}}{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 )^{n}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________