3.425 \(\int \frac{(\sqrt{1-x}+\sqrt{1+x})^2}{x^3} \, dx\)

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

[Out]

-x^(-2) - Sqrt[1 - x^2]/x^2 + ArcTanh[Sqrt[1 - x^2]]

________________________________________________________________________________________

Rubi [A]  time = 0.0911825, antiderivative size = 34, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.217, Rules used = {6742, 266, 47, 63, 206} \[ -\frac{\sqrt{1-x^2}}{x^2}-\frac{1}{x^2}+\tanh ^{-1}\left (\sqrt{1-x^2}\right ) \]

Antiderivative was successfully verified.

[In]

Int[(Sqrt[1 - x] + Sqrt[1 + x])^2/x^3,x]

[Out]

-x^(-2) - Sqrt[1 - x^2]/x^2 + ArcTanh[Sqrt[1 - x^2]]

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rule 266

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 47

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^n)/(b*
(m + 1)), x] - Dist[(d*n)/(b*(m + 1)), Int[(a + b*x)^(m + 1)*(c + d*x)^(n - 1), x], x] /; FreeQ[{a, b, c, d},
x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && LtQ[m, -1] &&  !(IntegerQ[n] &&  !IntegerQ[m]) &&  !(ILeQ[m + n + 2, 0
] && (FractionQ[m] || GeQ[2*n + m + 1, 0])) && IntLinearQ[a, b, c, d, m, n, x]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

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

Rubi steps

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

Mathematica [A]  time = 0.0407227, size = 45, normalized size = 1.32 \[ -\frac{1}{x^2 \sqrt{1-x^2}}+\frac{1}{\sqrt{1-x^2}}-\frac{1}{x^2}+\tanh ^{-1}\left (\sqrt{1-x^2}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(Sqrt[1 - x] + Sqrt[1 + x])^2/x^3,x]

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.012, size = 58, normalized size = 1.7 \begin{align*} -{x}^{-2}+{\frac{1}{{x}^{2}}\sqrt{1-x}\sqrt{1+x} \left ({\it Artanh} \left ({\frac{1}{\sqrt{-{x}^{2}+1}}} \right ){x}^{2}-\sqrt{-{x}^{2}+1} \right ){\frac{1}{\sqrt{-{x}^{2}+1}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((1-x)^(1/2)+(1+x)^(1/2))^2/x^3,x)

[Out]

-1/x^2+(1+x)^(1/2)*(1-x)^(1/2)*(arctanh(1/(-x^2+1)^(1/2))*x^2-(-x^2+1)^(1/2))/x^2/(-x^2+1)^(1/2)

________________________________________________________________________________________

Maxima [A]  time = 1.49132, size = 73, normalized size = 2.15 \begin{align*} -\sqrt{-x^{2} + 1} - \frac{{\left (-x^{2} + 1\right )}^{\frac{3}{2}}}{x^{2}} - \frac{1}{x^{2}} + \log \left (\frac{2 \, \sqrt{-x^{2} + 1}}{{\left | x \right |}} + \frac{2}{{\left | x \right |}}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-sqrt(-x^2 + 1) - (-x^2 + 1)^(3/2)/x^2 - 1/x^2 + log(2*sqrt(-x^2 + 1)/abs(x) + 2/abs(x))

________________________________________________________________________________________

Fricas [A]  time = 1.27848, size = 109, normalized size = 3.21 \begin{align*} -\frac{x^{2} \log \left (\frac{\sqrt{x + 1} \sqrt{-x + 1} - 1}{x}\right ) + \sqrt{x + 1} \sqrt{-x + 1} + 1}{x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(x^2*log((sqrt(x + 1)*sqrt(-x + 1) - 1)/x) + sqrt(x + 1)*sqrt(-x + 1) + 1)/x^2

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (\sqrt{1 - x} + \sqrt{x + 1}\right )^{2}}{x^{3}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((1-x)**(1/2)+(1+x)**(1/2))**2/x**3,x)

[Out]

Integral((sqrt(1 - x) + sqrt(x + 1))**2/x**3, x)

________________________________________________________________________________________

Giac [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: NotImplementedError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: NotImplementedError