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

Optimal. Leaf size=67 \[ \frac {2 \left (10 x^4+55 x^2+23\right )}{15 \left (\sqrt {x^2+1}+x\right )^{5/2}}+\frac {4 \sqrt {x^2+1} \left (x^3+5 x\right )}{3 \left (\sqrt {x^2+1}+x\right )^{5/2}} \]

________________________________________________________________________________________

Rubi [A]  time = 0.80, antiderivative size = 56, normalized size of antiderivative = 0.84, number of steps used = 7, number of rules used = 5, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {6742, 2122, 30, 2120, 270} \begin {gather*} \frac {1}{6} \left (\sqrt {x^2+1}+x\right )^{3/2}+\frac {3}{\sqrt {\sqrt {x^2+1}+x}}-\frac {1}{10 \left (\sqrt {x^2+1}+x\right )^{5/2}} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-1/10*1/(x + Sqrt[1 + x^2])^(5/2) + 3/Sqrt[x + Sqrt[1 + x^2]] + (x + Sqrt[1 + x^2])^(3/2)/6

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 270

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 2120

Int[(x_)^(p_.)*((g_) + (i_.)*(x_)^2)^(m_.)*((e_.)*(x_) + (f_.)*Sqrt[(a_) + (c_.)*(x_)^2])^(n_.), x_Symbol] :>
Dist[(1*(i/c)^m)/(2^(2*m + p + 1)*e^(p + 1)*f^(2*m)), Subst[Int[x^(n - 2*m - p - 2)*(-(a*f^2) + x^2)^p*(a*f^2
+ x^2)^(2*m + 1), x], x, e*x + f*Sqrt[a + c*x^2]], x] /; FreeQ[{a, c, e, f, g, i, n}, x] && EqQ[e^2 - c*f^2, 0
] && EqQ[c*g - a*i, 0] && IntegersQ[p, 2*m] && (IntegerQ[m] || GtQ[i/c, 0])

Rule 2122

Int[((g_) + (i_.)*(x_)^2)^(m_.)*((d_.) + (e_.)*(x_) + (f_.)*Sqrt[(a_) + (c_.)*(x_)^2])^(n_.), x_Symbol] :> Dis
t[(1*(i/c)^m)/(2^(2*m + 1)*e*f^(2*m)), Subst[Int[(x^n*(d^2 + a*f^2 - 2*d*x + x^2)^(2*m + 1))/(-d + x)^(2*(m +
1)), x], x, d + e*x + f*Sqrt[a + c*x^2]], x] /; FreeQ[{a, c, d, e, f, g, i, n}, x] && EqQ[e^2 - c*f^2, 0] && E
qQ[c*g - a*i, 0] && IntegerQ[2*m] && (IntegerQ[m] || GtQ[i/c, 0])

Rule 6742

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [B]  time = 1.32, size = 350, normalized size = 5.22 \begin {gather*} \frac {2 \left (x^2+1\right ) \left (81920 x^{18}+757760 x^{16}+2336768 x^{14}+3539200 x^{12}+2978432 x^{10}+1435488 x^8+384048 x^6+51357 x^4+2660 x^2+349 \sqrt {x^2+1} x+81920 \sqrt {x^2+1} x^{17}+716800 \sqrt {x^2+1} x^{15}+1988608 \sqrt {x^2+1} x^{13}+2629376 \sqrt {x^2+1} x^{11}+1870720 \sqrt {x^2+1} x^9+730272 \sqrt {x^2+1} x^7+148176 \sqrt {x^2+1} x^5+13347 \sqrt {x^2+1} x^3+23\right )}{15 \left (\sqrt {x^2+1}+x\right )^{5/2} \left (x^2+\sqrt {x^2+1} x+1\right ) \left (16 x^6+28 x^4+13 x^2+5 \sqrt {x^2+1} x+16 \sqrt {x^2+1} x^5+20 \sqrt {x^2+1} x^3+1\right ) \left (64 x^8+144 x^6+104 x^4+25 x^2+7 \sqrt {x^2+1} x+64 \sqrt {x^2+1} x^7+112 \sqrt {x^2+1} x^5+56 \sqrt {x^2+1} x^3+1\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(2*(1 + x^2)*(23 + 2660*x^2 + 51357*x^4 + 384048*x^6 + 1435488*x^8 + 2978432*x^10 + 3539200*x^12 + 2336768*x^1
4 + 757760*x^16 + 81920*x^18 + 349*x*Sqrt[1 + x^2] + 13347*x^3*Sqrt[1 + x^2] + 148176*x^5*Sqrt[1 + x^2] + 7302
72*x^7*Sqrt[1 + x^2] + 1870720*x^9*Sqrt[1 + x^2] + 2629376*x^11*Sqrt[1 + x^2] + 1988608*x^13*Sqrt[1 + x^2] + 7
16800*x^15*Sqrt[1 + x^2] + 81920*x^17*Sqrt[1 + x^2]))/(15*(x + Sqrt[1 + x^2])^(5/2)*(1 + x^2 + x*Sqrt[1 + x^2]
)*(1 + 13*x^2 + 28*x^4 + 16*x^6 + 5*x*Sqrt[1 + x^2] + 20*x^3*Sqrt[1 + x^2] + 16*x^5*Sqrt[1 + x^2])*(1 + 25*x^2
 + 104*x^4 + 144*x^6 + 64*x^8 + 7*x*Sqrt[1 + x^2] + 56*x^3*Sqrt[1 + x^2] + 112*x^5*Sqrt[1 + x^2] + 64*x^7*Sqrt
[1 + x^2]))

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.08, size = 67, normalized size = 1.00 \begin {gather*} \frac {4 \sqrt {1+x^2} \left (5 x+x^3\right )}{3 \left (x+\sqrt {1+x^2}\right )^{5/2}}+\frac {2 \left (23+55 x^2+10 x^4\right )}{15 \left (x+\sqrt {1+x^2}\right )^{5/2}} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(4*Sqrt[1 + x^2]*(5*x + x^3))/(3*(x + Sqrt[1 + x^2])^(5/2)) + (2*(23 + 55*x^2 + 10*x^4))/(15*(x + Sqrt[1 + x^2
])^(5/2))

________________________________________________________________________________________

fricas [A]  time = 0.44, size = 38, normalized size = 0.57 \begin {gather*} \frac {2}{15} \, {\left (3 \, x^{3} - {\left (3 \, x^{2} - 23\right )} \sqrt {x^{2} + 1} - 19 \, x\right )} \sqrt {x + \sqrt {x^{2} + 1}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2/15*(3*x^3 - (3*x^2 - 23)*sqrt(x^2 + 1) - 19*x)*sqrt(x + sqrt(x^2 + 1))

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x^{2} - 1}{\sqrt {x^{2} + 1} \sqrt {x + \sqrt {x^{2} + 1}}}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x^{2} - 1}{\sqrt {x^{2} + 1} \sqrt {x + \sqrt {x^{2} + 1}}}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.58, size = 63, normalized size = 0.94 \begin {gather*} \frac {2 x^{2}}{15 \sqrt {x + \sqrt {x^{2} + 1}}} + \frac {8 x \sqrt {x^{2} + 1}}{15 \sqrt {x + \sqrt {x^{2} + 1}}} + \frac {46}{15 \sqrt {x + \sqrt {x^{2} + 1}}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*x**2/(15*sqrt(x + sqrt(x**2 + 1))) + 8*x*sqrt(x**2 + 1)/(15*sqrt(x + sqrt(x**2 + 1))) + 46/(15*sqrt(x + sqrt
(x**2 + 1)))

________________________________________________________________________________________