3.474 \(\int (d+e x+f \sqrt {a+b x+\frac {e^2 x^2}{f^2}})^2 \, dx\)

Optimal. Leaf size=237 \[ -\frac {f^2 \left (4 a e^2-b^2 f^2\right ) \left (2 d e-b f^2\right )^2}{16 e^4 \left (2 e \left (f \sqrt {a+\frac {x \left (b f^2+e^2 x\right )}{f^2}}+e x\right )+b f^2\right )}+\frac {f^2 \left (4 a e^2-b^2 f^2\right ) \left (2 d e-b f^2\right ) \log \left (2 e \left (f \sqrt {a+\frac {x \left (b f^2+e^2 x\right )}{f^2}}+e x\right )+b f^2\right )}{8 e^4}+\frac {f^2 \left (4 a e^2-b^2 f^2\right ) \left (f \sqrt {a+b x+\frac {e^2 x^2}{f^2}}+e x\right )}{8 e^3}+\frac {\left (f \sqrt {a+b x+\frac {e^2 x^2}{f^2}}+d+e x\right )^3}{6 e} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.24, antiderivative size = 237, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {2116, 893} \[ -\frac {f^2 \left (4 a e^2-b^2 f^2\right ) \left (2 d e-b f^2\right )^2}{16 e^4 \left (2 e \left (f \sqrt {a+\frac {x \left (b f^2+e^2 x\right )}{f^2}}+e x\right )+b f^2\right )}+\frac {f^2 \left (4 a e^2-b^2 f^2\right ) \left (2 d e-b f^2\right ) \log \left (2 e \left (f \sqrt {a+\frac {x \left (b f^2+e^2 x\right )}{f^2}}+e x\right )+b f^2\right )}{8 e^4}+\frac {f^2 \left (4 a e^2-b^2 f^2\right ) \left (f \sqrt {a+b x+\frac {e^2 x^2}{f^2}}+e x\right )}{8 e^3}+\frac {\left (f \sqrt {a+b x+\frac {e^2 x^2}{f^2}}+d+e x\right )^3}{6 e} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(f^2*(4*a*e^2 - b^2*f^2)*(e*x + f*Sqrt[a + b*x + (e^2*x^2)/f^2]))/(8*e^3) + (d + e*x + f*Sqrt[a + b*x + (e^2*x
^2)/f^2])^3/(6*e) - (f^2*(2*d*e - b*f^2)^2*(4*a*e^2 - b^2*f^2))/(16*e^4*(b*f^2 + 2*e*(e*x + f*Sqrt[a + (x*(b*f
^2 + e^2*x))/f^2]))) + (f^2*(2*d*e - b*f^2)*(4*a*e^2 - b^2*f^2)*Log[b*f^2 + 2*e*(e*x + f*Sqrt[a + (x*(b*f^2 +
e^2*x))/f^2])])/(8*e^4)

Rule 893

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 2116

Int[((g_.) + (h_.)*((d_.) + (e_.)*(x_) + (f_.)*Sqrt[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2])^(n_))^(p_.), x_Symbol]
 :> Dist[2, Subst[Int[((g + h*x^n)^p*(d^2*e - (b*d - a*e)*f^2 - (2*d*e - b*f^2)*x + e*x^2))/(-2*d*e + b*f^2 +
2*e*x)^2, x], x, d + e*x + f*Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a, b, 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+b x+\frac {e^2 x^2}{f^2}}\right )^2 \, dx &=2 \operatorname {Subst}\left (\int \frac {x^2 \left (d^2 e-(b d-a e) f^2-\left (2 d e-b f^2\right ) x+e x^2\right )}{\left (-2 d e+b f^2+2 e x\right )^2} \, dx,x,d+e x+f \sqrt {a+b x+\frac {e^2 x^2}{f^2}}\right )\\ &=2 \operatorname {Subst}\left (\int \left (\frac {4 a e^2 f^2-b^2 f^4}{16 e^3}+\frac {x^2}{4 e}+\frac {\left (4 a e^2-b^2 f^2\right ) \left (2 d e f-b f^3\right )^2}{16 e^3 \left (2 d e-b f^2-2 e x\right )^2}-\frac {f^2 \left (2 d e-b f^2\right ) \left (4 a e^2-b^2 f^2\right )}{8 e^3 \left (2 d e-b f^2-2 e x\right )}\right ) \, dx,x,d+e x+f \sqrt {a+b x+\frac {e^2 x^2}{f^2}}\right )\\ &=\frac {f^2 \left (4 a e^2-b^2 f^2\right ) \left (e x+f \sqrt {a+b x+\frac {e^2 x^2}{f^2}}\right )}{8 e^3}+\frac {\left (d+e x+f \sqrt {a+b x+\frac {e^2 x^2}{f^2}}\right )^3}{6 e}-\frac {f^2 \left (2 d e-b f^2\right )^2 \left (4 a e^2-b^2 f^2\right )}{16 e^4 \left (b f^2+2 e \left (e x+f \sqrt {a+\frac {x \left (b f^2+e^2 x\right )}{f^2}}\right )\right )}+\frac {f^2 \left (2 d e-b f^2\right ) \left (4 a e^2-b^2 f^2\right ) \log \left (b f^2+2 e \left (e x+f \sqrt {a+\frac {x \left (b f^2+e^2 x\right )}{f^2}}\right )\right )}{8 e^4}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.32, size = 213, normalized size = 0.90 \[ \frac {6 f^2 \left (b^2 f^2-4 a e^2\right ) \left (b f^2-2 d e\right ) \log \left (-2 e \left (f \sqrt {a+x \left (b+\frac {e^2 x}{f^2}\right )}+e x\right )-b f^2\right )+\frac {3 \left (b^2 f^2-4 a e^2\right ) \left (b f^3-2 d e f\right )^2}{2 e \left (f \sqrt {a+x \left (b+\frac {e^2 x}{f^2}\right )}+e x\right )+b f^2}+6 e f^2 \left (4 a e^2-b^2 f^2\right ) \left (f \sqrt {a+x \left (b+\frac {e^2 x}{f^2}\right )}+e x\right )+8 e^3 \left (f \sqrt {a+x \left (b+\frac {e^2 x}{f^2}\right )}+d+e x\right )^3}{48 e^4} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(6*e*f^2*(4*a*e^2 - b^2*f^2)*(e*x + f*Sqrt[a + x*(b + (e^2*x)/f^2)]) + 8*e^3*(d + e*x + f*Sqrt[a + x*(b + (e^2
*x)/f^2)])^3 + (3*(-4*a*e^2 + b^2*f^2)*(-2*d*e*f + b*f^3)^2)/(b*f^2 + 2*e*(e*x + f*Sqrt[a + x*(b + (e^2*x)/f^2
)])) + 6*f^2*(-2*d*e + b*f^2)*(-4*a*e^2 + b^2*f^2)*Log[-(b*f^2) - 2*e*(e*x + f*Sqrt[a + x*(b + (e^2*x)/f^2)])]
)/(48*e^4)

________________________________________________________________________________________

fricas [A]  time = 0.56, size = 219, normalized size = 0.92 \[ \frac {16 \, e^{6} x^{3} + 12 \, {\left (b e^{4} f^{2} + 2 \, d e^{5}\right )} x^{2} + 24 \, {\left (a e^{4} f^{2} + d^{2} e^{4}\right )} x - 3 \, {\left (b^{3} f^{6} + 8 \, a d e^{3} f^{2} - 2 \, {\left (b^{2} d e + 2 \, a b e^{2}\right )} f^{4}\right )} \log \left (-b f^{2} - 2 \, e^{2} x + 2 \, e f \sqrt {\frac {b f^{2} x + e^{2} x^{2} + a f^{2}}{f^{2}}}\right ) - 2 \, {\left (3 \, b^{2} e f^{5} - 8 \, e^{5} f x^{2} - 2 \, {\left (3 \, b d e^{2} + 4 \, a e^{3}\right )} f^{3} - 2 \, {\left (b e^{3} f^{3} + 6 \, d e^{4} f\right )} x\right )} \sqrt {\frac {b f^{2} x + e^{2} x^{2} + a f^{2}}{f^{2}}}}{24 \, e^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/24*(16*e^6*x^3 + 12*(b*e^4*f^2 + 2*d*e^5)*x^2 + 24*(a*e^4*f^2 + d^2*e^4)*x - 3*(b^3*f^6 + 8*a*d*e^3*f^2 - 2*
(b^2*d*e + 2*a*b*e^2)*f^4)*log(-b*f^2 - 2*e^2*x + 2*e*f*sqrt((b*f^2*x + e^2*x^2 + a*f^2)/f^2)) - 2*(3*b^2*e*f^
5 - 8*e^5*f*x^2 - 2*(3*b*d*e^2 + 4*a*e^3)*f^3 - 2*(b*e^3*f^3 + 6*d*e^4*f)*x)*sqrt((b*f^2*x + e^2*x^2 + a*f^2)/
f^2))/e^4

________________________________________________________________________________________

giac [A]  time = 0.30, size = 224, normalized size = 0.95 \[ \frac {1}{2} \, b f^{2} x^{2} + a f^{2} x + \frac {2}{3} \, x^{3} e^{2} + d x^{2} e + d^{2} x - \frac {1}{8} \, {\left (b^{3} f^{5} {\left | f \right |} - 2 \, b^{2} d f^{3} {\left | f \right |} e - 4 \, a b f^{3} {\left | f \right |} e^{2} + 8 \, a d f {\left | f \right |} e^{3}\right )} e^{\left (-4\right )} \log \left ({\left | -b f^{2} - 2 \, {\left (x e - \sqrt {b f^{2} x + a f^{2} + x^{2} e^{2}}\right )} e \right |}\right ) + \frac {1}{12} \, \sqrt {b f^{2} x + a f^{2} + x^{2} e^{2}} {\left (2 \, {\left (\frac {4 \, x {\left | f \right |} e}{f} + \frac {{\left (b f^{3} {\left | f \right |} e^{3} + 6 \, d f {\left | f \right |} e^{4}\right )} e^{\left (-4\right )}}{f^{2}}\right )} x - \frac {{\left (3 \, b^{2} f^{5} {\left | f \right |} e - 6 \, b d f^{3} {\left | f \right |} e^{2} - 8 \, a f^{3} {\left | f \right |} e^{3}\right )} e^{\left (-4\right )}}{f^{2}}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*b*f^2*x^2 + a*f^2*x + 2/3*x^3*e^2 + d*x^2*e + d^2*x - 1/8*(b^3*f^5*abs(f) - 2*b^2*d*f^3*abs(f)*e - 4*a*b*f
^3*abs(f)*e^2 + 8*a*d*f*abs(f)*e^3)*e^(-4)*log(abs(-b*f^2 - 2*(x*e - sqrt(b*f^2*x + a*f^2 + x^2*e^2))*e)) + 1/
12*sqrt(b*f^2*x + a*f^2 + x^2*e^2)*(2*(4*x*abs(f)*e/f + (b*f^3*abs(f)*e^3 + 6*d*f*abs(f)*e^4)*e^(-4)/f^2)*x -
(3*b^2*f^5*abs(f)*e - 6*b*d*f^3*abs(f)*e^2 - 8*a*f^3*abs(f)*e^3)*e^(-4)/f^2)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 409, normalized size = 1.73 \[ \frac {b^{3} f^{5} \ln \left (\frac {\frac {b}{2}+\frac {e^{2} x}{f^{2}}}{\sqrt {\frac {e^{2}}{f^{2}}}}+\sqrt {b x +\frac {e^{2} x^{2}}{f^{2}}+a}\right )}{8 \sqrt {\frac {e^{2}}{f^{2}}}\, e^{3}}-\frac {a b \,f^{3} \ln \left (\frac {\frac {b}{2}+\frac {e^{2} x}{f^{2}}}{\sqrt {\frac {e^{2}}{f^{2}}}}+\sqrt {b x +\frac {e^{2} x^{2}}{f^{2}}+a}\right )}{2 \sqrt {\frac {e^{2}}{f^{2}}}\, e}-\frac {b^{2} d \,f^{3} \ln \left (\frac {\frac {b}{2}+\frac {e^{2} x}{f^{2}}}{\sqrt {\frac {e^{2}}{f^{2}}}}+\sqrt {b x +\frac {e^{2} x^{2}}{f^{2}}+a}\right )}{4 \sqrt {\frac {e^{2}}{f^{2}}}\, e^{2}}+\frac {b \,f^{2} x^{2}}{2}+\frac {2 e^{2} x^{3}}{3}+\frac {a d f \ln \left (\frac {\frac {b}{2}+\frac {e^{2} x}{f^{2}}}{\sqrt {\frac {e^{2}}{f^{2}}}}+\sqrt {b x +\frac {e^{2} x^{2}}{f^{2}}+a}\right )}{\sqrt {\frac {e^{2}}{f^{2}}}}+a \,f^{2} x -\frac {\sqrt {b x +\frac {e^{2} x^{2}}{f^{2}}+a}\, b^{2} f^{5}}{4 e^{3}}-\frac {\sqrt {b x +\frac {e^{2} x^{2}}{f^{2}}+a}\, b \,f^{3} x}{2 e}+d e \,x^{2}+\frac {\sqrt {b x +\frac {e^{2} x^{2}}{f^{2}}+a}\, b d \,f^{3}}{2 e^{2}}+d^{2} x +\sqrt {b x +\frac {e^{2} x^{2}}{f^{2}}+a}\, d f x +\frac {d^{3}}{3 e}+\frac {2 \left (b x +\frac {e^{2} x^{2}}{f^{2}}+a \right )^{\frac {3}{2}} f^{3}}{3 e} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

a*f^2*x+1/2*f^2*b*x^2+2/3*e^2*x^3+2/3*(b*x+e^2/f^2*x^2+a)^(3/2)/e*f^3-1/2/e*f^3*b*(b*x+e^2/f^2*x^2+a)^(1/2)*x-
1/4/e^3*f^5*b^2*(b*x+e^2/f^2*x^2+a)^(1/2)-1/2/e*f^3*b*ln((1/2*b+e^2/f^2*x)/(e^2/f^2)^(1/2)+(b*x+e^2/f^2*x^2+a)
^(1/2))/(e^2/f^2)^(1/2)*a+1/8/e^3*f^5*b^3*ln((1/2*b+e^2/f^2*x)/(e^2/f^2)^(1/2)+(b*x+e^2/f^2*x^2+a)^(1/2))/(e^2
/f^2)^(1/2)+f*d*(b*x+e^2/f^2*x^2+a)^(1/2)*x+1/2*d/e^2*f^3*(b*x+e^2/f^2*x^2+a)^(1/2)*b+f*d*ln((1/2*b+e^2/f^2*x)
/(e^2/f^2)^(1/2)+(b*x+e^2/f^2*x^2+a)^(1/2))/(e^2/f^2)^(1/2)*a-1/4*d/e^2*f^3*ln((1/2*b+e^2/f^2*x)/(e^2/f^2)^(1/
2)+(b*x+e^2/f^2*x^2+a)^(1/2))/(e^2/f^2)^(1/2)*b^2+d*e*x^2+d^2*x+1/3*d^3/e

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(b^2*f^2-4*a*e^2>0)', see `assu
me?` for more details)Is b^2*f^2-4*a*e^2    positive, negative or zero?

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \[ \int {\left (d+e\,x+f\,\sqrt {a+b\,x+\frac {e^2\,x^2}{f^2}}\right )}^2 \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (d + e x + f \sqrt {a + b x + \frac {e^{2} x^{2}}{f^{2}}}\right )^{2}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral((d + e*x + f*sqrt(a + b*x + e**2*x**2/f**2))**2, x)

________________________________________________________________________________________