3.9.60 \(\int \frac {2 x+e^4 (-8+24 x-18 x^2) \log (\frac {1}{2 x})+e^4 (-12 x+18 x^2) \log ^2(\frac {1}{2 x})}{x} \, dx\) [860]

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

[Out]

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

________________________________________________________________________________________

Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(62\) vs. \(2(25)=50\).
time = 0.07, antiderivative size = 62, normalized size of antiderivative = 2.48, number of steps used = 11, number of rules used = 9, integrand size = 53, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.170, Rules used = {14, 45, 2372, 2338, 2367, 2333, 2332, 2342, 2341} \begin {gather*} 9 e^4 x^2 \log ^2\left (\frac {1}{2 x}\right )+2 x-12 e^4 x \log ^2\left (\frac {1}{2 x}\right )-4 e^4 \log ^2(x)-8 e^4 \log (x) \log \left (\frac {1}{2 x}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(2*x + E^4*(-8 + 24*x - 18*x^2)*Log[1/(2*x)] + E^4*(-12*x + 18*x^2)*Log[1/(2*x)]^2)/x,x]

[Out]

2*x - 12*E^4*x*Log[1/(2*x)]^2 + 9*E^4*x^2*Log[1/(2*x)]^2 - 8*E^4*Log[1/(2*x)]*Log[x] - 4*E^4*Log[x]^2

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 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 2332

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

Rule 2333

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 2338

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

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 2367

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = Expand
Integrand[(a + b*Log[c*x^n])^p, (d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n, p, q, r}
, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[r]))

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 {gather*} \begin {aligned} \text {integral} &=\int \left (2-\frac {2 e^4 (-2+3 x)^2 \log \left (\frac {1}{2 x}\right )}{x}+6 e^4 (-2+3 x) \log ^2\left (\frac {1}{2 x}\right )\right ) \, dx\\ &=2 x-\left (2 e^4\right ) \int \frac {(-2+3 x)^2 \log \left (\frac {1}{2 x}\right )}{x} \, dx+\left (6 e^4\right ) \int (-2+3 x) \log ^2\left (\frac {1}{2 x}\right ) \, dx\\ &=2 x+e^4 \log \left (\frac {1}{2 x}\right ) \left (24 x-9 x^2-8 \log (x)\right )-\left (2 e^4\right ) \int \left (-12+\frac {9 x}{2}+\frac {4 \log (x)}{x}\right ) \, dx+\left (6 e^4\right ) \int \left (-2 \log ^2\left (\frac {1}{2 x}\right )+3 x \log ^2\left (\frac {1}{2 x}\right )\right ) \, dx\\ &=2 x+24 e^4 x-\frac {9 e^4 x^2}{2}+e^4 \log \left (\frac {1}{2 x}\right ) \left (24 x-9 x^2-8 \log (x)\right )-\left (8 e^4\right ) \int \frac {\log (x)}{x} \, dx-\left (12 e^4\right ) \int \log ^2\left (\frac {1}{2 x}\right ) \, dx+\left (18 e^4\right ) \int x \log ^2\left (\frac {1}{2 x}\right ) \, dx\\ &=2 x+24 e^4 x-\frac {9 e^4 x^2}{2}-12 e^4 x \log ^2\left (\frac {1}{2 x}\right )+9 e^4 x^2 \log ^2\left (\frac {1}{2 x}\right )+e^4 \log \left (\frac {1}{2 x}\right ) \left (24 x-9 x^2-8 \log (x)\right )-4 e^4 \log ^2(x)+\left (18 e^4\right ) \int x \log \left (\frac {1}{2 x}\right ) \, dx-\left (24 e^4\right ) \int \log \left (\frac {1}{2 x}\right ) \, dx\\ &=2 x-24 e^4 x \log \left (\frac {1}{2 x}\right )+9 e^4 x^2 \log \left (\frac {1}{2 x}\right )-12 e^4 x \log ^2\left (\frac {1}{2 x}\right )+9 e^4 x^2 \log ^2\left (\frac {1}{2 x}\right )+e^4 \log \left (\frac {1}{2 x}\right ) \left (24 x-9 x^2-8 \log (x)\right )-4 e^4 \log ^2(x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(53\) vs. \(2(25)=50\).
time = 0.02, size = 53, normalized size = 2.12 \begin {gather*} 2 x+4 e^4 \log ^2\left (\frac {1}{2 x}\right )-12 e^4 x \log ^2\left (\frac {1}{2 x}\right )+9 e^4 x^2 \log ^2\left (\frac {1}{2 x}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(2*x + E^4*(-8 + 24*x - 18*x^2)*Log[1/(2*x)] + E^4*(-12*x + 18*x^2)*Log[1/(2*x)]^2)/x,x]

[Out]

2*x + 4*E^4*Log[1/(2*x)]^2 - 12*E^4*x*Log[1/(2*x)]^2 + 9*E^4*x^2*Log[1/(2*x)]^2

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(126\) vs. \(2(24)=48\).
time = 0.23, size = 127, normalized size = 5.08

method result size
risch \(2 x +4 \,{\mathrm e}^{4} \ln \left (\frac {1}{2 x}\right )^{2}-12 \,{\mathrm e}^{4} \ln \left (\frac {1}{2 x}\right )^{2} x +9 \,{\mathrm e}^{4} \ln \left (\frac {1}{2 x}\right )^{2} x^{2}\) \(45\)
norman \(2 x +4 \,{\mathrm e}^{4} \ln \left (\frac {1}{2 x}\right )^{2}-12 \,{\mathrm e}^{4} \ln \left (\frac {1}{2 x}\right )^{2} x +9 \,{\mathrm e}^{4} \ln \left (\frac {1}{2 x}\right )^{2} x^{2}\) \(51\)
derivativedivides \(6 \,{\mathrm e}^{4} \left (-2 x \ln \left (\frac {1}{2 x}\right )^{2}-4 \ln \left (\frac {1}{2 x}\right ) x -4 x \right )+4 \,{\mathrm e}^{4} \ln \left (\frac {1}{2 x}\right )^{2}-\frac {9 \,{\mathrm e}^{4} \left (-2 \ln \left (\frac {1}{2 x}\right )^{2} x^{2}-2 \ln \left (\frac {1}{2 x}\right ) x^{2}-x^{2}\right )}{2}-12 \,{\mathrm e}^{4} \left (-2 \ln \left (\frac {1}{2 x}\right ) x -2 x \right )+\frac {9 \,{\mathrm e}^{4} \left (-2 \ln \left (\frac {1}{2 x}\right ) x^{2}-x^{2}\right )}{2}+2 x\) \(127\)
default \(6 \,{\mathrm e}^{4} \left (-2 x \ln \left (\frac {1}{2 x}\right )^{2}-4 \ln \left (\frac {1}{2 x}\right ) x -4 x \right )+4 \,{\mathrm e}^{4} \ln \left (\frac {1}{2 x}\right )^{2}-\frac {9 \,{\mathrm e}^{4} \left (-2 \ln \left (\frac {1}{2 x}\right )^{2} x^{2}-2 \ln \left (\frac {1}{2 x}\right ) x^{2}-x^{2}\right )}{2}-12 \,{\mathrm e}^{4} \left (-2 \ln \left (\frac {1}{2 x}\right ) x -2 x \right )+\frac {9 \,{\mathrm e}^{4} \left (-2 \ln \left (\frac {1}{2 x}\right ) x^{2}-x^{2}\right )}{2}+2 x\) \(127\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((18*x^2-12*x)*exp(2)^2*ln(1/2/x)^2+(-18*x^2+24*x-8)*exp(2)^2*ln(1/2/x)+2*x)/x,x,method=_RETURNVERBOSE)

[Out]

6*exp(2)^2*(-2*x*ln(1/2/x)^2-4*ln(1/2/x)*x-4*x)+4*exp(2)^2*ln(1/2/x)^2-9/2*exp(2)^2*(-2*ln(1/2/x)^2*x^2-2*ln(1
/2/x)*x^2-x^2)-12*exp(2)^2*(-2*ln(1/2/x)*x-2*x)+9/2*exp(2)^2*(-2*ln(1/2/x)*x^2-x^2)+2*x

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 44, normalized size = 1.76 \begin {gather*} 9 \, x^{2} e^{4} \log \left (\frac {1}{2 \, x}\right )^{2} - 12 \, x e^{4} \log \left (\frac {1}{2 \, x}\right )^{2} + 4 \, e^{4} \log \left (\frac {1}{2 \, x}\right )^{2} + 2 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((18*x^2-12*x)*exp(2)^2*log(1/2/x)^2+(-18*x^2+24*x-8)*exp(2)^2*log(1/2/x)+2*x)/x,x, algorithm="maxim
a")

[Out]

9*x^2*e^4*log(1/2/x)^2 - 12*x*e^4*log(1/2/x)^2 + 4*e^4*log(1/2/x)^2 + 2*x

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 25, normalized size = 1.00 \begin {gather*} {\left (9 \, x^{2} - 12 \, x + 4\right )} e^{4} \log \left (\frac {1}{2 \, x}\right )^{2} + 2 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((18*x^2-12*x)*exp(2)^2*log(1/2/x)^2+(-18*x^2+24*x-8)*exp(2)^2*log(1/2/x)+2*x)/x,x, algorithm="frica
s")

[Out]

(9*x^2 - 12*x + 4)*e^4*log(1/2/x)^2 + 2*x

________________________________________________________________________________________

Sympy [A]
time = 0.08, size = 31, normalized size = 1.24 \begin {gather*} 2 x + \left (9 x^{2} e^{4} - 12 x e^{4} + 4 e^{4}\right ) \log {\left (\frac {1}{2 x} \right )}^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((18*x**2-12*x)*exp(2)**2*ln(1/2/x)**2+(-18*x**2+24*x-8)*exp(2)**2*ln(1/2/x)+2*x)/x,x)

[Out]

2*x + (9*x**2*exp(4) - 12*x*exp(4) + 4*exp(4))*log(1/(2*x))**2

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 46 vs. \(2 (22) = 44\).
time = 0.40, size = 46, normalized size = 1.84 \begin {gather*} {\left (9 \, e^{4} \log \left (2 \, x\right )^{2} - \frac {12 \, e^{4} \log \left (2 \, x\right )^{2}}{x} + \frac {4 \, e^{4} \log \left (2 \, x\right )^{2}}{x^{2}} + \frac {2}{x}\right )} x^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((18*x^2-12*x)*exp(2)^2*log(1/2/x)^2+(-18*x^2+24*x-8)*exp(2)^2*log(1/2/x)+2*x)/x,x, algorithm="giac"
)

[Out]

(9*e^4*log(2*x)^2 - 12*e^4*log(2*x)^2/x + 4*e^4*log(2*x)^2/x^2 + 2/x)*x^2

________________________________________________________________________________________

Mupad [B]
time = 0.66, size = 45, normalized size = 1.80 \begin {gather*} 4\,{\mathrm {e}}^4\,{\ln \left (\frac {1}{2\,x}\right )}^2-x\,\left (12\,{\mathrm {e}}^4\,{\ln \left (\frac {1}{2\,x}\right )}^2-2\right )+9\,x^2\,{\mathrm {e}}^4\,{\ln \left (\frac {1}{2\,x}\right )}^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(exp(4)*log(1/(2*x))^2*(12*x - 18*x^2) - 2*x + exp(4)*log(1/(2*x))*(18*x^2 - 24*x + 8))/x,x)

[Out]

4*exp(4)*log(1/(2*x))^2 - x*(12*exp(4)*log(1/(2*x))^2 - 2) + 9*x^2*exp(4)*log(1/(2*x))^2

________________________________________________________________________________________