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

Optimal. Leaf size=10 \[ x+\log \left ((x-1)^2+1\right ) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 10, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {371, 702, 260} \[ x+\log \left ((x-1)^2+1\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

x + Log[1 + (-1 + x)^2]

Rule 260

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

Rule 371

Int[((a_) + (b_.)*(v_)^(n_))^(p_.)*(x_)^(m_.), x_Symbol] :> With[{c = Coefficient[v, x, 0], d = Coefficient[v,
 x, 1]}, Dist[1/d^(m + 1), Subst[Int[SimplifyIntegrand[(x - c)^m*(a + b*x^n)^p, x], x], x, v], x] /; NeQ[c, 0]
] /; FreeQ[{a, b, n, p}, x] && LinearQ[v, x] && IntegerQ[m]

Rule 702

Int[((d_) + (e_.)*(x_))^(m_)/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[PolynomialDivide[(d + e*x)^m, a + c*x^2,
x], x] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[m, 1] && (NeQ[d, 0] || GtQ[m, 2])

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 11, normalized size = 1.10 \[ \log \left (x^2-2 x+2\right )+x \]

Antiderivative was successfully verified.

[In]

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

[Out]

x + Log[2 - 2*x + x^2]

________________________________________________________________________________________

fricas [A]  time = 0.68, size = 11, normalized size = 1.10 \[ x + \log \left (x^{2} - 2 \, x + 2\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x + log(x^2 - 2*x + 2)

________________________________________________________________________________________

giac [A]  time = 0.35, size = 11, normalized size = 1.10 \[ x + \log \left (x^{2} - 2 \, x + 2\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x + log(x^2 - 2*x + 2)

________________________________________________________________________________________

maple [A]  time = 0.00, size = 12, normalized size = 1.20 \[ x +\ln \left (x^{2}-2 x +2\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x+ln(x^2-2*x+2)

________________________________________________________________________________________

maxima [A]  time = 0.68, size = 11, normalized size = 1.10 \[ x + \log \left (x^{2} - 2 \, x + 2\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x + log(x^2 - 2*x + 2)

________________________________________________________________________________________

mupad [B]  time = 0.03, size = 11, normalized size = 1.10 \[ x+\ln \left (x^2-2\,x+2\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x + log(x^2 - 2*x + 2)

________________________________________________________________________________________

sympy [A]  time = 0.09, size = 10, normalized size = 1.00 \[ x + \log {\left (x^{2} - 2 x + 2 \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x + log(x**2 - 2*x + 2)

________________________________________________________________________________________