3.12.18 \(\int \frac {-12-3 x-9 x^3-2 (i \pi +\log (4))}{9 x^3} \, dx\)

Optimal. Leaf size=24 \[ -x+\frac {i \pi +3 (2+x)+\log (4)}{9 x^2} \]

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 27, normalized size of antiderivative = 1.12, number of steps used = 3, number of rules used = 2, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.074, Rules used = {12, 14} \begin {gather*} \frac {12+2 i \pi +\log (16)}{18 x^2}-x+\frac {1}{3 x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-12 - 3*x - 9*x^3 - 2*(I*Pi + Log[4]))/(9*x^3),x]

[Out]

1/(3*x) - x + (12 + (2*I)*Pi + Log[16])/(18*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]]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 24, normalized size = 1.00 \begin {gather*} \frac {12+2 i \pi +6 x-18 x^3+\log (16)}{18 x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-12 - 3*x - 9*x^3 - 2*(I*Pi + Log[4]))/(9*x^3),x]

[Out]

(12 + (2*I)*Pi + 6*x - 18*x^3 + Log[16])/(18*x^2)

________________________________________________________________________________________

fricas [A]  time = 0.64, size = 22, normalized size = 0.92 \begin {gather*} \frac {i \, \pi - 9 \, x^{3} + 3 \, x + 2 \, \log \relax (2) + 6}{9 \, x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/9*(-4*log(2)-2*I*pi-9*x^3-3*x-12)/x^3,x, algorithm="fricas")

[Out]

1/9*(I*pi - 9*x^3 + 3*x + 2*log(2) + 6)/x^2

________________________________________________________________________________________

giac [A]  time = 0.19, size = 21, normalized size = 0.88 \begin {gather*} -x - \frac {-i \, \pi - 3 \, x - 2 \, \log \relax (2) - 6}{9 \, x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/9*(-4*log(2)-2*I*pi-9*x^3-3*x-12)/x^3,x, algorithm="giac")

[Out]

-x - 1/9*(-I*pi - 3*x - 2*log(2) - 6)/x^2

________________________________________________________________________________________

maple [A]  time = 0.08, size = 23, normalized size = 0.96




method result size



risch \(\frac {2 \ln \relax (2)+i \pi +6+3 x}{9 x^{2}}-x\) \(23\)
default \(-x -\frac {-2 i \pi -4 \ln \relax (2)-12}{18 x^{2}}+\frac {1}{3 x}\) \(25\)
gosper \(\frac {\left (9 i x^{3}-2 i \ln \relax (2)-3 i x +\pi -6 i\right ) \left (9 x^{3}+2 i \pi +4 \ln \relax (2)+3 x +12\right )}{9 x^{2} \left (-9 i x^{3}-4 i \ln \relax (2)-3 i x +2 \pi -12 i\right )}\) \(66\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/9*(-4*ln(2)-2*I*Pi-9*x^3-3*x-12)/x^3,x,method=_RETURNVERBOSE)

[Out]

1/9*(2*ln(2)+I*Pi+6+3*x)/x^2-x

________________________________________________________________________________________

maxima [A]  time = 0.36, size = 21, normalized size = 0.88 \begin {gather*} -x + \frac {i \, \pi + 3 \, x + 2 \, \log \relax (2) + 6}{9 \, x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/9*(-4*log(2)-2*I*pi-9*x^3-3*x-12)/x^3,x, algorithm="maxima")

[Out]

-x + 1/9*(I*pi + 3*x + 2*log(2) + 6)/x^2

________________________________________________________________________________________

mupad [B]  time = 0.74, size = 21, normalized size = 0.88 \begin {gather*} -x+\frac {\frac {x}{3}+\frac {2\,\ln \relax (2)}{9}+\frac {2}{3}+\frac {\Pi \,1{}\mathrm {i}}{9}}{x^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-((Pi*2i)/9 + x/3 + (4*log(2))/9 + x^3 + 4/3)/x^3,x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.25, size = 22, normalized size = 0.92 \begin {gather*} - x - \frac {- 3 x - 6 - 2 \log {\relax (2 )} - i \pi }{9 x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/9*(-4*ln(2)-2*I*pi-9*x**3-3*x-12)/x**3,x)

[Out]

-x - (-3*x - 6 - 2*log(2) - I*pi)/(9*x**2)

________________________________________________________________________________________