3.1.28 \(\int \frac {\sqrt {x+\sqrt {a^2+x^2}}}{x} \, dx\) [28]

3.1.28.1 Optimal result
3.1.28.2 Mathematica [A] (verified)
3.1.28.3 Rubi [A] (verified)
3.1.28.4 Maple [C] (verified)
3.1.28.5 Fricas [A] (verification not implemented)
3.1.28.6 Sympy [C] (verification not implemented)
3.1.28.7 Maxima [F]
3.1.28.8 Giac [F]
3.1.28.9 Mupad [F(-1)]
3.1.28.10 Reduce [B] (verification not implemented)

3.1.28.1 Optimal result

Integrand size = 21, antiderivative size = 82 \[ \int \frac {\sqrt {x+\sqrt {a^2+x^2}}}{x} \, dx=2 \sqrt {x+\sqrt {a^2+x^2}}-2 \sqrt {a} \arctan \left (\frac {\sqrt {x+\sqrt {a^2+x^2}}}{\sqrt {a}}\right )-2 \sqrt {a} \text {arctanh}\left (\frac {\sqrt {x+\sqrt {a^2+x^2}}}{\sqrt {a}}\right ) \]

output
-2*arctan((x+(a^2+x^2)^(1/2))^(1/2)/a^(1/2))*a^(1/2)-2*arctanh((x+(a^2+x^2 
)^(1/2))^(1/2)/a^(1/2))*a^(1/2)+2*(x+(a^2+x^2)^(1/2))^(1/2)
 
3.1.28.2 Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.00 \[ \int \frac {\sqrt {x+\sqrt {a^2+x^2}}}{x} \, dx=2 \sqrt {x+\sqrt {a^2+x^2}}-2 \sqrt {a} \arctan \left (\frac {\sqrt {x+\sqrt {a^2+x^2}}}{\sqrt {a}}\right )-2 \sqrt {a} \text {arctanh}\left (\frac {\sqrt {x+\sqrt {a^2+x^2}}}{\sqrt {a}}\right ) \]

input
Integrate[Sqrt[x + Sqrt[a^2 + x^2]]/x,x]
 
output
2*Sqrt[x + Sqrt[a^2 + x^2]] - 2*Sqrt[a]*ArcTan[Sqrt[x + Sqrt[a^2 + x^2]]/S 
qrt[a]] - 2*Sqrt[a]*ArcTanh[Sqrt[x + Sqrt[a^2 + x^2]]/Sqrt[a]]
 
3.1.28.3 Rubi [A] (verified)

Time = 0.22 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.12, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {2544, 25, 363, 266, 756, 216, 219}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\sqrt {\sqrt {a^2+x^2}+x}}{x} \, dx\)

\(\Big \downarrow \) 2544

\(\displaystyle \int -\frac {\left (\sqrt {a^2+x^2}+x\right )^2+a^2}{\sqrt {\sqrt {a^2+x^2}+x} \left (a^2-\left (\sqrt {a^2+x^2}+x\right )^2\right )}d\left (\sqrt {a^2+x^2}+x\right )\)

\(\Big \downarrow \) 25

\(\displaystyle -\int \frac {a^2+\left (x+\sqrt {a^2+x^2}\right )^2}{\sqrt {x+\sqrt {a^2+x^2}} \left (a^2-\left (x+\sqrt {a^2+x^2}\right )^2\right )}d\left (x+\sqrt {a^2+x^2}\right )\)

\(\Big \downarrow \) 363

\(\displaystyle 2 \sqrt {\sqrt {a^2+x^2}+x}-2 a^2 \int \frac {1}{\sqrt {x+\sqrt {a^2+x^2}} \left (a^2-\left (x+\sqrt {a^2+x^2}\right )^2\right )}d\left (x+\sqrt {a^2+x^2}\right )\)

\(\Big \downarrow \) 266

\(\displaystyle 2 \sqrt {\sqrt {a^2+x^2}+x}-4 a^2 \int \frac {1}{a^2-\left (x+\sqrt {a^2+x^2}\right )^2}d\sqrt {x+\sqrt {a^2+x^2}}\)

\(\Big \downarrow \) 756

\(\displaystyle 2 \sqrt {\sqrt {a^2+x^2}+x}-4 a^2 \left (\frac {\int \frac {1}{a-x-\sqrt {a^2+x^2}}d\sqrt {x+\sqrt {a^2+x^2}}}{2 a}+\frac {\int \frac {1}{a+x+\sqrt {a^2+x^2}}d\sqrt {x+\sqrt {a^2+x^2}}}{2 a}\right )\)

\(\Big \downarrow \) 216

\(\displaystyle 2 \sqrt {\sqrt {a^2+x^2}+x}-4 a^2 \left (\frac {\int \frac {1}{a-x-\sqrt {a^2+x^2}}d\sqrt {x+\sqrt {a^2+x^2}}}{2 a}+\frac {\arctan \left (\frac {\sqrt {\sqrt {a^2+x^2}+x}}{\sqrt {a}}\right )}{2 a^{3/2}}\right )\)

\(\Big \downarrow \) 219

\(\displaystyle 2 \sqrt {\sqrt {a^2+x^2}+x}-4 a^2 \left (\frac {\arctan \left (\frac {\sqrt {\sqrt {a^2+x^2}+x}}{\sqrt {a}}\right )}{2 a^{3/2}}+\frac {\text {arctanh}\left (\frac {\sqrt {\sqrt {a^2+x^2}+x}}{\sqrt {a}}\right )}{2 a^{3/2}}\right )\)

input
Int[Sqrt[x + Sqrt[a^2 + x^2]]/x,x]
 
output
2*Sqrt[x + Sqrt[a^2 + x^2]] - 4*a^2*(ArcTan[Sqrt[x + Sqrt[a^2 + x^2]]/Sqrt 
[a]]/(2*a^(3/2)) + ArcTanh[Sqrt[x + Sqrt[a^2 + x^2]]/Sqrt[a]]/(2*a^(3/2)))
 

3.1.28.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 216
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A 
rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a 
, 0] || GtQ[b, 0])
 

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

rule 266
Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{k = De 
nominator[m]}, Simp[k/c   Subst[Int[x^(k*(m + 1) - 1)*(a + b*(x^(2*k)/c^2)) 
^p, x], x, (c*x)^(1/k)], x]] /; FreeQ[{a, b, c, p}, x] && FractionQ[m] && I 
ntBinomialQ[a, b, c, 2, m, p, x]
 

rule 363
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2), x 
_Symbol] :> Simp[d*(e*x)^(m + 1)*((a + b*x^2)^(p + 1)/(b*e*(m + 2*p + 3))), 
 x] - Simp[(a*d*(m + 1) - b*c*(m + 2*p + 3))/(b*(m + 2*p + 3))   Int[(e*x)^ 
m*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m, p}, x] && NeQ[b*c - a*d 
, 0] && NeQ[m + 2*p + 3, 0]
 

rule 756
Int[((a_) + (b_.)*(x_)^4)^(-1), x_Symbol] :> With[{r = Numerator[Rt[-a/b, 2 
]], s = Denominator[Rt[-a/b, 2]]}, Simp[r/(2*a)   Int[1/(r - s*x^2), x], x] 
 + Simp[r/(2*a)   Int[1/(r + s*x^2), x], x]] /; FreeQ[{a, b}, x] &&  !GtQ[a 
/b, 0]
 

rule 2544
Int[((g_.) + (h_.)*(x_))^(m_.)*((e_.)*(x_) + (f_.)*Sqrt[(a_.) + (c_.)*(x_)^ 
2])^(n_.), x_Symbol] :> Simp[1/(2^(m + 1)*e^(m + 1))   Subst[Int[x^(n - m - 
 2)*(a*f^2 + x^2)*((-a)*f^2*h + 2*e*g*x + h*x^2)^m, x], x, e*x + f*Sqrt[a + 
 c*x^2]], x] /; FreeQ[{a, c, e, f, g, h, n}, x] && EqQ[e^2 - c*f^2, 0] && I 
ntegerQ[m]
 
3.1.28.4 Maple [C] (verified)

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

Time = 0.02 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.30

method result size
meijerg \(2 \sqrt {2}\, \sqrt {x}\, {}_{3}^{}{\moversetsp {}{\mundersetsp {}{F_{2}^{}}}}\left (-\frac {1}{4},-\frac {1}{4},\frac {1}{4};\frac {1}{2},\frac {3}{4};-\frac {a^{2}}{x^{2}}\right )\) \(25\)

input
int((x+(a^2+x^2)^(1/2))^(1/2)/x,x,method=_RETURNVERBOSE)
 
output
2*2^(1/2)*x^(1/2)*hypergeom([-1/4,-1/4,1/4],[1/2,3/4],-a^2/x^2)
 
3.1.28.5 Fricas [A] (verification not implemented)

Time = 0.26 (sec) , antiderivative size = 216, normalized size of antiderivative = 2.63 \[ \int \frac {\sqrt {x+\sqrt {a^2+x^2}}}{x} \, dx=\left [-2 \, \sqrt {a} \arctan \left (\frac {\sqrt {x + \sqrt {a^{2} + x^{2}}}}{\sqrt {a}}\right ) + \sqrt {a} \log \left (\frac {a^{2} + \sqrt {a^{2} + x^{2}} a - {\left ({\left (a - x\right )} \sqrt {a} + \sqrt {a^{2} + x^{2}} \sqrt {a}\right )} \sqrt {x + \sqrt {a^{2} + x^{2}}}}{x}\right ) + 2 \, \sqrt {x + \sqrt {a^{2} + x^{2}}}, 2 \, \sqrt {-a} \arctan \left (\frac {\sqrt {-a} \sqrt {x + \sqrt {a^{2} + x^{2}}}}{a}\right ) + \sqrt {-a} \log \left (-\frac {a^{2} - \sqrt {a^{2} + x^{2}} a + {\left (\sqrt {-a} {\left (a + x\right )} - \sqrt {a^{2} + x^{2}} \sqrt {-a}\right )} \sqrt {x + \sqrt {a^{2} + x^{2}}}}{x}\right ) + 2 \, \sqrt {x + \sqrt {a^{2} + x^{2}}}\right ] \]

input
integrate((x+(a^2+x^2)^(1/2))^(1/2)/x,x, algorithm="fricas")
 
output
[-2*sqrt(a)*arctan(sqrt(x + sqrt(a^2 + x^2))/sqrt(a)) + sqrt(a)*log((a^2 + 
 sqrt(a^2 + x^2)*a - ((a - x)*sqrt(a) + sqrt(a^2 + x^2)*sqrt(a))*sqrt(x + 
sqrt(a^2 + x^2)))/x) + 2*sqrt(x + sqrt(a^2 + x^2)), 2*sqrt(-a)*arctan(sqrt 
(-a)*sqrt(x + sqrt(a^2 + x^2))/a) + sqrt(-a)*log(-(a^2 - sqrt(a^2 + x^2)*a 
 + (sqrt(-a)*(a + x) - sqrt(a^2 + x^2)*sqrt(-a))*sqrt(x + sqrt(a^2 + x^2)) 
)/x) + 2*sqrt(x + sqrt(a^2 + x^2))]
 
3.1.28.6 Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 1.76 (sec) , antiderivative size = 51, normalized size of antiderivative = 0.62 \[ \int \frac {\sqrt {x+\sqrt {a^2+x^2}}}{x} \, dx=\frac {\sqrt {x} \Gamma ^{2}\left (- \frac {1}{4}\right ) \Gamma \left (\frac {1}{4}\right ) {{}_{3}F_{2}\left (\begin {matrix} - \frac {1}{4}, - \frac {1}{4}, \frac {1}{4} \\ \frac {1}{2}, \frac {3}{4} \end {matrix}\middle | {\frac {a^{2} e^{i \pi }}{x^{2}}} \right )}}{8 \pi \Gamma \left (\frac {3}{4}\right )} \]

input
integrate((x+(a**2+x**2)**(1/2))**(1/2)/x,x)
 
output
sqrt(x)*gamma(-1/4)**2*gamma(1/4)*hyper((-1/4, -1/4, 1/4), (1/2, 3/4), a** 
2*exp_polar(I*pi)/x**2)/(8*pi*gamma(3/4))
 
3.1.28.7 Maxima [F]

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

input
integrate((x+(a^2+x^2)^(1/2))^(1/2)/x,x, algorithm="maxima")
 
output
integrate(sqrt(x + sqrt(a^2 + x^2))/x, x)
 
3.1.28.8 Giac [F]

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

input
integrate((x+(a^2+x^2)^(1/2))^(1/2)/x,x, algorithm="giac")
 
output
integrate(sqrt(x + sqrt(a^2 + x^2))/x, x)
 
3.1.28.9 Mupad [F(-1)]

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

input
int((x + (a^2 + x^2)^(1/2))^(1/2)/x,x)
 
output
int((x + (a^2 + x^2)^(1/2))^(1/2)/x, x)
 
3.1.28.10 Reduce [B] (verification not implemented)

Time = 0.01 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.43 \[ \int \frac {\sqrt {x+\sqrt {a^2+x^2}}}{x} \, dx=\sqrt {a}\, \mathit {atan} \left (\frac {\sqrt {a}\, \sqrt {\sqrt {a^{2}+x^{2}}+x}\, \sqrt {a^{2}+x^{2}}-\sqrt {a}\, \sqrt {\sqrt {a^{2}+x^{2}}+x}\, a -\sqrt {a}\, \sqrt {\sqrt {a^{2}+x^{2}}+x}\, x}{2 a^{2}}\right )+2 \sqrt {\sqrt {a^{2}+x^{2}}+x}+\sqrt {a}\, \mathrm {log}\left (\sqrt {\sqrt {a^{2}+x^{2}}+x}-\sqrt {a}\right )-\sqrt {a}\, \mathrm {log}\left (\sqrt {\sqrt {a^{2}+x^{2}}+x}+\sqrt {a}\right ) \]

input
int(sqrt(sqrt(a**2 + x**2) + x)/x,x)
 
output
sqrt(a)*atan((sqrt(a)*sqrt(sqrt(a**2 + x**2) + x)*sqrt(a**2 + x**2) - sqrt 
(a)*sqrt(sqrt(a**2 + x**2) + x)*a - sqrt(a)*sqrt(sqrt(a**2 + x**2) + x)*x) 
/(2*a**2)) + 2*sqrt(sqrt(a**2 + x**2) + x) + sqrt(a)*log(sqrt(sqrt(a**2 + 
x**2) + x) - sqrt(a)) - sqrt(a)*log(sqrt(sqrt(a**2 + x**2) + x) + sqrt(a))