3.12 \(\int \frac {x}{x+\sqrt {1-\sqrt {1+x}}} \, dx\)

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

[Out]

8/5*arctanh(1/5*(1+2*(1-(1+x)^(1/2))^(1/2))*5^(1/2))*5^(1/2)+(1-(1+x)^(1/2))^2+2*(1+x)^(1/2)-4*(1-(1+x)^(1/2))
^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.27, antiderivative size = 73, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {1628, 618, 206} \[ \left (1-\sqrt {x+1}\right )^2-4 \sqrt {1-\sqrt {x+1}}+2 \sqrt {x+1}+\frac {8 \tanh ^{-1}\left (\frac {2 \sqrt {1-\sqrt {x+1}}+1}{\sqrt {5}}\right )}{\sqrt {5}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

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 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 1628

Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegra
nd[(d + e*x)^m*Pq*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.08, size = 52, normalized size = 0.71 \[ x-4 \sqrt {1-\sqrt {x+1}}+\frac {8 \tanh ^{-1}\left (\frac {2 \sqrt {1-\sqrt {x+1}}+1}{\sqrt {5}}\right )}{\sqrt {5}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

x - 4*Sqrt[1 - Sqrt[1 + x]] + (8*ArcTanh[(1 + 2*Sqrt[1 - Sqrt[1 + x]])/Sqrt[5]])/Sqrt[5]

________________________________________________________________________________________

fricas [A]  time = 0.41, size = 110, normalized size = 1.51 \[ \frac {4}{5} \, \sqrt {5} \log \left (\frac {2 \, x^{2} - \sqrt {5} {\left (3 \, x + 1\right )} + {\left (\sqrt {5} {\left (x + 2\right )} - 5 \, x\right )} \sqrt {x + 1} + {\left (\sqrt {5} {\left (x + 2\right )} - {\left (\sqrt {5} {\left (2 \, x - 1\right )} - 5\right )} \sqrt {x + 1} - 5 \, x\right )} \sqrt {-\sqrt {x + 1} + 1} + 3 \, x + 3}{x^{2} - x - 1}\right ) + x - 4 \, \sqrt {-\sqrt {x + 1} + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.71, size = 79, normalized size = 1.08 \[ {\left (\sqrt {x + 1} - 1\right )}^{2} - \frac {4}{5} \, \sqrt {5} \log \left (\frac {{\left | -\sqrt {5} + 2 \, \sqrt {-\sqrt {x + 1} + 1} + 1 \right |}}{\sqrt {5} + 2 \, \sqrt {-\sqrt {x + 1} + 1} + 1}\right ) + 2 \, \sqrt {x + 1} - 4 \, \sqrt {-\sqrt {x + 1} + 1} - 2 \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.01, size = 60, normalized size = 0.82 \[ \frac {8 \sqrt {5}\, \arctanh \left (\frac {\left (1+2 \sqrt {1-\sqrt {x +1}}\right ) \sqrt {5}}{5}\right )}{5}+\left (1-\sqrt {x +1}\right )^{2}-2+2 \sqrt {x +1}-4 \sqrt {1-\sqrt {x +1}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(1-(x+1)^(1/2))^2-2+2*(x+1)^(1/2)-4*(1-(x+1)^(1/2))^(1/2)+8/5*arctanh(1/5*(1+2*(1-(x+1)^(1/2))^(1/2))*5^(1/2))
*5^(1/2)

________________________________________________________________________________________

maxima [A]  time = 1.47, size = 77, normalized size = 1.05 \[ {\left (\sqrt {x + 1} - 1\right )}^{2} - \frac {4}{5} \, \sqrt {5} \log \left (-\frac {\sqrt {5} - 2 \, \sqrt {-\sqrt {x + 1} + 1} - 1}{\sqrt {5} + 2 \, \sqrt {-\sqrt {x + 1} + 1} + 1}\right ) + 2 \, \sqrt {x + 1} - 4 \, \sqrt {-\sqrt {x + 1} + 1} - 2 \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {x}{x + \sqrt {1 - \sqrt {x + 1}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral(x/(x + sqrt(1 - sqrt(x + 1))), x)

________________________________________________________________________________________