\(\int \frac {-30 x-2 x^3+e (10 x+x^3)+(6+e (-2-10 x)+30 x) \log (x)+(-6+2 e) \log ^2(x)}{8 x^3} \, dx\) [68]

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

Optimal result

Integrand size = 50, antiderivative size = 27 \[ \int \frac {-30 x-2 x^3+e \left (10 x+x^3\right )+(6+e (-2-10 x)+30 x) \log (x)+(-6+2 e) \log ^2(x)}{8 x^3} \, dx=\frac {1}{8} \left (x-(3-e) \left (x-\left (-5+\frac {\log (x)}{x}\right )^2\right )\right ) \]

[Out]

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

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(73\) vs. \(2(27)=54\).

Time = 0.12 (sec) , antiderivative size = 73, normalized size of antiderivative = 2.70, number of steps used = 11, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.140, Rules used = {12, 14, 37, 2372, 45, 2342, 2341} \[ \int \frac {-30 x-2 x^3+e \left (10 x+x^3\right )+(6+e (-2-10 x)+30 x) \log (x)+(-6+2 e) \log ^2(x)}{8 x^3} \, dx=\frac {(3-e) \log ^2(x)}{8 x^2}-\frac {(3-e) (5 x+1)^2 \log (x)}{8 x^2}+\frac {(3-e) \log (x)}{8 x^2}-\frac {1}{8} (2-e) x+\frac {25}{8} (3-e) \log (x) \]

[In]

Int[(-30*x - 2*x^3 + E*(10*x + x^3) + (6 + E*(-2 - 10*x) + 30*x)*Log[x] + (-6 + 2*E)*Log[x]^2)/(8*x^3),x]

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 37

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

Rule 45

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 2341

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 2342

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

Rule 2372

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Dist[a + b*Log[c*x^n], u, x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]]
 /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

Rubi steps \begin{align*} \text {integral}& = \frac {1}{8} \int \frac {-30 x-2 x^3+e \left (10 x+x^3\right )+(6+e (-2-10 x)+30 x) \log (x)+(-6+2 e) \log ^2(x)}{x^3} \, dx \\ & = \frac {1}{8} \int \left (\frac {-10 (3-e)-(2-e) x^2}{x^2}-\frac {2 (-3+e) (1+5 x) \log (x)}{x^3}+\frac {2 (-3+e) \log ^2(x)}{x^3}\right ) \, dx \\ & = \frac {1}{8} \int \frac {-10 (3-e)-(2-e) x^2}{x^2} \, dx+\frac {1}{4} (3-e) \int \frac {(1+5 x) \log (x)}{x^3} \, dx+\frac {1}{4} (-3+e) \int \frac {\log ^2(x)}{x^3} \, dx \\ & = -\frac {(3-e) (1+5 x)^2 \log (x)}{8 x^2}+\frac {(3-e) \log ^2(x)}{8 x^2}+\frac {1}{8} \int \left (-2 \left (1-\frac {e}{2}\right )+\frac {10 (-3+e)}{x^2}\right ) \, dx+\frac {1}{4} (-3+e) \int -\frac {(1+5 x)^2}{2 x^3} \, dx+\frac {1}{4} (-3+e) \int \frac {\log (x)}{x^3} \, dx \\ & = \frac {3-e}{16 x^2}+\frac {5 (3-e)}{4 x}-\frac {1}{8} (2-e) x+\frac {(3-e) \log (x)}{8 x^2}-\frac {(3-e) (1+5 x)^2 \log (x)}{8 x^2}+\frac {(3-e) \log ^2(x)}{8 x^2}+\frac {1}{8} (3-e) \int \frac {(1+5 x)^2}{x^3} \, dx \\ & = \frac {3-e}{16 x^2}+\frac {5 (3-e)}{4 x}-\frac {1}{8} (2-e) x+\frac {(3-e) \log (x)}{8 x^2}-\frac {(3-e) (1+5 x)^2 \log (x)}{8 x^2}+\frac {(3-e) \log ^2(x)}{8 x^2}+\frac {1}{8} (3-e) \int \left (\frac {1}{x^3}+\frac {10}{x^2}+\frac {25}{x}\right ) \, dx \\ & = -\frac {1}{8} (2-e) x+\frac {25}{8} (3-e) \log (x)+\frac {(3-e) \log (x)}{8 x^2}-\frac {(3-e) (1+5 x)^2 \log (x)}{8 x^2}+\frac {(3-e) \log ^2(x)}{8 x^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.19 \[ \int \frac {-30 x-2 x^3+e \left (10 x+x^3\right )+(6+e (-2-10 x)+30 x) \log (x)+(-6+2 e) \log ^2(x)}{8 x^3} \, dx=\frac {(-2+e) x^3+10 (-3+e) x \log (x)-(-3+e) \log ^2(x)}{8 x^2} \]

[In]

Integrate[(-30*x - 2*x^3 + E*(10*x + x^3) + (6 + E*(-2 - 10*x) + 30*x)*Log[x] + (-6 + 2*E)*Log[x]^2)/(8*x^3),x
]

[Out]

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

Maple [A] (verified)

Time = 0.06 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.26

method result size
risch \(-\frac {\left ({\mathrm e}-3\right ) \ln \left (x \right )^{2}}{8 x^{2}}+\frac {5 \left ({\mathrm e}-3\right ) \ln \left (x \right )}{4 x}-\frac {x}{4}+\frac {x \,{\mathrm e}}{8}\) \(34\)
norman \(\frac {\left (-\frac {1}{4}+\frac {{\mathrm e}}{8}\right ) x^{3}+\left (-\frac {{\mathrm e}}{8}+\frac {3}{8}\right ) \ln \left (x \right )^{2}+\left (\frac {5 \,{\mathrm e}}{4}-\frac {15}{4}\right ) x \ln \left (x \right )}{x^{2}}\) \(37\)
parallelrisch \(\frac {x^{3} {\mathrm e}+10 x \,{\mathrm e} \ln \left (x \right )-{\mathrm e} \ln \left (x \right )^{2}-2 x^{3}-30 x \ln \left (x \right )+3 \ln \left (x \right )^{2}}{8 x^{2}}\) \(44\)
default \(\frac {x \,{\mathrm e}}{8}+\frac {{\mathrm e} \left (-\frac {\ln \left (x \right )^{2}}{2 x^{2}}-\frac {\ln \left (x \right )}{2 x^{2}}-\frac {1}{4 x^{2}}\right )}{4}-\frac {5 \,{\mathrm e} \left (-\frac {\ln \left (x \right )}{x}-\frac {1}{x}\right )}{4}-\frac {x}{4}+\frac {3 \ln \left (x \right )^{2}}{8 x^{2}}-\frac {{\mathrm e} \left (-\frac {\ln \left (x \right )}{2 x^{2}}-\frac {1}{4 x^{2}}\right )}{4}-\frac {15 \ln \left (x \right )}{4 x}-\frac {5 \,{\mathrm e}}{4 x}\) \(93\)
parts \(\frac {x \,{\mathrm e}}{8}-\frac {x}{4}-\frac {10 \,{\mathrm e}-30}{8 x}+\left (\frac {{\mathrm e}}{4}-\frac {3}{4}\right ) \left (-\frac {\ln \left (x \right )^{2}}{2 x^{2}}-\frac {\ln \left (x \right )}{2 x^{2}}-\frac {1}{4 x^{2}}\right )-\frac {5 \,{\mathrm e} \left (-\frac {\ln \left (x \right )}{x}-\frac {1}{x}\right )}{4}-\frac {{\mathrm e} \left (-\frac {\ln \left (x \right )}{2 x^{2}}-\frac {1}{4 x^{2}}\right )}{4}-\frac {15 \ln \left (x \right )}{4 x}-\frac {15}{4 x}-\frac {3 \ln \left (x \right )}{8 x^{2}}-\frac {3}{16 x^{2}}\) \(108\)

[In]

int(1/8*((2*exp(1)-6)*ln(x)^2+((-10*x-2)*exp(1)+30*x+6)*ln(x)+(x^3+10*x)*exp(1)-2*x^3-30*x)/x^3,x,method=_RETU
RNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.44 \[ \int \frac {-30 x-2 x^3+e \left (10 x+x^3\right )+(6+e (-2-10 x)+30 x) \log (x)+(-6+2 e) \log ^2(x)}{8 x^3} \, dx=\frac {x^{3} e - 2 \, x^{3} - {\left (e - 3\right )} \log \left (x\right )^{2} + 10 \, {\left (x e - 3 \, x\right )} \log \left (x\right )}{8 \, x^{2}} \]

[In]

integrate(1/8*((2*exp(1)-6)*log(x)^2+((-10*x-2)*exp(1)+30*x+6)*log(x)+(x^3+10*x)*exp(1)-2*x^3-30*x)/x^3,x, alg
orithm="fricas")

[Out]

1/8*(x^3*e - 2*x^3 - (e - 3)*log(x)^2 + 10*(x*e - 3*x)*log(x))/x^2

Sympy [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.37 \[ \int \frac {-30 x-2 x^3+e \left (10 x+x^3\right )+(6+e (-2-10 x)+30 x) \log (x)+(-6+2 e) \log ^2(x)}{8 x^3} \, dx=x \left (- \frac {1}{4} + \frac {e}{8}\right ) + \frac {\left (-15 + 5 e\right ) \log {\left (x \right )}}{4 x} + \frac {\left (3 - e\right ) \log {\left (x \right )}^{2}}{8 x^{2}} \]

[In]

integrate(1/8*((2*exp(1)-6)*ln(x)**2+((-10*x-2)*exp(1)+30*x+6)*ln(x)+(x**3+10*x)*exp(1)-2*x**3-30*x)/x**3,x)

[Out]

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

Maxima [B] (verification not implemented)

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

Time = 0.17 (sec) , antiderivative size = 100, normalized size of antiderivative = 3.70 \[ \int \frac {-30 x-2 x^3+e \left (10 x+x^3\right )+(6+e (-2-10 x)+30 x) \log (x)+(-6+2 e) \log ^2(x)}{8 x^3} \, dx=\frac {1}{8} \, x e + \frac {5}{4} \, {\left (\frac {\log \left (x\right )}{x} + \frac {1}{x}\right )} e + \frac {1}{16} \, {\left (\frac {2 \, \log \left (x\right )}{x^{2}} + \frac {1}{x^{2}}\right )} e - \frac {1}{4} \, x - \frac {{\left (2 \, \log \left (x\right )^{2} + 2 \, \log \left (x\right ) + 1\right )} e}{16 \, x^{2}} - \frac {5 \, e}{4 \, x} - \frac {15 \, \log \left (x\right )}{4 \, x} + \frac {3 \, {\left (2 \, \log \left (x\right )^{2} + 2 \, \log \left (x\right ) + 1\right )}}{16 \, x^{2}} - \frac {3 \, \log \left (x\right )}{8 \, x^{2}} - \frac {3}{16 \, x^{2}} \]

[In]

integrate(1/8*((2*exp(1)-6)*log(x)^2+((-10*x-2)*exp(1)+30*x+6)*log(x)+(x^3+10*x)*exp(1)-2*x^3-30*x)/x^3,x, alg
orithm="maxima")

[Out]

1/8*x*e + 5/4*(log(x)/x + 1/x)*e + 1/16*(2*log(x)/x^2 + 1/x^2)*e - 1/4*x - 1/16*(2*log(x)^2 + 2*log(x) + 1)*e/
x^2 - 5/4*e/x - 15/4*log(x)/x + 3/16*(2*log(x)^2 + 2*log(x) + 1)/x^2 - 3/8*log(x)/x^2 - 3/16/x^2

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.59 \[ \int \frac {-30 x-2 x^3+e \left (10 x+x^3\right )+(6+e (-2-10 x)+30 x) \log (x)+(-6+2 e) \log ^2(x)}{8 x^3} \, dx=\frac {x^{3} e - 2 \, x^{3} + 10 \, x e \log \left (x\right ) - e \log \left (x\right )^{2} - 30 \, x \log \left (x\right ) + 3 \, \log \left (x\right )^{2}}{8 \, x^{2}} \]

[In]

integrate(1/8*((2*exp(1)-6)*log(x)^2+((-10*x-2)*exp(1)+30*x+6)*log(x)+(x^3+10*x)*exp(1)-2*x^3-30*x)/x^3,x, alg
orithm="giac")

[Out]

1/8*(x^3*e - 2*x^3 + 10*x*e*log(x) - e*log(x)^2 - 30*x*log(x) + 3*log(x)^2)/x^2

Mupad [B] (verification not implemented)

Time = 8.24 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.41 \[ \int \frac {-30 x-2 x^3+e \left (10 x+x^3\right )+(6+e (-2-10 x)+30 x) \log (x)+(-6+2 e) \log ^2(x)}{8 x^3} \, dx=\frac {\frac {x^2\,\ln \left (x\right )\,\left (10\,\mathrm {e}-30\right )}{8}-\frac {x\,{\ln \left (x\right )}^2\,\left (\mathrm {e}-3\right )}{8}}{x^3}+x\,\left (\frac {\mathrm {e}}{8}-\frac {1}{4}\right ) \]

[In]

int(((log(x)*(30*x - exp(1)*(10*x + 2) + 6))/8 - (15*x)/4 + (log(x)^2*(2*exp(1) - 6))/8 + (exp(1)*(10*x + x^3)
)/8 - x^3/4)/x^3,x)

[Out]

((x^2*log(x)*(10*exp(1) - 30))/8 - (x*log(x)^2*(exp(1) - 3))/8)/x^3 + x*(exp(1)/8 - 1/4)