3.1.54 \(\int \frac {1}{1+2 x+x^2} \, dx\) [54]

Optimal. Leaf size=7 \[ -\frac {1}{1+x} \]

[Out]

-1/(1+x)

________________________________________________________________________________________

Rubi [A]
time = 0.00, antiderivative size = 7, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {27, 32} \begin {gather*} -\frac {1}{x+1} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-(1 + x)^(-1)

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 32

Int[((a_.) + (b_.)*(x_))^(m_), x_Symbol] :> Simp[(a + b*x)^(m + 1)/(b*(m + 1)), x] /; FreeQ[{a, b, m}, x] && N
eQ[m, -1]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.00, size = 7, normalized size = 1.00 \begin {gather*} -\frac {1}{1+x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-(1 + x)^(-1)

________________________________________________________________________________________

Maple [A]
time = 0.04, size = 8, normalized size = 1.14

method result size
gosper \(-\frac {1}{1+x}\) \(8\)
default \(-\frac {1}{1+x}\) \(8\)
norman \(-\frac {1}{1+x}\) \(8\)
meijerg \(\frac {x}{1+x}\) \(8\)
risch \(-\frac {1}{1+x}\) \(8\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/(1+x)

________________________________________________________________________________________

Maxima [A]
time = 4.78, size = 7, normalized size = 1.00 \begin {gather*} -\frac {1}{x + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/(x + 1)

________________________________________________________________________________________

Fricas [A]
time = 0.42, size = 7, normalized size = 1.00 \begin {gather*} -\frac {1}{x + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/(x + 1)

________________________________________________________________________________________

Sympy [A]
time = 0.02, size = 5, normalized size = 0.71 \begin {gather*} - \frac {1}{x + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/(x + 1)

________________________________________________________________________________________

Giac [A]
time = 0.47, size = 7, normalized size = 1.00 \begin {gather*} -\frac {1}{x + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/(x + 1)

________________________________________________________________________________________

Mupad [B]
time = 0.02, size = 7, normalized size = 1.00 \begin {gather*} -\frac {1}{x+1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/(x + 1)

________________________________________________________________________________________