3.2.98 \(\int \frac {1+x}{(1-x)^2 \sqrt {1+x^2}} \, dx\) [198]

Optimal. Leaf size=17 \[ \frac {\sqrt {1+x^2}}{1-x} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 17, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.050, Rules used = {817} \begin {gather*} \frac {\sqrt {x^2+1}}{1-x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 817

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[(-(e*f - d*g
))*(d + e*x)^(m + 1)*((a + c*x^2)^(p + 1)/(2*(p + 1)*(c*d^2 + a*e^2))), x] /; FreeQ[{a, c, d, e, f, g, m, p},
x] && NeQ[c*d^2 + a*e^2, 0] && EqQ[Simplify[m + 2*p + 3], 0] && EqQ[c*d*f + a*e*g, 0]

Rubi steps

\begin {align*} \int \frac {1+x}{(1-x)^2 \sqrt {1+x^2}} \, dx &=\frac {\sqrt {1+x^2}}{1-x}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.12, size = 17, normalized size = 1.00 \begin {gather*} \frac {\sqrt {1+x^2}}{1-x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Mathics [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {cought exception: maximum recursion depth exceeded while calling a Python object} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

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

[Out]

cought exception: maximum recursion depth exceeded while calling a Python object

________________________________________________________________________________________

Maple [A]
time = 0.04, size = 19, normalized size = 1.12

method result size
gosper \(-\frac {\sqrt {x^{2}+1}}{-1+x}\) \(15\)
trager \(-\frac {\sqrt {x^{2}+1}}{-1+x}\) \(15\)
risch \(-\frac {\sqrt {x^{2}+1}}{-1+x}\) \(15\)
default \(-\frac {\sqrt {\left (-1+x \right )^{2}+2 x}}{-1+x}\) \(19\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((1+x)/(1-x)^2/(x^2+1)^(1/2),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.35, size = 14, normalized size = 0.82 \begin {gather*} -\frac {\sqrt {x^{2} + 1}}{x - 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.30, size = 17, normalized size = 1.00 \begin {gather*} -\frac {x + \sqrt {x^{2} + 1} - 1}{x - 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 43 vs. \(2 (14) = 28\).
time = 0.00, size = 48, normalized size = 2.82 \begin {gather*} \frac {2 \left (\sqrt {x^{2}+1}-x-1\right )}{-\left (\sqrt {x^{2}+1}-x\right )^{2}-2 \left (\sqrt {x^{2}+1}-x\right )+1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.15, size = 14, normalized size = 0.82 \begin {gather*} -\frac {\sqrt {x^2+1}}{x-1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________