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

Optimal. Leaf size=233 \[ -\frac {f^2 \left (4 a-\frac {b^2 f^2}{e^2}\right ) \sqrt {f \sqrt {a+b x+\frac {e^2 x^2}{f^2}}+d+e x}}{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 ) \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt {e} \sqrt {f \sqrt {a+b x+\frac {e^2 x^2}{f^2}}+d+e x}}{\sqrt {2 d e-b f^2}}\right )}{4 \sqrt {2} e^{5/2} \sqrt {2 d e-b f^2}}+\frac {\left (f \sqrt {a+b x+\frac {e^2 x^2}{f^2}}+d+e x\right )^{3/2}}{3 e} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.30, antiderivative size = 233, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {2116, 897, 1257, 1153, 208} \[ -\frac {f^2 \left (4 a-\frac {b^2 f^2}{e^2}\right ) \sqrt {f \sqrt {a+b x+\frac {e^2 x^2}{f^2}}+d+e x}}{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 ) \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt {e} \sqrt {f \sqrt {a+b x+\frac {e^2 x^2}{f^2}}+d+e x}}{\sqrt {2 d e-b f^2}}\right )}{4 \sqrt {2} e^{5/2} \sqrt {2 d e-b f^2}}+\frac {\left (f \sqrt {a+b x+\frac {e^2 x^2}{f^2}}+d+e x\right )^{3/2}}{3 e} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(d + e*x + f*Sqrt[a + b*x + (e^2*x^2)/f^2])^(3/2)/(3*e) - (f^2*(4*a - (b^2*f^2)/e^2)*Sqrt[d + e*x + f*Sqrt[a +
 b*x + (e^2*x^2)/f^2]])/(4*(b*f^2 + 2*e*(e*x + f*Sqrt[a + (x*(b*f^2 + e^2*x))/f^2]))) - (f^2*(4*a*e^2 - b^2*f^
2)*ArcTanh[(Sqrt[2]*Sqrt[e]*Sqrt[d + e*x + f*Sqrt[a + b*x + (e^2*x^2)/f^2]])/Sqrt[2*d*e - b*f^2]])/(4*Sqrt[2]*
e^(5/2)*Sqrt[2*d*e - b*f^2])

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rule 897

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :
> With[{q = Denominator[m]}, Dist[q/e, Subst[Int[x^(q*(m + 1) - 1)*((e*f - d*g)/e + (g*x^q)/e)^n*((c*d^2 - b*d
*e + a*e^2)/e^2 - ((2*c*d - b*e)*x^q)/e^2 + (c*x^(2*q))/e^2)^p, x], x, (d + e*x)^(1/q)], 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] && IntegersQ[n,
 p] && FractionQ[m]

Rule 1153

Int[((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(
d + e*x^2)^q*(a + b*x^2 + c*x^4)^p, x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 -
b*d*e + a*e^2, 0] && IGtQ[p, 0] && IGtQ[q, -2]

Rule 1257

Int[(x_)^(m_.)*((d_) + (e_.)*(x_)^2)^(q_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Simp[((-d)^
(m/2 - 1)*(c*d^2 - b*d*e + a*e^2)^p*x*(d + e*x^2)^(q + 1))/(2*e^(2*p + m/2)*(q + 1)), x] + Dist[1/(2*e^(2*p +
m/2)*(q + 1)), Int[(d + e*x^2)^(q + 1)*ExpandToSum[Together[(1*(2*e^(2*p + m/2)*(q + 1)*x^m*(a + b*x^2 + c*x^4
)^p - (-d)^(m/2 - 1)*(c*d^2 - b*d*e + a*e^2)^p*(d + e*(2*q + 3)*x^2)))/(d + e*x^2)], x], x], x] /; FreeQ[{a, b
, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && IGtQ[p, 0] && ILtQ[q, -1] && IGtQ[m/2, 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 \sqrt {d+e x+f \sqrt {a+b x+\frac {e^2 x^2}{f^2}}} \, dx &=2 \operatorname {Subst}\left (\int \frac {\sqrt {x} \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 )\\ &=4 \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^2+e x^4\right )}{\left (-2 d e+b f^2+2 e x^2\right )^2} \, dx,x,\sqrt {d+e x+f \sqrt {a+b x+\frac {e^2 x^2}{f^2}}}\right )\\ &=-\frac {f^2 \left (4 a-\frac {b^2 f^2}{e^2}\right ) \sqrt {d+e x+f \sqrt {a+b x+\frac {e^2 x^2}{f^2}}}}{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 {\operatorname {Subst}\left (\int \frac {-e f^2 \left (4 a e^2-b^2 f^2\right )+4 e^2 \left (2 d e-b f^2\right ) x^2-8 e^3 x^4}{-2 d e+b f^2+2 e x^2} \, dx,x,\sqrt {d+e x+f \sqrt {a+b x+\frac {e^2 x^2}{f^2}}}\right )}{4 e^3}\\ &=-\frac {f^2 \left (4 a-\frac {b^2 f^2}{e^2}\right ) \sqrt {d+e x+f \sqrt {a+b x+\frac {e^2 x^2}{f^2}}}}{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 {\operatorname {Subst}\left (\int \left (-4 e^2 x^2-\frac {e f^2 \left (4 a e^2-b^2 f^2\right )}{-2 d e+b f^2+2 e x^2}\right ) \, dx,x,\sqrt {d+e x+f \sqrt {a+b x+\frac {e^2 x^2}{f^2}}}\right )}{4 e^3}\\ &=\frac {\left (d+e x+f \sqrt {a+b x+\frac {e^2 x^2}{f^2}}\right )^{3/2}}{3 e}-\frac {f^2 \left (4 a-\frac {b^2 f^2}{e^2}\right ) \sqrt {d+e x+f \sqrt {a+b x+\frac {e^2 x^2}{f^2}}}}{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 {1}{4} \left (f^2 \left (4 a-\frac {b^2 f^2}{e^2}\right )\right ) \operatorname {Subst}\left (\int \frac {1}{-2 d e+b f^2+2 e x^2} \, dx,x,\sqrt {d+e x+f \sqrt {a+b x+\frac {e^2 x^2}{f^2}}}\right )\\ &=\frac {\left (d+e x+f \sqrt {a+b x+\frac {e^2 x^2}{f^2}}\right )^{3/2}}{3 e}-\frac {f^2 \left (4 a-\frac {b^2 f^2}{e^2}\right ) \sqrt {d+e x+f \sqrt {a+b x+\frac {e^2 x^2}{f^2}}}}{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 (4 a e^2-b^2 f^2\right ) \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt {e} \sqrt {d+e x+f \sqrt {a+b x+\frac {e^2 x^2}{f^2}}}}{\sqrt {2 d e-b f^2}}\right )}{4 \sqrt {2} e^{5/2} \sqrt {2 d e-b f^2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.39, size = 223, normalized size = 0.96 \[ \frac {-\frac {\sqrt {e} f^2 \left (4 a e^2-b^2 f^2\right ) \tanh ^{-1}\left (\frac {\sqrt {2} \sqrt {e} \sqrt {f \sqrt {a+x \left (b+\frac {e^2 x}{f^2}\right )}+d+e x}}{\sqrt {2 d e-b f^2}}\right )}{\sqrt {4 d e-2 b f^2}}+\frac {\left (b^2 e f^4-4 a e^3 f^2\right ) \sqrt {f \sqrt {a+x \left (b+\frac {e^2 x}{f^2}\right )}+d+e x}}{2 e \left (f \sqrt {a+x \left (b+\frac {e^2 x}{f^2}\right )}+e x\right )+b f^2}+\frac {4}{3} e^2 \left (f \sqrt {a+x \left (b+\frac {e^2 x}{f^2}\right )}+d+e x\right )^{3/2}}{4 e^3} \]

Antiderivative was successfully verified.

[In]

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

[Out]

((4*e^2*(d + e*x + f*Sqrt[a + x*(b + (e^2*x)/f^2)])^(3/2))/3 + ((-4*a*e^3*f^2 + b^2*e*f^4)*Sqrt[d + e*x + f*Sq
rt[a + x*(b + (e^2*x)/f^2)]])/(b*f^2 + 2*e*(e*x + f*Sqrt[a + x*(b + (e^2*x)/f^2)])) - (Sqrt[e]*f^2*(4*a*e^2 -
b^2*f^2)*ArcTanh[(Sqrt[2]*Sqrt[e]*Sqrt[d + e*x + f*Sqrt[a + x*(b + (e^2*x)/f^2)]])/Sqrt[2*d*e - b*f^2]])/Sqrt[
4*d*e - 2*b*f^2])/(4*e^3)

________________________________________________________________________________________

fricas [A]  time = 0.71, size = 692, normalized size = 2.97 \[ \left [-\frac {3 \, {\left (b^{2} f^{4} - 4 \, a e^{2} f^{2}\right )} \sqrt {-2 \, b e f^{2} + 4 \, d e^{2}} \log \left (-b^{2} f^{4} + 4 \, {\left (b d e - a e^{2}\right )} f^{2} - 4 \, {\left (b e^{2} f^{2} - 2 \, d e^{3}\right )} x - 2 \, {\left (2 \, \sqrt {-2 \, b e f^{2} + 4 \, d e^{2}} e f \sqrt {\frac {b f^{2} x + e^{2} x^{2} + a f^{2}}{f^{2}}} - \sqrt {-2 \, b e f^{2} + 4 \, d e^{2}} {\left (b f^{2} + 2 \, e^{2} x\right )}\right )} \sqrt {e x + f \sqrt {\frac {b f^{2} x + e^{2} x^{2} + a f^{2}}{f^{2}}} + d} + 4 \, {\left (b e f^{3} - 2 \, d e^{2} f\right )} \sqrt {\frac {b f^{2} x + e^{2} x^{2} + a f^{2}}{f^{2}}}\right ) - 4 \, {\left (3 \, b^{2} e f^{4} - 2 \, b d e^{2} f^{2} - 8 \, d^{2} e^{3} + 10 \, {\left (b e^{3} f^{2} - 2 \, d e^{4}\right )} x - 2 \, {\left (b e^{2} f^{3} - 2 \, d e^{3} f\right )} \sqrt {\frac {b f^{2} x + e^{2} x^{2} + a f^{2}}{f^{2}}}\right )} \sqrt {e x + f \sqrt {\frac {b f^{2} x + e^{2} x^{2} + a f^{2}}{f^{2}}} + d}}{48 \, {\left (b e^{3} f^{2} - 2 \, d e^{4}\right )}}, \frac {3 \, {\left (b^{2} f^{4} - 4 \, a e^{2} f^{2}\right )} \sqrt {2 \, b e f^{2} - 4 \, d e^{2}} \arctan \left (\frac {\sqrt {e x + f \sqrt {\frac {b f^{2} x + e^{2} x^{2} + a f^{2}}{f^{2}}} + d} {\left (\sqrt {2 \, b e f^{2} - 4 \, d e^{2}} f \sqrt {\frac {b f^{2} x + e^{2} x^{2} + a f^{2}}{f^{2}}} - \sqrt {2 \, b e f^{2} - 4 \, d e^{2}} {\left (e x + d\right )}\right )}}{2 \, {\left (a e f^{2} - d^{2} e + {\left (b e f^{2} - 2 \, d e^{2}\right )} x\right )}}\right ) + 2 \, {\left (3 \, b^{2} e f^{4} - 2 \, b d e^{2} f^{2} - 8 \, d^{2} e^{3} + 10 \, {\left (b e^{3} f^{2} - 2 \, d e^{4}\right )} x - 2 \, {\left (b e^{2} f^{3} - 2 \, d e^{3} f\right )} \sqrt {\frac {b f^{2} x + e^{2} x^{2} + a f^{2}}{f^{2}}}\right )} \sqrt {e x + f \sqrt {\frac {b f^{2} x + e^{2} x^{2} + a f^{2}}{f^{2}}} + d}}{24 \, {\left (b e^{3} f^{2} - 2 \, d e^{4}\right )}}\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))^(1/2),x, algorithm="fricas")

[Out]

[-1/48*(3*(b^2*f^4 - 4*a*e^2*f^2)*sqrt(-2*b*e*f^2 + 4*d*e^2)*log(-b^2*f^4 + 4*(b*d*e - a*e^2)*f^2 - 4*(b*e^2*f
^2 - 2*d*e^3)*x - 2*(2*sqrt(-2*b*e*f^2 + 4*d*e^2)*e*f*sqrt((b*f^2*x + e^2*x^2 + a*f^2)/f^2) - sqrt(-2*b*e*f^2
+ 4*d*e^2)*(b*f^2 + 2*e^2*x))*sqrt(e*x + f*sqrt((b*f^2*x + e^2*x^2 + a*f^2)/f^2) + d) + 4*(b*e*f^3 - 2*d*e^2*f
)*sqrt((b*f^2*x + e^2*x^2 + a*f^2)/f^2)) - 4*(3*b^2*e*f^4 - 2*b*d*e^2*f^2 - 8*d^2*e^3 + 10*(b*e^3*f^2 - 2*d*e^
4)*x - 2*(b*e^2*f^3 - 2*d*e^3*f)*sqrt((b*f^2*x + e^2*x^2 + a*f^2)/f^2))*sqrt(e*x + f*sqrt((b*f^2*x + e^2*x^2 +
 a*f^2)/f^2) + d))/(b*e^3*f^2 - 2*d*e^4), 1/24*(3*(b^2*f^4 - 4*a*e^2*f^2)*sqrt(2*b*e*f^2 - 4*d*e^2)*arctan(1/2
*sqrt(e*x + f*sqrt((b*f^2*x + e^2*x^2 + a*f^2)/f^2) + d)*(sqrt(2*b*e*f^2 - 4*d*e^2)*f*sqrt((b*f^2*x + e^2*x^2
+ a*f^2)/f^2) - sqrt(2*b*e*f^2 - 4*d*e^2)*(e*x + d))/(a*e*f^2 - d^2*e + (b*e*f^2 - 2*d*e^2)*x)) + 2*(3*b^2*e*f
^4 - 2*b*d*e^2*f^2 - 8*d^2*e^3 + 10*(b*e^3*f^2 - 2*d*e^4)*x - 2*(b*e^2*f^3 - 2*d*e^3*f)*sqrt((b*f^2*x + e^2*x^
2 + a*f^2)/f^2))*sqrt(e*x + f*sqrt((b*f^2*x + e^2*x^2 + a*f^2)/f^2) + d))/(b*e^3*f^2 - 2*d*e^4)]

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {e x + \sqrt {b x + \frac {e^{2} x^{2}}{f^{2}} + a} f + d}\,{d x} \]

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))^(1/2),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [F]  time = 0.01, size = 0, normalized size = 0.00 \[ \int \sqrt {e x +d +\sqrt {b x +\frac {e^{2} x^{2}}{f^{2}}+a}\, f}\, dx \]

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)^(1/2),x)

[Out]

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

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {e x + \sqrt {b x + \frac {e^{2} x^{2}}{f^{2}} + a} f + d}\,{d x} \]

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))^(1/2),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \[ \int \sqrt {d+e\,x+f\,\sqrt {a+b\,x+\frac {e^2\,x^2}{f^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))^(1/2),x)

[Out]

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {d + e x + f \sqrt {a + b x + \frac {e^{2} x^{2}}{f^{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))**(1/2),x)

[Out]

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

________________________________________________________________________________________