3.5.85 \(\int (5+i \pi +2 x^2+(-4-i \pi -6 x^2) \log (\frac {5}{x})+(-1+\log (\frac {5}{x})) \log (x)) \, dx\) [485]

Optimal. Leaf size=22 \[ x \log \left (\frac {5}{x}\right ) \left (-5-i \pi -2 x^2+\log (x)\right ) \]

[Out]

ln(5/x)*(ln(x)-5-I*Pi-2*x^2)*x

________________________________________________________________________________________

Rubi [B] Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(65\) vs. \(2(22)=44\).
time = 0.03, antiderivative size = 65, normalized size of antiderivative = 2.95, number of steps used = 6, number of rules used = 3, integrand size = 42, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {2350, 2332, 2408} \begin {gather*} -2 x^3 \log \left (\frac {5}{x}\right )-i \pi x+(5+i \pi ) x-5 x-(4+i \pi ) x \log \left (\frac {5}{x}\right )-x \log \left (\frac {5}{x}\right )+x \log \left (\frac {5}{x}\right ) \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-5*x + (5 + I*Pi)*x - I*Pi*x - x*Log[5/x] - (4 + I*Pi)*x*Log[5/x] - 2*x^3*Log[5/x] + x*Log[5/x]*Log[x]

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 2350

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = IntHide[(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]

Rule 2408

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.) + Log[(f_.)*(x_)^(r_.)]*(e_.)), x_Symbol] :> With[{u =
IntHide[(a + b*Log[c*x^n])^p, x]}, Dist[d + e*Log[f*x^r], u, x] - Dist[e*r, Int[SimplifyIntegrand[u/x, x], x],
 x]] /; FreeQ[{a, b, c, d, e, f, n, p, r}, x]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 22, normalized size = 1.00 \begin {gather*} x \log \left (\frac {5}{x}\right ) \left (-5-i \pi -2 x^2+\log (x)\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

x*Log[5/x]*(-5 - I*Pi - 2*x^2 + Log[x])

________________________________________________________________________________________

Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 86 vs. \(2 (21 ) = 42\).
time = 0.42, size = 87, normalized size = 3.95

method result size
norman \(x \ln \left (x \right ) \ln \left (\frac {5}{x}\right )+\left (-i \pi -5\right ) x \ln \left (\frac {5}{x}\right )-2 x^{3} \ln \left (\frac {5}{x}\right )\) \(37\)
risch \(-i \pi \ln \left (\frac {5}{x}\right ) x -2 x^{3} \ln \left (\frac {5}{x}\right )-x \ln \left (x \right )^{2}+x \ln \left (5\right ) \ln \left (x \right )+x \ln \left (x \right )-x \ln \left (5\right )-4 x \ln \left (\frac {5}{x}\right )\) \(55\)
default \(x \ln \left (5\right ) \ln \left (x \right )-x \ln \left (5\right )+\ln \left (\frac {1}{x}\right ) x \left (\ln \left (\frac {1}{x}\right )+\ln \left (x \right )\right )+\left (\ln \left (\frac {1}{x}\right )+\ln \left (x \right )\right ) x -x \ln \left (\frac {1}{x}\right )^{2}-2 x \ln \left (\frac {1}{x}\right )-x \ln \left (x \right )-i \pi \ln \left (\frac {5}{x}\right ) x -4 x \ln \left (\frac {5}{x}\right )-2 x^{3} \ln \left (\frac {5}{x}\right )\) \(87\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((ln(5/x)-1)*ln(x)+(-I*Pi-6*x^2-4)*ln(5/x)+I*Pi+2*x^2+5,x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

Maxima [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 55 vs. \(2 (20) = 40\).
time = 0.27, size = 55, normalized size = 2.50 \begin {gather*} x \log \left (x\right ) \log \left (\frac {5}{x}\right ) + i \, \pi x + {\left (-i \, \pi - 4\right )} x - {\left (2 \, x^{3} + i \, \pi x + 4 \, x\right )} \log \left (\frac {5}{x}\right ) - x \log \left (\frac {5}{x}\right ) + 4 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((log(5/x)-1)*log(x)+(-I*pi-6*x^2-4)*log(5/x)+I*pi+2*x^2+5,x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.30, size = 39, normalized size = 1.77 \begin {gather*} -x \log \left (\frac {5}{x}\right )^{2} - {\left (2 \, x^{3} - {\left (-i \, \pi - 5\right )} x - x \log \left (5\right )\right )} \log \left (\frac {5}{x}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((log(5/x)-1)*log(x)+(-I*pi-6*x^2-4)*log(5/x)+I*pi+2*x^2+5,x, algorithm="fricas")

[Out]

-x*log(5/x)^2 - (2*x^3 - (-I*pi - 5)*x - x*log(5))*log(5/x)

________________________________________________________________________________________

Sympy [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 51 vs. \(2 (19) = 38\).
time = 0.11, size = 51, normalized size = 2.32 \begin {gather*} - 2 x^{3} \log {\left (5 \right )} - x \log {\left (x \right )}^{2} + x \left (- 5 \log {\left (5 \right )} - i \pi \log {\left (5 \right )}\right ) + \left (2 x^{3} + x \log {\left (5 \right )} + 5 x + i \pi x\right ) \log {\left (x \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((ln(5/x)-1)*ln(x)+(-I*pi-6*x**2-4)*ln(5/x)+I*pi+2*x**2+5,x)

[Out]

-2*x**3*log(5) - x*log(x)**2 + x*(-5*log(5) - I*pi*log(5)) + (2*x**3 + x*log(5) + 5*x + I*pi*x)*log(x)

________________________________________________________________________________________

Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 74 vs. \(2 (20) = 40\).
time = 0.42, size = 74, normalized size = 3.36 \begin {gather*} -\frac {1}{3} \, x^{3} {\left (\frac {3 i \, \pi }{x^{2}} + \frac {12}{x^{2}} + 2\right )} + \frac {2}{3} \, x^{3} + x \log \left (5\right ) \log \left (x\right ) - x \log \left (x\right )^{2} + i \, \pi x - x \log \left (5\right ) + x \log \left (x\right ) - {\left (2 \, x^{3} + i \, \pi x + 4 \, x\right )} \log \left (\frac {5}{x}\right ) + 4 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((log(5/x)-1)*log(x)+(-I*pi-6*x^2-4)*log(5/x)+I*pi+2*x^2+5,x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.54, size = 25, normalized size = 1.14 \begin {gather*} -x\,\left (\ln \left (\frac {1}{x}\right )+\ln \left (5\right )\right )\,\left (2\,x^2-\ln \left (x\right )+5+\Pi \,1{}\mathrm {i}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(Pi*1i + log(x)*(log(5/x) - 1) - log(5/x)*(Pi*1i + 6*x^2 + 4) + 2*x^2 + 5,x)

[Out]

-x*(log(1/x) + log(5))*(Pi*1i - log(x) + 2*x^2 + 5)

________________________________________________________________________________________