\(\int \sqrt {b+\sqrt {b^2+a x^2}} \, dx\) [842]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 19, antiderivative size = 63 \[ \int \sqrt {b+\sqrt {b^2+a x^2}} \, dx=\frac {4 b x}{3 \sqrt {b+\sqrt {b^2+a x^2}}}+\frac {2 x \sqrt {b^2+a x^2}}{3 \sqrt {b+\sqrt {b^2+a x^2}}} \]

[Out]

4/3*b*x/(b+(a*x^2+b^2)^(1/2))^(1/2)+2/3*x*(a*x^2+b^2)^(1/2)/(b+(a*x^2+b^2)^(1/2))^(1/2)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 51, normalized size of antiderivative = 0.81, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.053, Rules used = {2154} \[ \int \sqrt {b+\sqrt {b^2+a x^2}} \, dx=\frac {2 b x}{\sqrt {\sqrt {a x^2+b^2}+b}}+\frac {2 a x^3}{3 \left (\sqrt {a x^2+b^2}+b\right )^{3/2}} \]

[In]

Int[Sqrt[b + Sqrt[b^2 + a*x^2]],x]

[Out]

(2*a*x^3)/(3*(b + Sqrt[b^2 + a*x^2])^(3/2)) + (2*b*x)/Sqrt[b + Sqrt[b^2 + a*x^2]]

Rule 2154

Int[Sqrt[(a_) + (b_.)*Sqrt[(c_) + (d_.)*(x_)^2]], x_Symbol] :> Simp[2*b^2*d*(x^3/(3*(a + b*Sqrt[c + d*x^2])^(3
/2))), x] + Simp[2*a*(x/Sqrt[a + b*Sqrt[c + d*x^2]]), x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2*c, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {2 a x^3}{3 \left (b+\sqrt {b^2+a x^2}\right )^{3/2}}+\frac {2 b x}{\sqrt {b+\sqrt {b^2+a x^2}}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.10 (sec) , antiderivative size = 41, normalized size of antiderivative = 0.65 \[ \int \sqrt {b+\sqrt {b^2+a x^2}} \, dx=\frac {2 x \left (2 b+\sqrt {b^2+a x^2}\right )}{3 \sqrt {b+\sqrt {b^2+a x^2}}} \]

[In]

Integrate[Sqrt[b + Sqrt[b^2 + a*x^2]],x]

[Out]

(2*x*(2*b + Sqrt[b^2 + a*x^2]))/(3*Sqrt[b + Sqrt[b^2 + a*x^2]])

Maple [C] (verified)

Result contains higher order function than in optimal. Order 3 vs. order 2.

Time = 0.08 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.87

method result size
meijerg \(-\frac {\left (b^{2}\right )^{\frac {1}{4}} \left (-\frac {32 \sqrt {\pi }\, \sqrt {2}\, x^{3} \sqrt {\frac {a}{b^{2}}}\, a \cosh \left (\frac {3 \,\operatorname {arcsinh}\left (\frac {x \sqrt {a}}{b}\right )}{2}\right )}{3 b^{2}}-\frac {8 \sqrt {\pi }\, \sqrt {2}\, \sqrt {\frac {a}{b^{2}}}\, \left (-\frac {4 x^{4} a^{2}}{3 b^{4}}-\frac {2 x^{2} a}{3 b^{2}}+\frac {2}{3}\right ) \sinh \left (\frac {3 \,\operatorname {arcsinh}\left (\frac {x \sqrt {a}}{b}\right )}{2}\right ) b}{\sqrt {a}\, \sqrt {\frac {x^{2} a}{b^{2}}+1}}\right )}{8 \sqrt {\pi }\, \sqrt {\frac {a}{b^{2}}}}\) \(118\)

[In]

int((b+(a*x^2+b^2)^(1/2))^(1/2),x,method=_RETURNVERBOSE)

[Out]

-1/8*(b^2)^(1/4)/Pi^(1/2)/(a/b^2)^(1/2)*(-32/3*Pi^(1/2)*2^(1/2)*x^3*(a/b^2)^(1/2)/b^2*a*cosh(3/2*arcsinh(1/b*x
*a^(1/2)))-8*Pi^(1/2)*2^(1/2)*(a/b^2)^(1/2)*(-4/3/b^4*x^4*a^2-2/3/b^2*x^2*a+2/3)*sinh(3/2*arcsinh(1/b*x*a^(1/2
)))*b/a^(1/2)/(1/b^2*x^2*a+1)^(1/2))

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.75 \[ \int \sqrt {b+\sqrt {b^2+a x^2}} \, dx=\frac {2 \, {\left (a x^{2} - b^{2} + \sqrt {a x^{2} + b^{2}} b\right )} \sqrt {b + \sqrt {a x^{2} + b^{2}}}}{3 \, a x} \]

[In]

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

[Out]

2/3*(a*x^2 - b^2 + sqrt(a*x^2 + b^2)*b)*sqrt(b + sqrt(a*x^2 + b^2))/(a*x)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 286 vs. \(2 (56) = 112\).

Time = 0.98 (sec) , antiderivative size = 286, normalized size of antiderivative = 4.54 \[ \int \sqrt {b+\sqrt {b^2+a x^2}} \, dx=- \frac {\sqrt {2} a \sqrt {b} x^{3} \Gamma \left (- \frac {1}{4}\right ) \Gamma \left (\frac {1}{4}\right )}{12 \pi b^{2} \sqrt {\frac {a x^{2}}{b^{2}} + 1} \sqrt {\sqrt {\frac {a x^{2}}{b^{2}} + 1} + 1} + 12 \pi b^{2} \sqrt {\sqrt {\frac {a x^{2}}{b^{2}} + 1} + 1}} - \frac {3 \sqrt {2} b^{\frac {5}{2}} x \sqrt {\frac {a x^{2}}{b^{2}} + 1} \Gamma \left (- \frac {1}{4}\right ) \Gamma \left (\frac {1}{4}\right )}{12 \pi b^{2} \sqrt {\frac {a x^{2}}{b^{2}} + 1} \sqrt {\sqrt {\frac {a x^{2}}{b^{2}} + 1} + 1} + 12 \pi b^{2} \sqrt {\sqrt {\frac {a x^{2}}{b^{2}} + 1} + 1}} - \frac {3 \sqrt {2} b^{\frac {5}{2}} x \Gamma \left (- \frac {1}{4}\right ) \Gamma \left (\frac {1}{4}\right )}{12 \pi b^{2} \sqrt {\frac {a x^{2}}{b^{2}} + 1} \sqrt {\sqrt {\frac {a x^{2}}{b^{2}} + 1} + 1} + 12 \pi b^{2} \sqrt {\sqrt {\frac {a x^{2}}{b^{2}} + 1} + 1}} \]

[In]

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

[Out]

-sqrt(2)*a*sqrt(b)*x**3*gamma(-1/4)*gamma(1/4)/(12*pi*b**2*sqrt(a*x**2/b**2 + 1)*sqrt(sqrt(a*x**2/b**2 + 1) +
1) + 12*pi*b**2*sqrt(sqrt(a*x**2/b**2 + 1) + 1)) - 3*sqrt(2)*b**(5/2)*x*sqrt(a*x**2/b**2 + 1)*gamma(-1/4)*gamm
a(1/4)/(12*pi*b**2*sqrt(a*x**2/b**2 + 1)*sqrt(sqrt(a*x**2/b**2 + 1) + 1) + 12*pi*b**2*sqrt(sqrt(a*x**2/b**2 +
1) + 1)) - 3*sqrt(2)*b**(5/2)*x*gamma(-1/4)*gamma(1/4)/(12*pi*b**2*sqrt(a*x**2/b**2 + 1)*sqrt(sqrt(a*x**2/b**2
 + 1) + 1) + 12*pi*b**2*sqrt(sqrt(a*x**2/b**2 + 1) + 1))

Maxima [F]

\[ \int \sqrt {b+\sqrt {b^2+a x^2}} \, dx=\int { \sqrt {b + \sqrt {a x^{2} + b^{2}}} \,d x } \]

[In]

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

[Out]

integrate(sqrt(b + sqrt(a*x^2 + b^2)), x)

Giac [F]

\[ \int \sqrt {b+\sqrt {b^2+a x^2}} \, dx=\int { \sqrt {b + \sqrt {a x^{2} + b^{2}}} \,d x } \]

[In]

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

[Out]

integrate(sqrt(b + sqrt(a*x^2 + b^2)), x)

Mupad [F(-1)]

Timed out. \[ \int \sqrt {b+\sqrt {b^2+a x^2}} \, dx=\int \sqrt {b+\sqrt {b^2+a\,x^2}} \,d x \]

[In]

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

[Out]

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