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 (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}}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.42, 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 = {2148, 2146, 12,
276} \begin {gather*} -\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}}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 276
Rule 2146
Rule 2148
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 ) \text {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}} \text {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}} \text {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.17, size = 175, normalized size = 0.54 \begin {gather*} \frac {\sqrt {g \left (a+\frac {e x (2 d+e x)}{f^2}\right )} \left (d+e x+f \sqrt {a+\frac {e x (2 d+e x)}{f^2}}\right )^n \left (\frac {2 \left (-d^2+a f^2\right )}{n}+\frac {\left (d^2-a f^2\right )^2}{(-2+n) \left (d+e x+f \sqrt {a+\frac {e x (2 d+e x)}{f^2}}\right )^2}+\frac {\left (d+e x+f \sqrt {a+\frac {e x (2 d+e x)}{f^2}}\right )^2}{2+n}\right )}{4 e f \sqrt {a+\frac {e x (2 d+e x)}{f^2}}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.09, size = 0, normalized size = 0.00 \[\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\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 223, normalized size = 0.68 \begin {gather*} -\frac {{\left (2 \, a d f^{2} n + 2 \, n x^{3} e^{3} + 6 \, d n x^{2} e^{2} + 2 \, {\left (a f^{2} + 2 \, d^{2}\right )} n x e - {\left (a f^{3} n^{2} + f n^{2} x^{2} e^{2} + 2 \, d f n^{2} x e - 2 \, a f^{3} + 2 \, d^{2} f\right )} \sqrt {\frac {a f^{2} + x^{2} e^{2} + 2 \, d x e}{f^{2}}}\right )} {\left (x e + f \sqrt {\frac {a f^{2} + x^{2} e^{2} + 2 \, d x e}{f^{2}}} + d\right )}^{n} \sqrt {\frac {a f^{2} g + g x^{2} e^{2} + 2 \, d g x e}{f^{2}}}}{{\left (n^{3} - 4 \, n\right )} x^{2} e^{3} + 2 \, {\left (d n^{3} - 4 \, d n\right )} x e^{2} + {\left (a f^{2} n^{3} - 4 \, a f^{2} n\right )} e} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \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 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \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 \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________