\(\int \frac {e^2 (-1-2 x)+6 x+14 x^2+4 x^3+(e^2-6 x-2 x^2) \log (\frac {-e^2+6 x+2 x^2}{2 x})+\log (x) (-3 e^2+12 x+2 x^2+(e^2-6 x-2 x^2) \log (\frac {-e^2+6 x+2 x^2}{2 x}))}{e^2-6 x-2 x^2} \, dx\) [6870]

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

Optimal result

Integrand size = 125, antiderivative size = 28 \[ \int \frac {e^2 (-1-2 x)+6 x+14 x^2+4 x^3+\left (e^2-6 x-2 x^2\right ) \log \left (\frac {-e^2+6 x+2 x^2}{2 x}\right )+\log (x) \left (-3 e^2+12 x+2 x^2+\left (e^2-6 x-2 x^2\right ) \log \left (\frac {-e^2+6 x+2 x^2}{2 x}\right )\right )}{e^2-6 x-2 x^2} \, dx=-1+x-x^2+x \log (x) \left (-2+\log \left (3-\frac {e^2}{2 x}+x\right )\right ) \]

[Out]

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

Rubi [A] (verified)

Time = 0.65 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.07, number of steps used = 37, number of rules used = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {6820, 2603, 1671, 648, 632, 212, 642, 6860, 2404, 2332, 2354, 2438, 2353, 2352, 2636} \[ \int \frac {e^2 (-1-2 x)+6 x+14 x^2+4 x^3+\left (e^2-6 x-2 x^2\right ) \log \left (\frac {-e^2+6 x+2 x^2}{2 x}\right )+\log (x) \left (-3 e^2+12 x+2 x^2+\left (e^2-6 x-2 x^2\right ) \log \left (\frac {-e^2+6 x+2 x^2}{2 x}\right )\right )}{e^2-6 x-2 x^2} \, dx=-x^2+x-2 x \log (x)+x \log (x) \log \left (x-\frac {e^2}{2 x}+3\right ) \]

[In]

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

[Out]

x - x^2 - 2*x*Log[x] + x*Log[x]*Log[3 - E^2/(2*x) + x]

Rule 212

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

Rule 632

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 642

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

Rule 648

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 1671

Int[(Pq_)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x + c*x^2)^p, x
], x] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 2332

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

Rule 2352

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

Rule 2353

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

Rule 2354

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 2404

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 2438

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 2603

Int[((a_.) + Log[(c_.)*(RFx_)^(p_.)]*(b_.))^(n_.), x_Symbol] :> Simp[x*(a + b*Log[c*RFx^p])^n, x] - Dist[b*n*p
, Int[SimplifyIntegrand[x*(a + b*Log[c*RFx^p])^(n - 1)*(D[RFx, x]/RFx), x], x], x] /; FreeQ[{a, b, c, p}, x] &
& RationalFunctionQ[RFx, x] && IGtQ[n, 0]

Rule 2636

Int[Log[v_]*Log[w_], x_Symbol] :> Simp[x*Log[v]*Log[w], x] + (-Int[SimplifyIntegrand[x*Log[w]*(D[v, x]/v), x],
 x] - Int[SimplifyIntegrand[x*Log[v]*(D[w, x]/w), x], x]) /; InverseFunctionFreeQ[v, x] && InverseFunctionFree
Q[w, x]

Rule 6820

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

Rule 6860

Int[(u_)/((a_.) + (b_.)*(x_)^(n_.) + (c_.)*(x_)^(n2_.)), x_Symbol] :> With[{v = RationalFunctionExpand[u/(a +
b*x^n + c*x^(2*n)), x]}, Int[v, x] /; SumQ[v]] /; FreeQ[{a, b, c}, x] && EqQ[n2, 2*n] && IGtQ[n, 0]

Rubi steps \begin{align*} \text {integral}& = \int \left (-1-2 x+\log \left (3-\frac {e^2}{2 x}+x\right )+\frac {\log (x) \left (-3 e^2+2 x (6+x)+\left (e^2-2 x (3+x)\right ) \log \left (3-\frac {e^2}{2 x}+x\right )\right )}{e^2-6 x-2 x^2}\right ) \, dx \\ & = -x-x^2+\int \log \left (3-\frac {e^2}{2 x}+x\right ) \, dx+\int \frac {\log (x) \left (-3 e^2+2 x (6+x)+\left (e^2-2 x (3+x)\right ) \log \left (3-\frac {e^2}{2 x}+x\right )\right )}{e^2-6 x-2 x^2} \, dx \\ & = -x-x^2+x \log \left (3-\frac {e^2}{2 x}+x\right )-\int \frac {-e^2-2 x^2}{e^2-6 x-2 x^2} \, dx+\int \left (-\frac {\left (3 e^2-12 x-2 x^2\right ) \log (x)}{e^2-6 x-2 x^2}+\log (x) \log \left (3-\frac {e^2}{2 x}+x\right )\right ) \, dx \\ & = -x-x^2+x \log \left (3-\frac {e^2}{2 x}+x\right )-\int \left (1-\frac {2 \left (e^2-3 x\right )}{e^2-6 x-2 x^2}\right ) \, dx-\int \frac {\left (3 e^2-12 x-2 x^2\right ) \log (x)}{e^2-6 x-2 x^2} \, dx+\int \log (x) \log \left (3-\frac {e^2}{2 x}+x\right ) \, dx \\ & = -2 x-x^2+x \log \left (3-\frac {e^2}{2 x}+x\right )+x \log (x) \log \left (3-\frac {e^2}{2 x}+x\right )+2 \int \frac {e^2-3 x}{e^2-6 x-2 x^2} \, dx-\int \frac {\left (-e^2-2 x^2\right ) \log (x)}{e^2-6 x-2 x^2} \, dx-\int \left (\log (x)+\frac {2 \left (e^2-3 x\right ) \log (x)}{e^2-6 x-2 x^2}\right ) \, dx-\int \log \left (3-\frac {e^2}{2 x}+x\right ) \, dx \\ & = -2 x-x^2+x \log (x) \log \left (3-\frac {e^2}{2 x}+x\right )+\frac {3}{2} \int \frac {-6-4 x}{e^2-6 x-2 x^2} \, dx-2 \int \frac {\left (e^2-3 x\right ) \log (x)}{e^2-6 x-2 x^2} \, dx+\left (9+2 e^2\right ) \int \frac {1}{e^2-6 x-2 x^2} \, dx+\int \frac {-e^2-2 x^2}{e^2-6 x-2 x^2} \, dx-\int \log (x) \, dx-\int \left (\log (x)-\frac {2 \left (e^2-3 x\right ) \log (x)}{e^2-6 x-2 x^2}\right ) \, dx \\ & = -x-x^2-x \log (x)+x \log (x) \log \left (3-\frac {e^2}{2 x}+x\right )+\frac {3}{2} \log \left (e^2-6 x-2 x^2\right )+2 \int \frac {\left (e^2-3 x\right ) \log (x)}{e^2-6 x-2 x^2} \, dx-2 \int \left (\frac {\left (-3-\sqrt {9+2 e^2}\right ) \log (x)}{-6-2 \sqrt {9+2 e^2}-4 x}+\frac {\left (-3+\sqrt {9+2 e^2}\right ) \log (x)}{-6+2 \sqrt {9+2 e^2}-4 x}\right ) \, dx-\left (2 \left (9+2 e^2\right )\right ) \text {Subst}\left (\int \frac {1}{4 \left (9+2 e^2\right )-x^2} \, dx,x,-6-4 x\right )+\int \left (1-\frac {2 \left (e^2-3 x\right )}{e^2-6 x-2 x^2}\right ) \, dx-\int \log (x) \, dx \\ & = x-x^2+\sqrt {9+2 e^2} \tanh ^{-1}\left (\frac {3+2 x}{\sqrt {9+2 e^2}}\right )-2 x \log (x)+x \log (x) \log \left (3-\frac {e^2}{2 x}+x\right )+\frac {3}{2} \log \left (e^2-6 x-2 x^2\right )-2 \int \frac {e^2-3 x}{e^2-6 x-2 x^2} \, dx+2 \int \left (\frac {\left (-3-\sqrt {9+2 e^2}\right ) \log (x)}{-6-2 \sqrt {9+2 e^2}-4 x}+\frac {\left (-3+\sqrt {9+2 e^2}\right ) \log (x)}{-6+2 \sqrt {9+2 e^2}-4 x}\right ) \, dx+\left (2 \left (3-\sqrt {9+2 e^2}\right )\right ) \int \frac {\log (x)}{-6+2 \sqrt {9+2 e^2}-4 x} \, dx+\left (2 \left (3+\sqrt {9+2 e^2}\right )\right ) \int \frac {\log (x)}{-6-2 \sqrt {9+2 e^2}-4 x} \, dx \\ & = x-x^2+\sqrt {9+2 e^2} \tanh ^{-1}\left (\frac {3+2 x}{\sqrt {9+2 e^2}}\right )-\frac {1}{2} \left (3-\sqrt {9+2 e^2}\right ) \log \left (\frac {1}{2} \left (-3+\sqrt {9+2 e^2}\right )\right ) \log \left (-2 \left (3-\sqrt {9+2 e^2}\right )-4 x\right )-2 x \log (x)+x \log (x) \log \left (3-\frac {e^2}{2 x}+x\right )-\frac {1}{2} \left (3+\sqrt {9+2 e^2}\right ) \log (x) \log \left (1+\frac {2 x}{3+\sqrt {9+2 e^2}}\right )+\frac {3}{2} \log \left (e^2-6 x-2 x^2\right )-\frac {3}{2} \int \frac {-6-4 x}{e^2-6 x-2 x^2} \, dx-\left (9+2 e^2\right ) \int \frac {1}{e^2-6 x-2 x^2} \, dx-\left (2 \left (3-\sqrt {9+2 e^2}\right )\right ) \int \frac {\log (x)}{-6+2 \sqrt {9+2 e^2}-4 x} \, dx+\left (2 \left (3-\sqrt {9+2 e^2}\right )\right ) \int \frac {\log \left (\frac {4 x}{-6+2 \sqrt {9+2 e^2}}\right )}{-6+2 \sqrt {9+2 e^2}-4 x} \, dx+\frac {1}{2} \left (3+\sqrt {9+2 e^2}\right ) \int \frac {\log \left (1-\frac {4 x}{-6-2 \sqrt {9+2 e^2}}\right )}{x} \, dx-\left (2 \left (3+\sqrt {9+2 e^2}\right )\right ) \int \frac {\log (x)}{-6-2 \sqrt {9+2 e^2}-4 x} \, dx \\ & = x-x^2+\sqrt {9+2 e^2} \tanh ^{-1}\left (\frac {3+2 x}{\sqrt {9+2 e^2}}\right )-2 x \log (x)+x \log (x) \log \left (3-\frac {e^2}{2 x}+x\right )-\frac {1}{2} \left (3+\sqrt {9+2 e^2}\right ) \text {Li}_2\left (-\frac {2 x}{3+\sqrt {9+2 e^2}}\right )+\frac {1}{2} \left (3-\sqrt {9+2 e^2}\right ) \text {Li}_2\left (1+\frac {2 x}{3-\sqrt {9+2 e^2}}\right )+\left (2 \left (9+2 e^2\right )\right ) \text {Subst}\left (\int \frac {1}{4 \left (9+2 e^2\right )-x^2} \, dx,x,-6-4 x\right )-\left (2 \left (3-\sqrt {9+2 e^2}\right )\right ) \int \frac {\log \left (\frac {4 x}{-6+2 \sqrt {9+2 e^2}}\right )}{-6+2 \sqrt {9+2 e^2}-4 x} \, dx-\frac {1}{2} \left (3+\sqrt {9+2 e^2}\right ) \int \frac {\log \left (1-\frac {4 x}{-6-2 \sqrt {9+2 e^2}}\right )}{x} \, dx \\ & = x-x^2-2 x \log (x)+x \log (x) \log \left (3-\frac {e^2}{2 x}+x\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.35 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.93 \[ \int \frac {e^2 (-1-2 x)+6 x+14 x^2+4 x^3+\left (e^2-6 x-2 x^2\right ) \log \left (\frac {-e^2+6 x+2 x^2}{2 x}\right )+\log (x) \left (-3 e^2+12 x+2 x^2+\left (e^2-6 x-2 x^2\right ) \log \left (\frac {-e^2+6 x+2 x^2}{2 x}\right )\right )}{e^2-6 x-2 x^2} \, dx=x \left (1-x+\log (x) \left (-2+\log \left (3-\frac {e^2}{2 x}+x\right )\right )\right ) \]

[In]

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

[Out]

x*(1 - x + Log[x]*(-2 + Log[3 - E^2/(2*x) + x]))

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(60\) vs. \(2(25)=50\).

Time = 2.78 (sec) , antiderivative size = 61, normalized size of antiderivative = 2.18

method result size
parallelrisch \(\frac {\left (12 \,{\mathrm e}^{2} x \ln \left (x \right ) \ln \left (-\frac {{\mathrm e}^{2}-2 x^{2}-6 x}{2 x}\right )-12 x^{2} {\mathrm e}^{2}-24 x \,{\mathrm e}^{2} \ln \left (x \right )-12 \,{\mathrm e}^{4}+12 \,{\mathrm e}^{2} x +36 \,{\mathrm e}^{2}\right ) {\mathrm e}^{-2}}{12}\) \(61\)
risch \(\ln \left (x \right ) x \ln \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )-x \ln \left (x \right )^{2}-i \pi \ln \left (x \right ) {\operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )}{x}\right )}^{2} x +\frac {i \pi \ln \left (x \right ) \operatorname {csgn}\left (i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )\right ) {\operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )}{x}\right )}^{2} x}{2}-\frac {i \pi \ln \left (x \right ) \operatorname {csgn}\left (i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )\right ) \operatorname {csgn}\left (\frac {i}{x}\right ) \operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )}{x}\right ) x}{2}+\frac {i \pi \ln \left (x \right ) \operatorname {csgn}\left (\frac {i}{x}\right ) {\operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )}{x}\right )}^{2} x}{2}+\frac {i \pi \ln \left (x \right ) {\operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )}{x}\right )}^{3} x}{2}+i \pi \ln \left (x \right ) x -x \ln \left (2\right ) \ln \left (x \right )-2 x \ln \left (x \right )-x^{2}+x\) \(227\)
default \(\ln \left (x \right ) x \ln \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )-\left (\ln \left (x \right )-1\right ) x \ln \left (x \right )+x \ln \left (\frac {-{\mathrm e}^{2}+2 x^{2}+6 x}{x}\right )+\frac {i \pi \ln \left (x \right ) \operatorname {csgn}\left (i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )\right ) {\operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )}{x}\right )}^{2} x}{2}+\frac {i \pi \ln \left (x \right ) \operatorname {csgn}\left (\frac {i}{x}\right ) {\operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )}{x}\right )}^{2} x}{2}+\frac {i x \pi \,\operatorname {csgn}\left (i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )\right ) \operatorname {csgn}\left (\frac {i}{x}\right ) \operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )}{x}\right )}{2}+i x \pi {\operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )}{x}\right )}^{2}-\frac {i x \pi {\operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )}{x}\right )}^{3}}{2}+x -2 x \ln \left (x \right )-x \ln \left (2\right ) \ln \left (x \right )-x^{2}-x \ln \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )+i \pi \ln \left (x \right ) x -\frac {3 \ln \left (x +\frac {3}{2}+\frac {\sqrt {9+2 \,{\mathrm e}^{2}}}{2}\right )}{2}+\frac {3 \ln \left (-{\mathrm e}^{2}+2 x^{2}+6 x \right )}{2}-\frac {i \pi \ln \left (x \right ) \operatorname {csgn}\left (i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )\right ) \operatorname {csgn}\left (\frac {i}{x}\right ) \operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )}{x}\right ) x}{2}-\frac {3 \ln \left (x +\frac {3}{2}-\frac {\sqrt {9+2 \,{\mathrm e}^{2}}}{2}\right )}{2}-\frac {\left (-9-2 \,{\mathrm e}^{2}\right ) \operatorname {arctanh}\left (\frac {4 x +6}{2 \sqrt {9+2 \,{\mathrm e}^{2}}}\right )}{\sqrt {9+2 \,{\mathrm e}^{2}}}-i x \pi -\frac {\ln \left (x +\frac {3}{2}+\frac {\sqrt {9+2 \,{\mathrm e}^{2}}}{2}\right ) \sqrt {9+2 \,{\mathrm e}^{2}}}{2}+\frac {\ln \left (x +\frac {3}{2}-\frac {\sqrt {9+2 \,{\mathrm e}^{2}}}{2}\right ) \sqrt {9+2 \,{\mathrm e}^{2}}}{2}-i \pi \ln \left (x \right ) {\operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )}{x}\right )}^{2} x +\frac {i \pi \ln \left (x \right ) {\operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )}{x}\right )}^{3} x}{2}-\frac {i x \pi \,\operatorname {csgn}\left (i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )\right ) {\operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )}{x}\right )}^{2}}{2}-\frac {i x \pi \,\operatorname {csgn}\left (\frac {i}{x}\right ) {\operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )}{x}\right )}^{2}}{2}\) \(564\)
parts \(\ln \left (x \right ) x \ln \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )-\left (\ln \left (x \right )-1\right ) x \ln \left (x \right )+x \ln \left (\frac {-{\mathrm e}^{2}+2 x^{2}+6 x}{x}\right )+\frac {i \pi \ln \left (x \right ) \operatorname {csgn}\left (i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )\right ) {\operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )}{x}\right )}^{2} x}{2}+\frac {i \pi \ln \left (x \right ) \operatorname {csgn}\left (\frac {i}{x}\right ) {\operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )}{x}\right )}^{2} x}{2}+\frac {i x \pi \,\operatorname {csgn}\left (i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )\right ) \operatorname {csgn}\left (\frac {i}{x}\right ) \operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )}{x}\right )}{2}+i x \pi {\operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )}{x}\right )}^{2}-\frac {i x \pi {\operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )}{x}\right )}^{3}}{2}+x -x \ln \left (2\right )-2 x \ln \left (x \right )-x^{2}-x \ln \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )+i \pi \ln \left (x \right ) x -\frac {3 \ln \left (x +\frac {3}{2}+\frac {\sqrt {9+2 \,{\mathrm e}^{2}}}{2}\right )}{2}+\frac {3 \ln \left (-{\mathrm e}^{2}+2 x^{2}+6 x \right )}{2}-\frac {i \pi \ln \left (x \right ) \operatorname {csgn}\left (i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )\right ) \operatorname {csgn}\left (\frac {i}{x}\right ) \operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )}{x}\right ) x}{2}-\frac {3 \ln \left (x +\frac {3}{2}-\frac {\sqrt {9+2 \,{\mathrm e}^{2}}}{2}\right )}{2}-\frac {\left (-9-2 \,{\mathrm e}^{2}\right ) \operatorname {arctanh}\left (\frac {4 x +6}{2 \sqrt {9+2 \,{\mathrm e}^{2}}}\right )}{\sqrt {9+2 \,{\mathrm e}^{2}}}-i x \pi -\frac {\ln \left (x +\frac {3}{2}+\frac {\sqrt {9+2 \,{\mathrm e}^{2}}}{2}\right ) \sqrt {9+2 \,{\mathrm e}^{2}}}{2}+\frac {\ln \left (x +\frac {3}{2}-\frac {\sqrt {9+2 \,{\mathrm e}^{2}}}{2}\right ) \sqrt {9+2 \,{\mathrm e}^{2}}}{2}-\ln \left (2\right ) \left (x \ln \left (x \right )-x \right )-i \pi \ln \left (x \right ) {\operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )}{x}\right )}^{2} x +\frac {i \pi \ln \left (x \right ) {\operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )}{x}\right )}^{3} x}{2}-\frac {i x \pi \,\operatorname {csgn}\left (i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )\right ) {\operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )}{x}\right )}^{2}}{2}-\frac {i x \pi \,\operatorname {csgn}\left (\frac {i}{x}\right ) {\operatorname {csgn}\left (\frac {i \left ({\mathrm e}^{2}-2 x^{2}-6 x \right )}{x}\right )}^{2}}{2}\) \(574\)

[In]

int((((exp(2)-2*x^2-6*x)*ln(1/2*(-exp(2)+2*x^2+6*x)/x)-3*exp(2)+2*x^2+12*x)*ln(x)+(exp(2)-2*x^2-6*x)*ln(1/2*(-
exp(2)+2*x^2+6*x)/x)+(-1-2*x)*exp(2)+4*x^3+14*x^2+6*x)/(exp(2)-2*x^2-6*x),x,method=_RETURNVERBOSE)

[Out]

1/12*(12*exp(2)*x*ln(x)*ln(-1/2*(exp(2)-2*x^2-6*x)/x)-12*x^2*exp(2)-24*x*exp(2)*ln(x)-12*exp(2)^2+12*exp(2)*x+
36*exp(2))/exp(2)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.25 \[ \int \frac {e^2 (-1-2 x)+6 x+14 x^2+4 x^3+\left (e^2-6 x-2 x^2\right ) \log \left (\frac {-e^2+6 x+2 x^2}{2 x}\right )+\log (x) \left (-3 e^2+12 x+2 x^2+\left (e^2-6 x-2 x^2\right ) \log \left (\frac {-e^2+6 x+2 x^2}{2 x}\right )\right )}{e^2-6 x-2 x^2} \, dx=-x^{2} + {\left (x \log \left (\frac {2 \, x^{2} + 6 \, x - e^{2}}{2 \, x}\right ) - 2 \, x\right )} \log \left (x\right ) + x \]

[In]

integrate((((exp(2)-2*x^2-6*x)*log(1/2*(-exp(2)+2*x^2+6*x)/x)-3*exp(2)+2*x^2+12*x)*log(x)+(exp(2)-2*x^2-6*x)*l
og(1/2*(-exp(2)+2*x^2+6*x)/x)+(-1-2*x)*exp(2)+4*x^3+14*x^2+6*x)/(exp(2)-2*x^2-6*x),x, algorithm="fricas")

[Out]

-x^2 + (x*log(1/2*(2*x^2 + 6*x - e^2)/x) - 2*x)*log(x) + x

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 58 vs. \(2 (24) = 48\).

Time = 1.11 (sec) , antiderivative size = 58, normalized size of antiderivative = 2.07 \[ \int \frac {e^2 (-1-2 x)+6 x+14 x^2+4 x^3+\left (e^2-6 x-2 x^2\right ) \log \left (\frac {-e^2+6 x+2 x^2}{2 x}\right )+\log (x) \left (-3 e^2+12 x+2 x^2+\left (e^2-6 x-2 x^2\right ) \log \left (\frac {-e^2+6 x+2 x^2}{2 x}\right )\right )}{e^2-6 x-2 x^2} \, dx=- x^{2} - 2 x \log {\left (x \right )} + x + \left (x \log {\left (x \right )} + \frac {5}{48}\right ) \log {\left (\frac {x^{2} + 3 x - \frac {e^{2}}{2}}{x} \right )} + \frac {5 \log {\left (x \right )}}{48} - \frac {5 \log {\left (x^{2} + 3 x - \frac {e^{2}}{2} \right )}}{48} \]

[In]

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

[Out]

-x**2 - 2*x*log(x) + x + (x*log(x) + 5/48)*log((x**2 + 3*x - exp(2)/2)/x) + 5*log(x)/48 - 5*log(x**2 + 3*x - e
xp(2)/2)/48

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 318 vs. \(2 (25) = 50\).

Time = 0.33 (sec) , antiderivative size = 318, normalized size of antiderivative = 11.36 \[ \int \frac {e^2 (-1-2 x)+6 x+14 x^2+4 x^3+\left (e^2-6 x-2 x^2\right ) \log \left (\frac {-e^2+6 x+2 x^2}{2 x}\right )+\log (x) \left (-3 e^2+12 x+2 x^2+\left (e^2-6 x-2 x^2\right ) \log \left (\frac {-e^2+6 x+2 x^2}{2 x}\right )\right )}{e^2-6 x-2 x^2} \, dx=-x {\left (\log \left (2\right ) + 2\right )} \log \left (x\right ) + x \log \left (2 \, x^{2} + 6 \, x - e^{2}\right ) \log \left (x\right ) - x \log \left (x\right )^{2} - x^{2} - \frac {1}{2} \, {\left (\frac {3 \, \log \left (\frac {2 \, x - \sqrt {2 \, e^{2} + 9} + 3}{2 \, x + \sqrt {2 \, e^{2} + 9} + 3}\right )}{\sqrt {2 \, e^{2} + 9}} - \log \left (2 \, x^{2} + 6 \, x - e^{2}\right )\right )} e^{2} - \frac {1}{2} \, {\left (e^{2} + 18\right )} \log \left (2 \, x^{2} + 6 \, x - e^{2}\right ) - \frac {7 \, {\left (e^{2} + 9\right )} \log \left (\frac {2 \, x - \sqrt {2 \, e^{2} + 9} + 3}{2 \, x + \sqrt {2 \, e^{2} + 9} + 3}\right )}{2 \, \sqrt {2 \, e^{2} + 9}} + \frac {9 \, {\left (e^{2} + 6\right )} \log \left (\frac {2 \, x - \sqrt {2 \, e^{2} + 9} + 3}{2 \, x + \sqrt {2 \, e^{2} + 9} + 3}\right )}{2 \, \sqrt {2 \, e^{2} + 9}} + \frac {e^{2} \log \left (\frac {2 \, x - \sqrt {2 \, e^{2} + 9} + 3}{2 \, x + \sqrt {2 \, e^{2} + 9} + 3}\right )}{2 \, \sqrt {2 \, e^{2} + 9}} + x + \frac {9 \, \log \left (\frac {2 \, x - \sqrt {2 \, e^{2} + 9} + 3}{2 \, x + \sqrt {2 \, e^{2} + 9} + 3}\right )}{2 \, \sqrt {2 \, e^{2} + 9}} + 9 \, \log \left (2 \, x^{2} + 6 \, x - e^{2}\right ) \]

[In]

integrate((((exp(2)-2*x^2-6*x)*log(1/2*(-exp(2)+2*x^2+6*x)/x)-3*exp(2)+2*x^2+12*x)*log(x)+(exp(2)-2*x^2-6*x)*l
og(1/2*(-exp(2)+2*x^2+6*x)/x)+(-1-2*x)*exp(2)+4*x^3+14*x^2+6*x)/(exp(2)-2*x^2-6*x),x, algorithm="maxima")

[Out]

-x*(log(2) + 2)*log(x) + x*log(2*x^2 + 6*x - e^2)*log(x) - x*log(x)^2 - x^2 - 1/2*(3*log((2*x - sqrt(2*e^2 + 9
) + 3)/(2*x + sqrt(2*e^2 + 9) + 3))/sqrt(2*e^2 + 9) - log(2*x^2 + 6*x - e^2))*e^2 - 1/2*(e^2 + 18)*log(2*x^2 +
 6*x - e^2) - 7/2*(e^2 + 9)*log((2*x - sqrt(2*e^2 + 9) + 3)/(2*x + sqrt(2*e^2 + 9) + 3))/sqrt(2*e^2 + 9) + 9/2
*(e^2 + 6)*log((2*x - sqrt(2*e^2 + 9) + 3)/(2*x + sqrt(2*e^2 + 9) + 3))/sqrt(2*e^2 + 9) + 1/2*e^2*log((2*x - s
qrt(2*e^2 + 9) + 3)/(2*x + sqrt(2*e^2 + 9) + 3))/sqrt(2*e^2 + 9) + x + 9/2*log((2*x - sqrt(2*e^2 + 9) + 3)/(2*
x + sqrt(2*e^2 + 9) + 3))/sqrt(2*e^2 + 9) + 9*log(2*x^2 + 6*x - e^2)

Giac [A] (verification not implemented)

none

Time = 0.36 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.57 \[ \int \frac {e^2 (-1-2 x)+6 x+14 x^2+4 x^3+\left (e^2-6 x-2 x^2\right ) \log \left (\frac {-e^2+6 x+2 x^2}{2 x}\right )+\log (x) \left (-3 e^2+12 x+2 x^2+\left (e^2-6 x-2 x^2\right ) \log \left (\frac {-e^2+6 x+2 x^2}{2 x}\right )\right )}{e^2-6 x-2 x^2} \, dx=-x \log \left (2\right ) \log \left (x\right ) + x \log \left (2 \, x^{2} + 6 \, x - e^{2}\right ) \log \left (x\right ) - x \log \left (x\right )^{2} - x^{2} - 2 \, x \log \left (x\right ) + x \]

[In]

integrate((((exp(2)-2*x^2-6*x)*log(1/2*(-exp(2)+2*x^2+6*x)/x)-3*exp(2)+2*x^2+12*x)*log(x)+(exp(2)-2*x^2-6*x)*l
og(1/2*(-exp(2)+2*x^2+6*x)/x)+(-1-2*x)*exp(2)+4*x^3+14*x^2+6*x)/(exp(2)-2*x^2-6*x),x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 12.52 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.14 \[ \int \frac {e^2 (-1-2 x)+6 x+14 x^2+4 x^3+\left (e^2-6 x-2 x^2\right ) \log \left (\frac {-e^2+6 x+2 x^2}{2 x}\right )+\log (x) \left (-3 e^2+12 x+2 x^2+\left (e^2-6 x-2 x^2\right ) \log \left (\frac {-e^2+6 x+2 x^2}{2 x}\right )\right )}{e^2-6 x-2 x^2} \, dx=x-2\,x\,\ln \left (x\right )-x^2+x\,\ln \left (\frac {x^2+3\,x-\frac {{\mathrm {e}}^2}{2}}{x}\right )\,\ln \left (x\right ) \]

[In]

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

[Out]

x - 2*x*log(x) - x^2 + x*log((3*x - exp(2)/2 + x^2)/x)*log(x)