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]

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

________________________________________________________________________________________

Rubi [A]  time = 0.09, antiderivative size = 34, normalized size of antiderivative = 1.00, 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 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])

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 6742

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

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.04, 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]]

________________________________________________________________________________________

fricas [A]  time = 0.44, size = 44, normalized size = 1.29 \[ -\frac {x^{2} \log \left (\frac {\sqrt {x + 1} \sqrt {-x + 1} - 1}{x}\right ) + \sqrt {x + 1} \sqrt {-x + 1} + 1}{x^{2}} \]

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

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]

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 >> Unable to parse Giac output: Warning, choosing root of [1,0,-4,0,%%%{
4,[2]%%%}] at parameters values [-93.616423693]Warning, choosing root of [1,0,-4,0,%%%{4,[2]%%%}] at parameter
s values [-17.8804557086]-(4*(2*sqrt(x+1)/(-2*sqrt(-x+1)+2*sqrt(2))-1/2*(-2*sqrt(-x+1)+2*sqrt(2))/sqrt(x+1))^3
+16*(2*sqrt(x+1)/(-2*sqrt(-x+1)+2*sqrt(2))-1/2*(-2*sqrt(-x+1)+2*sqrt(2))/sqrt(x+1)))/((2*sqrt(x+1)/(-2*sqrt(-x
+1)+2*sqrt(2))-1/2*(-2*sqrt(-x+1)+2*sqrt(2))/sqrt(x+1))^2-4)^2+ln(abs(2*sqrt(x+1)/(-2*sqrt(-x+1)+2*sqrt(2))+2-
1/2*(-2*sqrt(-x+1)+2*sqrt(2))/sqrt(x+1)))-ln(abs(2*sqrt(x+1)/(-2*sqrt(-x+1)+2*sqrt(2))-2-1/2*(-2*sqrt(-x+1)+2*
sqrt(2))/sqrt(x+1)))-1/x^2

________________________________________________________________________________________

maple [A]  time = 0.02, size = 58, normalized size = 1.71 \[ -\frac {1}{x^{2}}+\frac {\sqrt {x +1}\, \sqrt {-x +1}\, \left (x^{2} \arctanh \left (\frac {1}{\sqrt {-x^{2}+1}}\right )-\sqrt {-x^{2}+1}\right )}{\sqrt {-x^{2}+1}\, x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/x^2+(x+1)^(1/2)*(-x+1)^(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.52, size = 54, normalized size = 1.59 \[ -\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 ) \]

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

________________________________________________________________________________________

mupad [B]  time = 4.88, size = 189, normalized size = 5.56 \[ \ln \left (\frac {\sqrt {1-x}-1}{\sqrt {x+1}-1}\right )-\ln \left (\frac {{\left (\sqrt {1-x}-1\right )}^2}{{\left (\sqrt {x+1}-1\right )}^2}-1\right )+\frac {{\left (\sqrt {1-x}-1\right )}^2}{16\,{\left (\sqrt {x+1}-1\right )}^2}-\frac {\frac {{\left (\sqrt {1-x}-1\right )}^2}{8\,{\left (\sqrt {x+1}-1\right )}^2}+\frac {15\,{\left (\sqrt {1-x}-1\right )}^4}{16\,{\left (\sqrt {x+1}-1\right )}^4}-\frac {1}{16}}{\frac {{\left (\sqrt {1-x}-1\right )}^2}{{\left (\sqrt {x+1}-1\right )}^2}-\frac {2\,{\left (\sqrt {1-x}-1\right )}^4}{{\left (\sqrt {x+1}-1\right )}^4}+\frac {{\left (\sqrt {1-x}-1\right )}^6}{{\left (\sqrt {x+1}-1\right )}^6}}-\frac {1}{x^2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(((1 - x)^(1/2) - 1)/((x + 1)^(1/2) - 1)) - log(((1 - x)^(1/2) - 1)^2/((x + 1)^(1/2) - 1)^2 - 1) + ((1 - x)
^(1/2) - 1)^2/(16*((x + 1)^(1/2) - 1)^2) - (((1 - x)^(1/2) - 1)^2/(8*((x + 1)^(1/2) - 1)^2) + (15*((1 - x)^(1/
2) - 1)^4)/(16*((x + 1)^(1/2) - 1)^4) - 1/16)/(((1 - x)^(1/2) - 1)^2/((x + 1)^(1/2) - 1)^2 - (2*((1 - x)^(1/2)
 - 1)^4)/((x + 1)^(1/2) - 1)^4 + ((1 - x)^(1/2) - 1)^6/((x + 1)^(1/2) - 1)^6) - 1/x^2

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (\sqrt {1 - x} + \sqrt {x + 1}\right )^{2}}{x^{3}}\, dx \]

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)

________________________________________________________________________________________