3.65.7 \(\int \frac {-3+x+3 x^2-x^3-x^4+x^6+(-4+2 x-3 x^2-4 x^4+3 x^6) \log (x)+(-3 x^2+x^4) \log ^2(x)}{1-2 x^2+x^4} \, dx\)

Optimal. Leaf size=29 \[ -3+x+x \log (x) \left (x^2-\frac {-4+x-\log (x)}{-1+x^2}+\log (x)\right ) \]

________________________________________________________________________________________

Rubi [B]  time = 0.45, antiderivative size = 143, normalized size of antiderivative = 4.93, number of steps used = 38, number of rules used = 20, integrand size = 71, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.282, Rules used = {28, 6742, 199, 207, 261, 288, 266, 43, 321, 302, 2357, 2295, 2317, 2391, 2314, 31, 2315, 2304, 2296, 2318} \begin {gather*} \frac {x^3}{2}+x^3 \log (x)-\frac {1}{2} \log \left (1-x^2\right )+\frac {x^5}{2 \left (1-x^2\right )}-\frac {x^3}{2 \left (1-x^2\right )}+x-\frac {x \log ^2(x)}{2 (1-x)}-\frac {x \log ^2(x)}{2 (x+1)}+x \log ^2(x)-\frac {3 x \log (x)}{2 (1-x)}-\frac {5 x \log (x)}{2 (x+1)}-\frac {3}{2} \log (1-x)+\frac {5}{2} \log (x+1)-4 \tanh ^{-1}(x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-3 + x + 3*x^2 - x^3 - x^4 + x^6 + (-4 + 2*x - 3*x^2 - 4*x^4 + 3*x^6)*Log[x] + (-3*x^2 + x^4)*Log[x]^2)/(
1 - 2*x^2 + x^4),x]

[Out]

x + x^3/2 - x^3/(2*(1 - x^2)) + x^5/(2*(1 - x^2)) - 4*ArcTanh[x] - (3*Log[1 - x])/2 - (3*x*Log[x])/(2*(1 - x))
 + x^3*Log[x] - (5*x*Log[x])/(2*(1 + x)) + x*Log[x]^2 - (x*Log[x]^2)/(2*(1 - x)) - (x*Log[x]^2)/(2*(1 + x)) +
(5*Log[1 + x])/2 - Log[1 - x^2]/2

Rule 28

Int[(u_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Dist[1/c^p, Int[u*(b/2 + c*x^n)^(2*
p), x], x] /; FreeQ[{a, b, c, n}, x] && EqQ[n2, 2*n] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 31

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

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 199

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> -Simp[(x*(a + b*x^n)^(p + 1))/(a*n*(p + 1)), x] + Dist[(n*(p +
 1) + 1)/(a*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x] /; FreeQ[{a, b}, x] && IGtQ[n, 0] && LtQ[p, -1] && (In
tegerQ[2*p] || (n == 2 && IntegerQ[4*p]) || (n == 2 && IntegerQ[3*p]) || Denominator[p + 1/n] < Denominator[p]
)

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 261

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

Rule 266

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 288

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^
n)^(p + 1))/(b*n*(p + 1)), x] - Dist[(c^n*(m - n + 1))/(b*n*(p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^(p + 1), x
], x] /; FreeQ[{a, b, c}, x] && IGtQ[n, 0] && LtQ[p, -1] && GtQ[m + 1, n] &&  !ILtQ[(m + n*(p + 1) + 1)/n, 0]
&& IntBinomialQ[a, b, c, n, m, p, x]

Rule 302

Int[(x_)^(m_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Int[PolynomialDivide[x^m, a + b*x^n, x], x] /; FreeQ[{a,
b}, x] && IGtQ[m, 0] && IGtQ[n, 0] && GtQ[m, 2*n - 1]

Rule 321

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

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2296

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

Rule 2304

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

Rule 2314

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_) + (e_.)*(x_)^(r_.))^(q_), x_Symbol] :> Simp[(x*(d + e*x^r)^(q
+ 1)*(a + b*Log[c*x^n]))/d, x] - Dist[(b*n)/d, Int[(d + e*x^r)^(q + 1), x], x] /; FreeQ[{a, b, c, d, e, n, q,
r}, x] && EqQ[r*(q + 1) + 1, 0]

Rule 2315

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[PolyLog[2, 1 - c*x]/e, x] /; FreeQ[{c, d, e}, x] &
& EqQ[e + c*d, 0]

Rule 2317

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(Log[1 + (e*x)/d]*(a +
b*Log[c*x^n])^p)/e, x] - Dist[(b*n*p)/e, Int[(Log[1 + (e*x)/d]*(a + b*Log[c*x^n])^(p - 1))/x, x], x] /; FreeQ[
{a, b, c, d, e, n}, x] && IGtQ[p, 0]

Rule 2318

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_))^2, x_Symbol] :> Simp[(x*(a + b*Log[c*x^n])
^p)/(d*(d + e*x)), x] - Dist[(b*n*p)/d, Int[(a + b*Log[c*x^n])^(p - 1)/(d + e*x), x], x] /; FreeQ[{a, b, c, d,
 e, n, p}, x] && GtQ[p, 0]

Rule 2357

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*Log[c*x^
n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, n}, x] && RationalFunctionQ[RFx, x] && IGtQ[p, 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 6742

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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-3+x+3 x^2-x^3-x^4+x^6+\left (-4+2 x-3 x^2-4 x^4+3 x^6\right ) \log (x)+\left (-3 x^2+x^4\right ) \log ^2(x)}{\left (-1+x^2\right )^2} \, dx\\ &=\int \left (-\frac {3}{\left (-1+x^2\right )^2}+\frac {x}{\left (-1+x^2\right )^2}+\frac {3 x^2}{\left (-1+x^2\right )^2}-\frac {x^3}{\left (-1+x^2\right )^2}-\frac {x^4}{\left (-1+x^2\right )^2}+\frac {x^6}{\left (-1+x^2\right )^2}+\frac {\left (-4+2 x-3 x^2-4 x^4+3 x^6\right ) \log (x)}{\left (-1+x^2\right )^2}+\frac {x^2 \left (-3+x^2\right ) \log ^2(x)}{\left (-1+x^2\right )^2}\right ) \, dx\\ &=-\left (3 \int \frac {1}{\left (-1+x^2\right )^2} \, dx\right )+3 \int \frac {x^2}{\left (-1+x^2\right )^2} \, dx+\int \frac {x}{\left (-1+x^2\right )^2} \, dx-\int \frac {x^3}{\left (-1+x^2\right )^2} \, dx-\int \frac {x^4}{\left (-1+x^2\right )^2} \, dx+\int \frac {x^6}{\left (-1+x^2\right )^2} \, dx+\int \frac {\left (-4+2 x-3 x^2-4 x^4+3 x^6\right ) \log (x)}{\left (-1+x^2\right )^2} \, dx+\int \frac {x^2 \left (-3+x^2\right ) \log ^2(x)}{\left (-1+x^2\right )^2} \, dx\\ &=\frac {1}{2 \left (1-x^2\right )}-\frac {x^3}{2 \left (1-x^2\right )}+\frac {x^5}{2 \left (1-x^2\right )}-\frac {1}{2} \operatorname {Subst}\left (\int \frac {x}{(-1+x)^2} \, dx,x,x^2\right )+2 \left (\frac {3}{2} \int \frac {1}{-1+x^2} \, dx\right )-\frac {3}{2} \int \frac {x^2}{-1+x^2} \, dx+\frac {5}{2} \int \frac {x^4}{-1+x^2} \, dx+\int \left (2 \log (x)+\frac {\log (x)}{-1-x}-\frac {3 \log (x)}{2 (-1+x)^2}+\frac {\log (x)}{-1+x}+3 x^2 \log (x)-\frac {5 \log (x)}{2 (1+x)^2}\right ) \, dx+\int \left (\log ^2(x)-\frac {\log ^2(x)}{2 (-1+x)^2}-\frac {\log ^2(x)}{2 (1+x)^2}\right ) \, dx\\ &=-\frac {3 x}{2}+\frac {1}{2 \left (1-x^2\right )}-\frac {x^3}{2 \left (1-x^2\right )}+\frac {x^5}{2 \left (1-x^2\right )}-3 \tanh ^{-1}(x)-\frac {1}{2} \int \frac {\log ^2(x)}{(-1+x)^2} \, dx-\frac {1}{2} \int \frac {\log ^2(x)}{(1+x)^2} \, dx-\frac {1}{2} \operatorname {Subst}\left (\int \left (\frac {1}{(-1+x)^2}+\frac {1}{-1+x}\right ) \, dx,x,x^2\right )-\frac {3}{2} \int \frac {1}{-1+x^2} \, dx-\frac {3}{2} \int \frac {\log (x)}{(-1+x)^2} \, dx+2 \int \log (x) \, dx+\frac {5}{2} \int \left (1+x^2+\frac {1}{-1+x^2}\right ) \, dx-\frac {5}{2} \int \frac {\log (x)}{(1+x)^2} \, dx+3 \int x^2 \log (x) \, dx+\int \frac {\log (x)}{-1-x} \, dx+\int \frac {\log (x)}{-1+x} \, dx+\int \log ^2(x) \, dx\\ &=-x+\frac {x^3}{2}-\frac {x^3}{2 \left (1-x^2\right )}+\frac {x^5}{2 \left (1-x^2\right )}-\frac {3}{2} \tanh ^{-1}(x)+2 x \log (x)-\frac {3 x \log (x)}{2 (1-x)}+x^3 \log (x)-\frac {5 x \log (x)}{2 (1+x)}+x \log ^2(x)-\frac {x \log ^2(x)}{2 (1-x)}-\frac {x \log ^2(x)}{2 (1+x)}-\log (x) \log (1+x)-\frac {1}{2} \log \left (1-x^2\right )-\text {Li}_2(1-x)-\frac {3}{2} \int \frac {1}{-1+x} \, dx-2 \int \log (x) \, dx+\frac {5}{2} \int \frac {1}{1+x} \, dx+\frac {5}{2} \int \frac {1}{-1+x^2} \, dx-\int \frac {\log (x)}{-1+x} \, dx+\int \frac {\log (x)}{1+x} \, dx+\int \frac {\log (1+x)}{x} \, dx\\ &=x+\frac {x^3}{2}-\frac {x^3}{2 \left (1-x^2\right )}+\frac {x^5}{2 \left (1-x^2\right )}-4 \tanh ^{-1}(x)-\frac {3}{2} \log (1-x)-\frac {3 x \log (x)}{2 (1-x)}+x^3 \log (x)-\frac {5 x \log (x)}{2 (1+x)}+x \log ^2(x)-\frac {x \log ^2(x)}{2 (1-x)}-\frac {x \log ^2(x)}{2 (1+x)}+\frac {5}{2} \log (1+x)-\frac {1}{2} \log \left (1-x^2\right )-\text {Li}_2(-x)-\int \frac {\log (1+x)}{x} \, dx\\ &=x+\frac {x^3}{2}-\frac {x^3}{2 \left (1-x^2\right )}+\frac {x^5}{2 \left (1-x^2\right )}-4 \tanh ^{-1}(x)-\frac {3}{2} \log (1-x)-\frac {3 x \log (x)}{2 (1-x)}+x^3 \log (x)-\frac {5 x \log (x)}{2 (1+x)}+x \log ^2(x)-\frac {x \log ^2(x)}{2 (1-x)}-\frac {x \log ^2(x)}{2 (1+x)}+\frac {5}{2} \log (1+x)-\frac {1}{2} \log \left (1-x^2\right )\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [C]  time = 0.16, size = 66, normalized size = 2.28 \begin {gather*} \frac {x \left (-1+x^2\right )+\left (x \left (4-x-x^2+x^4\right )+\left (-1+x^2\right ) \log (1-x)\right ) \log (x)+x^3 \log ^2(x)}{-1+x^2}+\text {Li}_2(1-x)+\text {Li}_2(x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-3 + x + 3*x^2 - x^3 - x^4 + x^6 + (-4 + 2*x - 3*x^2 - 4*x^4 + 3*x^6)*Log[x] + (-3*x^2 + x^4)*Log[x
]^2)/(1 - 2*x^2 + x^4),x]

[Out]

(x*(-1 + x^2) + (x*(4 - x - x^2 + x^4) + (-1 + x^2)*Log[1 - x])*Log[x] + x^3*Log[x]^2)/(-1 + x^2) + PolyLog[2,
 1 - x] + PolyLog[2, x]

________________________________________________________________________________________

fricas [A]  time = 0.66, size = 43, normalized size = 1.48 \begin {gather*} \frac {x^{3} \log \relax (x)^{2} + x^{3} + {\left (x^{5} - x^{3} - x^{2} + 4 \, x\right )} \log \relax (x) - x}{x^{2} - 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^4-3*x^2)*log(x)^2+(3*x^6-4*x^4-3*x^2+2*x-4)*log(x)+x^6-x^4-x^3+3*x^2+x-3)/(x^4-2*x^2+1),x, algor
ithm="fricas")

[Out]

(x^3*log(x)^2 + x^3 + (x^5 - x^3 - x^2 + 4*x)*log(x) - x)/(x^2 - 1)

________________________________________________________________________________________

giac [A]  time = 0.26, size = 42, normalized size = 1.45 \begin {gather*} {\left (x + \frac {x}{x^{2} - 1}\right )} \log \relax (x)^{2} + {\left (x^{3} + \frac {4 \, x - 1}{x^{2} - 1}\right )} \log \relax (x) + x - \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^4-3*x^2)*log(x)^2+(3*x^6-4*x^4-3*x^2+2*x-4)*log(x)+x^6-x^4-x^3+3*x^2+x-3)/(x^4-2*x^2+1),x, algor
ithm="giac")

[Out]

(x + x/(x^2 - 1))*log(x)^2 + (x^3 + (4*x - 1)/(x^2 - 1))*log(x) + x - log(x)

________________________________________________________________________________________

maple [A]  time = 0.10, size = 45, normalized size = 1.55




method result size



risch \(\frac {x^{3} \ln \relax (x )^{2}}{x^{2}-1}+\frac {\left (x^{5}-x^{3}+4 x -1\right ) \ln \relax (x )}{x^{2}-1}+x -\ln \relax (x )\) \(45\)
norman \(\frac {x^{3}+x^{3} \ln \relax (x )^{2}+x^{5} \ln \relax (x )-x +4 x \ln \relax (x )-x^{2} \ln \relax (x )-x^{3} \ln \relax (x )}{x^{2}-1}\) \(49\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((x^4-3*x^2)*ln(x)^2+(3*x^6-4*x^4-3*x^2+2*x-4)*ln(x)+x^6-x^4-x^3+3*x^2+x-3)/(x^4-2*x^2+1),x,method=_RETURN
VERBOSE)

[Out]

x^3/(x^2-1)*ln(x)^2+(x^5-x^3+4*x-1)/(x^2-1)*ln(x)+x-ln(x)

________________________________________________________________________________________

maxima [B]  time = 0.42, size = 75, normalized size = 2.59 \begin {gather*} \frac {1}{3} \, x^{3} + x - \frac {x^{5} - 3 \, x^{3} \log \relax (x)^{2} - x^{3} - 3 \, {\left (x^{5} - x^{3} + 4 \, x - 1\right )} \log \relax (x)}{3 \, {\left (x^{2} - 1\right )}} - \frac {1}{2} \, \log \left (x^{2} - 1\right ) + \frac {1}{2} \, \log \left (x + 1\right ) + \frac {1}{2} \, \log \left (x - 1\right ) - \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^4-3*x^2)*log(x)^2+(3*x^6-4*x^4-3*x^2+2*x-4)*log(x)+x^6-x^4-x^3+3*x^2+x-3)/(x^4-2*x^2+1),x, algor
ithm="maxima")

[Out]

1/3*x^3 + x - 1/3*(x^5 - 3*x^3*log(x)^2 - x^3 - 3*(x^5 - x^3 + 4*x - 1)*log(x))/(x^2 - 1) - 1/2*log(x^2 - 1) +
 1/2*log(x + 1) + 1/2*log(x - 1) - log(x)

________________________________________________________________________________________

mupad [B]  time = 4.28, size = 43, normalized size = 1.48 \begin {gather*} x^3\,\ln \relax (x)-\ln \relax (x)+x\,\left ({\ln \relax (x)}^2+1\right )-\frac {\ln \relax (x)-x\,\left ({\ln \relax (x)}^2+4\,\ln \relax (x)\right )}{x^2-1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(log(x)*(3*x^2 - 2*x + 4*x^4 - 3*x^6 + 4) - x + log(x)^2*(3*x^2 - x^4) - 3*x^2 + x^3 + x^4 - x^6 + 3)/(x^
4 - 2*x^2 + 1),x)

[Out]

x^3*log(x) - log(x) + x*(log(x)^2 + 1) - (log(x) - x*(4*log(x) + log(x)^2))/(x^2 - 1)

________________________________________________________________________________________

sympy [A]  time = 0.21, size = 37, normalized size = 1.28 \begin {gather*} \frac {x^{3} \log {\relax (x )}^{2}}{x^{2} - 1} + x - \log {\relax (x )} + \frac {\left (x^{5} - x^{3} + 4 x - 1\right ) \log {\relax (x )}}{x^{2} - 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x**4-3*x**2)*ln(x)**2+(3*x**6-4*x**4-3*x**2+2*x-4)*ln(x)+x**6-x**4-x**3+3*x**2+x-3)/(x**4-2*x**2+1
),x)

[Out]

x**3*log(x)**2/(x**2 - 1) + x - log(x) + (x**5 - x**3 + 4*x - 1)*log(x)/(x**2 - 1)

________________________________________________________________________________________