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

Optimal. Leaf size=82 \[ 2 \sqrt {\sqrt {a^2+x^2}+x}-2 \sqrt {a} \tan ^{-1}\left (\frac {\sqrt {\sqrt {a^2+x^2}+x}}{\sqrt {a}}\right )-2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {\sqrt {a^2+x^2}+x}}{\sqrt {a}}\right ) \]

[Out]

-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)

________________________________________________________________________________________

Rubi [A]  time = 0.07, antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {2119, 459, 329, 212, 206, 203} \[ 2 \sqrt {\sqrt {a^2+x^2}+x}-2 \sqrt {a} \tan ^{-1}\left (\frac {\sqrt {\sqrt {a^2+x^2}+x}}{\sqrt {a}}\right )-2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {\sqrt {a^2+x^2}+x}}{\sqrt {a}}\right ) \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[x + Sqrt[a^2 + x^2]]/x,x]

[Out]

2*Sqrt[x + Sqrt[a^2 + x^2]] - 2*Sqrt[a]*ArcTan[Sqrt[x + Sqrt[a^2 + x^2]]/Sqrt[a]] - 2*Sqrt[a]*ArcTanh[Sqrt[x +
 Sqrt[a^2 + x^2]]/Sqrt[a]]

Rule 203

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

Rule 206

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

Rule 212

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

Rule 329

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> With[{k = Denominator[m]}, Dist[k/c, Subst[I
nt[x^(k*(m + 1) - 1)*(a + (b*x^(k*n))/c^n)^p, x], x, (c*x)^(1/k)], x]] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0]
 && FractionQ[m] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 459

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

Rule 2119

Int[((g_.) + (h_.)*(x_))^(m_.)*((e_.)*(x_) + (f_.)*Sqrt[(a_.) + (c_.)*(x_)^2])^(n_.), x_Symbol] :> Dist[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] && IntegerQ[m]

Rubi steps

\begin {align*} \int \frac {\sqrt {x+\sqrt {a^2+x^2}}}{x} \, dx &=\operatorname {Subst}\left (\int \frac {a^2+x^2}{\sqrt {x} \left (-a^2+x^2\right )} \, dx,x,x+\sqrt {a^2+x^2}\right )\\ &=2 \sqrt {x+\sqrt {a^2+x^2}}+\left (2 a^2\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {x} \left (-a^2+x^2\right )} \, dx,x,x+\sqrt {a^2+x^2}\right )\\ &=2 \sqrt {x+\sqrt {a^2+x^2}}+\left (4 a^2\right ) \operatorname {Subst}\left (\int \frac {1}{-a^2+x^4} \, dx,x,\sqrt {x+\sqrt {a^2+x^2}}\right )\\ &=2 \sqrt {x+\sqrt {a^2+x^2}}-(2 a) \operatorname {Subst}\left (\int \frac {1}{a-x^2} \, dx,x,\sqrt {x+\sqrt {a^2+x^2}}\right )-(2 a) \operatorname {Subst}\left (\int \frac {1}{a+x^2} \, dx,x,\sqrt {x+\sqrt {a^2+x^2}}\right )\\ &=2 \sqrt {x+\sqrt {a^2+x^2}}-2 \sqrt {a} \tan ^{-1}\left (\frac {\sqrt {x+\sqrt {a^2+x^2}}}{\sqrt {a}}\right )-2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {x+\sqrt {a^2+x^2}}}{\sqrt {a}}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 127, normalized size = 1.55 \[ -\frac {2 \sqrt {a^2+x^2} \left (\sqrt {a^2+x^2}+x\right ) \left (-\sqrt {\sqrt {a^2+x^2}+x}+\sqrt {a} \tan ^{-1}\left (\frac {\sqrt {\sqrt {a^2+x^2}+x}}{\sqrt {a}}\right )+\sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {\sqrt {a^2+x^2}+x}}{\sqrt {a}}\right )\right )}{x \left (\sqrt {a^2+x^2}+x\right )+a^2} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[x + Sqrt[a^2 + x^2]]/x,x]

[Out]

(-2*Sqrt[a^2 + x^2]*(x + Sqrt[a^2 + x^2])*(-Sqrt[x + Sqrt[a^2 + x^2]] + Sqrt[a]*ArcTan[Sqrt[x + Sqrt[a^2 + x^2
]]/Sqrt[a]] + Sqrt[a]*ArcTanh[Sqrt[x + Sqrt[a^2 + x^2]]/Sqrt[a]]))/(a^2 + x*(x + Sqrt[a^2 + x^2]))

________________________________________________________________________________________

fricas [A]  time = 0.77, size = 216, normalized size = 2.63 \[ \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 ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

[-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(sq
rt(-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))]

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate(sqrt(x + sqrt(a^2 + x^2))/x, x)

________________________________________________________________________________________

maple [C]  time = 0.01, size = 25, normalized size = 0.30 \[ 2 \sqrt {2}\, \sqrt {x}\, \hypergeom \left (\left [-\frac {1}{4}, -\frac {1}{4}, \frac {1}{4}\right ], \left [\frac {1}{2}, \frac {3}{4}\right ], -\frac {a^{2}}{x^{2}}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*2^(1/2)*x^(1/2)*hypergeom([-1/4,-1/4,1/4],[1/2,3/4],-a^2/x^2)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate(sqrt(x + sqrt(a^2 + x^2))/x, x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {\sqrt {x+\sqrt {a^2+x^2}}}{x} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [C]  time = 1.32, size = 51, normalized size = 0.62 \[ \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 )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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))

________________________________________________________________________________________