3.18.24 \(\int \frac {9+6 x (i \pi +\log (25))+(-1+x^2) (i \pi +\log (25))^2}{36+24 x (i \pi +\log (25))+4 x^2 (i \pi +\log (25))^2} \, dx\)

Optimal. Leaf size=23 \[ \frac {1}{4} \left (-3+x+\frac {1}{x+\frac {3}{i \pi +\log (25)}}\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 35, normalized size of antiderivative = 1.52, number of steps used = 5, number of rules used = 4, integrand size = 60, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {27, 6, 12, 1850} \begin {gather*} \frac {x}{4}-\frac {\pi -i \log (25)}{4 (3 i-x (\pi -i \log (25)))} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(9 + 6*x*(I*Pi + Log[25]) + (-1 + x^2)*(I*Pi + Log[25])^2)/(36 + 24*x*(I*Pi + Log[25]) + 4*x^2*(I*Pi + Log
[25])^2),x]

[Out]

x/4 - (Pi - I*Log[25])/(4*(3*I - x*(Pi - I*Log[25])))

Rule 6

Int[(u_.)*((w_.) + (a_.)*(v_) + (b_.)*(v_))^(p_.), x_Symbol] :> Int[u*((a + b)*v + w)^p, x] /; FreeQ[{a, b}, x
] &&  !FreeQ[v, x]

Rule 12

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

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 1850

Int[(Pq_)*((a_) + (b_.)*(x_)^(n_.))^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x^n)^p, x], x] /; FreeQ[
{a, b, n}, x] && PolyQ[Pq, x] && (IGtQ[p, 0] || EqQ[n, 1])

Rubi steps

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

________________________________________________________________________________________

Mathematica [B]  time = 0.04, size = 76, normalized size = 3.30 \begin {gather*} -\frac {9-\pi ^2 \left (1+x^2\right )+6 x \log (25)+\log ^2(25)+x^2 \log ^2(25)+2 i \pi \left (3 x+\log (25)+x^2 \log (25)\right )}{4 (\pi -i \log (25)) (\pi x-i (3+x \log (25)))} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(9 + 6*x*(I*Pi + Log[25]) + (-1 + x^2)*(I*Pi + Log[25])^2)/(36 + 24*x*(I*Pi + Log[25]) + 4*x^2*(I*Pi
 + Log[25])^2),x]

[Out]

-1/4*(9 - Pi^2*(1 + x^2) + 6*x*Log[25] + Log[25]^2 + x^2*Log[25]^2 + (2*I)*Pi*(3*x + Log[25] + x^2*Log[25]))/(
(Pi - I*Log[25])*(Pi*x - I*(3 + x*Log[25])))

________________________________________________________________________________________

fricas [A]  time = 0.60, size = 36, normalized size = 1.57 \begin {gather*} \frac {i \, \pi + i \, \pi x^{2} + 2 \, {\left (x^{2} + 1\right )} \log \relax (5) + 3 \, x}{4 i \, \pi x + 8 \, x \log \relax (5) + 12} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.20, size = 62, normalized size = 2.70 \begin {gather*} \frac {\pi ^{2} x - 4 i \, \pi x \log \relax (5) - 4 \, x \log \relax (5)^{2}}{4 \, {\left (\pi ^{2} - 4 i \, \pi \log \relax (5) - 4 \, \log \relax (5)^{2}\right )}} + \frac {-i \, \pi - 2 \, \log \relax (5)}{4 \, {\left (-i \, \pi x - 2 \, x \log \relax (5) - 3\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.70, size = 41, normalized size = 1.78




method result size



risch \(\frac {x}{4}-\frac {i \ln \relax (5)}{2 \left (-2 i x \ln \relax (5)+\pi x -3 i\right )}+\frac {\pi }{-8 i x \ln \relax (5)+4 \pi x -12 i}\) \(41\)
default \(\frac {x}{4}-\frac {-\pi ^{2}+4 i \pi \ln \relax (5)+4 \ln \relax (5)^{2}}{4 \left (-2 i \ln \relax (5)+\pi \right ) \left (-2 i x \ln \relax (5)+\pi x -3 i\right )}\) \(48\)
norman \(\frac {\left (\frac {\pi ^{2}}{4}+\ln \relax (5)^{2}\right ) x^{3}+\left (\frac {9}{4}+\frac {\pi ^{2}}{4}-\ln \relax (5)^{2}-i \pi \ln \relax (5)\right ) x +\left (-\frac {i \pi ^{3}}{12}-\frac {i \pi \ln \relax (5)^{2}}{3}-\frac {\pi ^{2} \ln \relax (5)}{6}-\frac {2 \ln \relax (5)^{3}}{3}+3 \ln \relax (5)\right ) x^{2}}{\pi ^{2} x^{2}+4 x^{2} \ln \relax (5)^{2}+12 x \ln \relax (5)+9}\) \(99\)
gosper \(-\frac {\left (-2 i x \ln \relax (5)+\pi x -3 i\right ) x \left (4 \pi \ln \relax (5)+i \pi ^{2}-4 i \ln \relax (5)^{2}+6 i x \ln \relax (5)-3 \pi x +9 i\right ) \left (-4 i \pi \ln \relax (5) x^{2}+\pi ^{2} x^{2}-4 x^{2} \ln \relax (5)^{2}+4 i \pi \ln \relax (5)-6 i \pi x -\pi ^{2}+4 \ln \relax (5)^{2}-12 x \ln \relax (5)-9\right )}{12 \left (-2 i x \ln \relax (5)+\pi x -2 i \ln \relax (5)+\pi -3 i\right ) \left (-2 i x \ln \relax (5)+\pi x +2 i \ln \relax (5)-\pi -3 i\right ) \left (-4 i \pi \ln \relax (5) x^{2}+\pi ^{2} x^{2}-4 x^{2} \ln \relax (5)^{2}-6 i \pi x -12 x \ln \relax (5)-9\right )}\) \(182\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((x^2-1)*(2*ln(5)+I*Pi)^2+6*x*(2*ln(5)+I*Pi)+9)/(4*x^2*(2*ln(5)+I*Pi)^2+24*x*(2*ln(5)+I*Pi)+36),x,method=_
RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.38, size = 28, normalized size = 1.22 \begin {gather*} \frac {1}{4} \, x + \frac {i \, \pi + 2 \, \log \relax (5)}{4 \, {\left ({\left (i \, \pi + 2 \, \log \relax (5)\right )} x + 3\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.59, size = 43, normalized size = 1.87 \begin {gather*} \frac {-\Pi +x\,3{}\mathrm {i}+\ln \relax (5)\,2{}\mathrm {i}-\Pi \,x^2+x^2\,\ln \relax (5)\,2{}\mathrm {i}}{4\,\left (-\Pi \,x+x\,\ln \relax (5)\,2{}\mathrm {i}+3{}\mathrm {i}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.53, size = 24, normalized size = 1.04 \begin {gather*} \frac {x}{4} + \frac {2 \log {\relax (5 )} + i \pi }{x \left (8 \log {\relax (5 )} + 4 i \pi \right ) + 12} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x/4 + (2*log(5) + I*pi)/(x*(8*log(5) + 4*I*pi) + 12)

________________________________________________________________________________________