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

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 20, antiderivative size = 17 \[ \int \frac {1+x}{(1-x)^2 \sqrt {1+x^2}} \, dx=\frac {\sqrt {1+x^2}}{1-x} \]

[Out]

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

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.050, Rules used = {817} \[ \int \frac {1+x}{(1-x)^2 \sqrt {1+x^2}} \, dx=\frac {\sqrt {x^2+1}}{1-x} \]

[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*} \text {integral}& = \frac {\sqrt {1+x^2}}{1-x} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.12 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.00 \[ \int \frac {1+x}{(1-x)^2 \sqrt {1+x^2}} \, dx=\frac {\sqrt {1+x^2}}{1-x} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.12 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.88

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

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.00 \[ \int \frac {1+x}{(1-x)^2 \sqrt {1+x^2}} \, dx=-\frac {x + \sqrt {x^{2} + 1} - 1}{x - 1} \]

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

\[ \int \frac {1+x}{(1-x)^2 \sqrt {1+x^2}} \, dx=\int \frac {x + 1}{\left (x - 1\right )^{2} \sqrt {x^{2} + 1}}\, dx \]

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

Maxima [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.82 \[ \int \frac {1+x}{(1-x)^2 \sqrt {1+x^2}} \, dx=-\frac {\sqrt {x^{2} + 1}}{x - 1} \]

[In]

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

[Out]

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 35 vs. \(2 (14) = 28\).

Time = 0.29 (sec) , antiderivative size = 35, normalized size of antiderivative = 2.06 \[ \int \frac {1+x}{(1-x)^2 \sqrt {1+x^2}} \, dx=-\frac {\sqrt {\frac {2}{x - 1} + \frac {2}{{\left (x - 1\right )}^{2}} + 1}}{\mathrm {sgn}\left (\frac {1}{x - 1}\right )} + \mathrm {sgn}\left (\frac {1}{x - 1}\right ) \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.82 \[ \int \frac {1+x}{(1-x)^2 \sqrt {1+x^2}} \, dx=-\frac {\sqrt {x^2+1}}{x-1} \]

[In]

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

[Out]

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