Optimal. Leaf size=136 \[ -\frac {a d^2 f^2}{2 e \left (f \sqrt {a+\frac {e^2 x^2}{f^2}}+e x\right )}+\frac {\left (f \sqrt {a+\frac {e^2 x^2}{f^2}}+d+e x\right )^3}{6 e}+\frac {a d f^2 \log \left (f \sqrt {a+\frac {e^2 x^2}{f^2}}+e x\right )}{e}+\frac {a f^2 \left (f \sqrt {a+\frac {e^2 x^2}{f^2}}+e x\right )}{2 e} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.10, antiderivative size = 136, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {2117, 893} \[ -\frac {a d^2 f^2}{2 e \left (f \sqrt {a+\frac {e^2 x^2}{f^2}}+e x\right )}+\frac {\left (f \sqrt {a+\frac {e^2 x^2}{f^2}}+d+e x\right )^3}{6 e}+\frac {a d f^2 \log \left (f \sqrt {a+\frac {e^2 x^2}{f^2}}+e x\right )}{e}+\frac {a f^2 \left (f \sqrt {a+\frac {e^2 x^2}{f^2}}+e x\right )}{2 e} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 893
Rule 2117
Rubi steps
\begin {align*} \int \left (d+e x+f \sqrt {a+\frac {e^2 x^2}{f^2}}\right )^2 \, dx &=\frac {\operatorname {Subst}\left (\int \frac {x^2 \left (d^2+a f^2-2 d x+x^2\right )}{(d-x)^2} \, dx,x,d+e x+f \sqrt {a+\frac {e^2 x^2}{f^2}}\right )}{2 e}\\ &=\frac {\operatorname {Subst}\left (\int \left (a f^2+\frac {a d^2 f^2}{(d-x)^2}-\frac {2 a d f^2}{d-x}+x^2\right ) \, dx,x,d+e x+f \sqrt {a+\frac {e^2 x^2}{f^2}}\right )}{2 e}\\ &=-\frac {a d^2 f^2}{2 e \left (e x+f \sqrt {a+\frac {e^2 x^2}{f^2}}\right )}+\frac {a f^2 \left (e x+f \sqrt {a+\frac {e^2 x^2}{f^2}}\right )}{2 e}+\frac {\left (d+e x+f \sqrt {a+\frac {e^2 x^2}{f^2}}\right )^3}{6 e}+\frac {a d f^2 \log \left (e x+f \sqrt {a+\frac {e^2 x^2}{f^2}}\right )}{e}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.20, size = 128, normalized size = 0.94 \[ \frac {\frac {a d^2 f^2}{f \left (-\sqrt {a+\frac {e^2 x^2}{f^2}}\right )-e x}+\frac {1}{3} \left (f \sqrt {a+\frac {e^2 x^2}{f^2}}+d+e x\right )^3+2 a d f^2 \log \left (f \sqrt {a+\frac {e^2 x^2}{f^2}}+e x\right )+a f^2 \left (f \sqrt {a+\frac {e^2 x^2}{f^2}}+e x\right )}{2 e} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.42, size = 114, normalized size = 0.84 \[ \frac {2 \, e^{3} x^{3} + 3 \, d e^{2} x^{2} - 3 \, a d f^{2} \log \left (-e x + f \sqrt {\frac {e^{2} x^{2} + a f^{2}}{f^{2}}}\right ) + 3 \, {\left (a e f^{2} + d^{2} e\right )} x + {\left (2 \, e^{2} f x^{2} + 2 \, a f^{3} + 3 \, d e f x\right )} \sqrt {\frac {e^{2} x^{2} + a f^{2}}{f^{2}}}}{3 \, e} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.52, size = 103, normalized size = 0.76 \[ -a d f {\left | f \right |} e^{\left (-1\right )} \log \left ({\left | -x e + \sqrt {a f^{2} + x^{2} e^{2}} \right |}\right ) + a f^{2} x + \frac {2}{3} \, x^{3} e^{2} + d x^{2} e + d^{2} x + \frac {1}{3} \, {\left (2 \, a f {\left | f \right |} e^{\left (-1\right )} + {\left (\frac {2 \, x {\left | f \right |} e}{f} + \frac {3 \, d {\left | f \right |}}{f}\right )} x\right )} \sqrt {a f^{2} + x^{2} e^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 126, normalized size = 0.93 \[ \frac {2 e^{2} x^{3}}{3}+\frac {a d f \ln \left (\frac {e^{2} x}{\sqrt {\frac {e^{2}}{f^{2}}}\, f^{2}}+\sqrt {\frac {e^{2} x^{2}}{f^{2}}+a}\right )}{\sqrt {\frac {e^{2}}{f^{2}}}}+a \,f^{2} x +d e \,x^{2}+d^{2} x +\sqrt {\frac {e^{2} x^{2}}{f^{2}}+a}\, d f x +\frac {d^{3}}{3 e}+\frac {2 \left (\frac {e^{2} x^{2}+a \,f^{2}}{f^{2}}\right )^{\frac {3}{2}} f^{3}}{3 e} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.89, size = 99, normalized size = 0.73 \[ \frac {1}{3} \, e^{2} x^{3} + \frac {2 \, {\left (\frac {e^{2} x^{2}}{f^{2}} + a\right )}^{\frac {3}{2}} f^{3}}{3 \, e} + \frac {1}{3} \, {\left (\frac {e^{2} x^{3}}{f^{2}} + 3 \, a x\right )} f^{2} + d^{2} x + {\left (e x^{2} + {\left (\frac {a f \operatorname {arsinh}\left (\frac {e x}{\sqrt {a} f}\right )}{e} + \sqrt {\frac {e^{2} x^{2}}{f^{2}} + a} x\right )} f\right )} d \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.66, size = 210, normalized size = 1.54 \[ \left \{\begin {array}{cl} x\,{\left (d+\sqrt {a}\,f\right )}^2 & \text {\ if\ \ }e=0\\ x\,\left (d^2+a\,f^2\right )+\frac {2\,e^2\,x^3}{3}+d\,e\,x^2+\frac {2\,a\,f^3\,\sqrt {a+\frac {e^2\,x^2}{f^2}}}{e}-\frac {2\,f\,\sqrt {a+\frac {e^2\,x^2}{f^2}}\,\left (2\,a\,f^2-e^2\,x^2\right )}{3\,e}+d\,f\,x\,\sqrt {a+\frac {e^2\,x^2}{f^2}}+\frac {2\,a\,d\,f\,\ln \left (x\,\sqrt {\frac {e^2}{f^2}}+\sqrt {a+\frac {e^2\,x^2}{f^2}}\right )}{\sqrt {\frac {e^2}{f^2}}}-\frac {a\,d\,e^2\,\ln \left (2\,x\,\sqrt {\frac {e^2}{f^2}}+2\,\sqrt {a+\frac {e^2\,x^2}{f^2}}\right )}{f\,{\left (\frac {e^2}{f^2}\right )}^{3/2}} & \text {\ if\ \ }e\neq 0 \end {array}\right . \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 4.48, size = 116, normalized size = 0.85 \[ \sqrt {a} d f x \sqrt {1 + \frac {e^{2} x^{2}}{a f^{2}}} + \frac {a d f^{2} \operatorname {asinh}{\left (\frac {e x}{\sqrt {a} f} \right )}}{e} + a f^{2} x + d^{2} x + d e x^{2} + \frac {2 e^{2} x^{3}}{3} + 2 e f \left (\begin {cases} \frac {\sqrt {a} x^{2}}{2} & \text {for}\: e^{2} = 0 \\\frac {f^{2} \left (a + \frac {e^{2} x^{2}}{f^{2}}\right )^{\frac {3}{2}}}{3 e^{2}} & \text {otherwise} \end {cases}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________