3.5.55 \(\int (d+e x+f \sqrt {a+\frac {e^2 x^2}{f^2}})^2 \, dx\) [455]

Optimal. Leaf size=136 \[ -\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} \]

[Out]

a*d*f^2*ln(e*x+f*(a+e^2*x^2/f^2)^(1/2))/e-1/2*a*d^2*f^2/e/(e*x+f*(a+e^2*x^2/f^2)^(1/2))+1/2*a*f^2*(e*x+f*(a+e^
2*x^2/f^2)^(1/2))/e+1/6*(d+e*x+f*(a+e^2*x^2/f^2)^(1/2))^3/e

________________________________________________________________________________________

Rubi [A]
time = 0.08, 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 = {2142, 907} \begin {gather*} -\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} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(d + e*x + f*Sqrt[a + (e^2*x^2)/f^2])^2,x]

[Out]

-1/2*(a*d^2*f^2)/(e*(e*x + f*Sqrt[a + (e^2*x^2)/f^2])) + (a*f^2*(e*x + f*Sqrt[a + (e^2*x^2)/f^2]))/(2*e) + (d
+ e*x + f*Sqrt[a + (e^2*x^2)/f^2])^3/(6*e) + (a*d*f^2*Log[e*x + f*Sqrt[a + (e^2*x^2)/f^2]])/e

Rule 907

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :
> Int[ExpandIntegrand[(d + e*x)^m*(f + g*x)^n*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] &
& NeQ[e*f - d*g, 0] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[p] && ((EqQ[p, 1] && I
ntegersQ[m, n]) || (ILtQ[m, 0] && ILtQ[n, 0]))

Rule 2142

Int[((g_.) + (h_.)*((d_.) + (e_.)*(x_) + (f_.)*Sqrt[(a_) + (c_.)*(x_)^2])^(n_))^(p_.), x_Symbol] :> Dist[1/(2*
e), Subst[Int[(g + h*x^n)^p*((d^2 + a*f^2 - 2*d*x + x^2)/(d - x)^2), x], x, d + e*x + f*Sqrt[a + c*x^2]], x] /
; FreeQ[{a, c, d, e, f, g, h, n}, x] && EqQ[e^2 - c*f^2, 0] && IntegerQ[p]

Rubi steps

\begin {align*} \int \left (d+e x+f \sqrt {a+\frac {e^2 x^2}{f^2}}\right )^2 \, dx &=\frac {\text {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 {\text {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.60, size = 118, normalized size = 0.87 \begin {gather*} d^2 x+a f^2 x+d e x^2+\frac {2 e^2 x^3}{3}+\frac {\sqrt {a+\frac {e^2 x^2}{f^2}} \left (2 a f^3+e f x (3 d+2 e x)\right )}{3 e}-\frac {a d f \log \left (-\sqrt {\frac {e^2}{f^2}} x+\sqrt {a+\frac {e^2 x^2}{f^2}}\right )}{\sqrt {\frac {e^2}{f^2}}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x + f*Sqrt[a + (e^2*x^2)/f^2])^2,x]

[Out]

d^2*x + a*f^2*x + d*e*x^2 + (2*e^2*x^3)/3 + (Sqrt[a + (e^2*x^2)/f^2]*(2*a*f^3 + e*f*x*(3*d + 2*e*x)))/(3*e) -
(a*d*f*Log[-(Sqrt[e^2/f^2]*x) + Sqrt[a + (e^2*x^2)/f^2]])/Sqrt[e^2/f^2]

________________________________________________________________________________________

Maple [A]
time = 0.21, size = 124, normalized size = 0.91

method result size
default \(\frac {e^{2} x^{3}}{3}+a \,f^{2} x +2 f \left (\frac {f^{2} \left (\frac {e^{2} x^{2}+a \,f^{2}}{f^{2}}\right )^{\frac {3}{2}}}{3 e}+d \left (\frac {x \sqrt {a +\frac {e^{2} x^{2}}{f^{2}}}}{2}+\frac {a \ln \left (\frac {e^{2} x}{f^{2} \sqrt {\frac {e^{2}}{f^{2}}}}+\sqrt {a +\frac {e^{2} x^{2}}{f^{2}}}\right )}{2 \sqrt {\frac {e^{2}}{f^{2}}}}\right )\right )+\frac {\left (e x +d \right )^{3}}{3 e}\) \(124\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d+e*x+f*(a+1/f^2*e^2*x^2)^(1/2))^2,x,method=_RETURNVERBOSE)

[Out]

1/3*e^2*x^3+a*f^2*x+2*f*(1/3/e*f^2*((e^2*x^2+a*f^2)/f^2)^(3/2)+d*(1/2*x*(a+1/f^2*e^2*x^2)^(1/2)+1/2*a*ln(1/f^2
*e^2*x/(1/f^2*e^2)^(1/2)+(a+1/f^2*e^2*x^2)^(1/2))/(1/f^2*e^2)^(1/2)))+1/3*(e*x+d)^3/e

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 95, normalized size = 0.70 \begin {gather*} \frac {2}{3} \, {\left (a + \frac {x^{2} e^{2}}{f^{2}}\right )}^{\frac {3}{2}} f^{3} e^{\left (-1\right )} + \frac {1}{3} \, x^{3} e^{2} + \frac {1}{3} \, {\left (3 \, a x + \frac {x^{3} e^{2}}{f^{2}}\right )} f^{2} + d^{2} x + {\left (x^{2} e + {\left (a f \operatorname {arsinh}\left (\frac {x e}{\sqrt {a} f}\right ) e^{\left (-1\right )} + \sqrt {a + \frac {x^{2} e^{2}}{f^{2}}} x\right )} f\right )} d \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x+f*(a+e^2*x^2/f^2)^(1/2))^2,x, algorithm="maxima")

[Out]

2/3*(a + x^2*e^2/f^2)^(3/2)*f^3*e^(-1) + 1/3*x^3*e^2 + 1/3*(3*a*x + x^3*e^2/f^2)*f^2 + d^2*x + (x^2*e + (a*f*a
rcsinh(x*e/(sqrt(a)*f))*e^(-1) + sqrt(a + x^2*e^2/f^2)*x)*f)*d

________________________________________________________________________________________

Fricas [A]
time = 0.34, size = 110, normalized size = 0.81 \begin {gather*} -\frac {1}{3} \, {\left (3 \, a d f^{2} \log \left (-x e + f \sqrt {\frac {a f^{2} + x^{2} e^{2}}{f^{2}}}\right ) - 2 \, x^{3} e^{3} - 3 \, d x^{2} e^{2} - 3 \, {\left (a f^{2} + d^{2}\right )} x e - {\left (2 \, a f^{3} + 2 \, f x^{2} e^{2} + 3 \, d f x e\right )} \sqrt {\frac {a f^{2} + x^{2} e^{2}}{f^{2}}}\right )} e^{\left (-1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x+f*(a+e^2*x^2/f^2)^(1/2))^2,x, algorithm="fricas")

[Out]

-1/3*(3*a*d*f^2*log(-x*e + f*sqrt((a*f^2 + x^2*e^2)/f^2)) - 2*x^3*e^3 - 3*d*x^2*e^2 - 3*(a*f^2 + d^2)*x*e - (2
*a*f^3 + 2*f*x^2*e^2 + 3*d*f*x*e)*sqrt((a*f^2 + x^2*e^2)/f^2))*e^(-1)

________________________________________________________________________________________

Sympy [A]
time = 2.16, size = 116, normalized size = 0.85 \begin {gather*} \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 ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x+f*(a+e**2*x**2/f**2)**(1/2))**2,x)

[Out]

sqrt(a)*d*f*x*sqrt(1 + e**2*x**2/(a*f**2)) + a*d*f**2*asinh(e*x/(sqrt(a)*f))/e + a*f**2*x + d**2*x + d*e*x**2
+ 2*e**2*x**3/3 + 2*e*f*Piecewise((sqrt(a)*x**2/2, Eq(e**2, 0)), (f**2*(a + e**2*x**2/f**2)**(3/2)/(3*e**2), T
rue))

________________________________________________________________________________________

Giac [A]
time = 3.37, size = 103, normalized size = 0.76 \begin {gather*} -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}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x+f*(a+e^2*x^2/f^2)^(1/2))^2,x, algorithm="giac")

[Out]

-a*d*f*abs(f)*e^(-1)*log(abs(-x*e + sqrt(a*f^2 + x^2*e^2))) + a*f^2*x + 2/3*x^3*e^2 + d*x^2*e + d^2*x + 1/3*(2
*a*f*abs(f)*e^(-1) + (2*x*abs(f)*e/f + 3*d*abs(f)/f)*x)*sqrt(a*f^2 + x^2*e^2)

________________________________________________________________________________________

Mupad [B]
time = 4.66, size = 210, normalized size = 1.54 \begin {gather*} \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 . \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d + e*x + f*(a + (e^2*x^2)/f^2)^(1/2))^2,x)

[Out]

piecewise(e == 0, x*(d + a^(1/2)*f)^2, e ~= 0, x*(a*f^2 + d^2) + (2*e^2*x^3)/3 + d*e*x^2 + (2*a*f^3*(a + (e^2*
x^2)/f^2)^(1/2))/e - (2*f*(a + (e^2*x^2)/f^2)^(1/2)*(2*a*f^2 - e^2*x^2))/(3*e) + d*f*x*(a + (e^2*x^2)/f^2)^(1/
2) + (2*a*d*f*log(x*(e^2/f^2)^(1/2) + (a + (e^2*x^2)/f^2)^(1/2)))/(e^2/f^2)^(1/2) - (a*d*e^2*log(2*x*(e^2/f^2)
^(1/2) + 2*(a + (e^2*x^2)/f^2)^(1/2)))/(f*(e^2/f^2)^(3/2)))

________________________________________________________________________________________