\(\int \frac {4 (5+i \pi )^2-2 e^8 x^2+4 e^{16} x^4+(5+i \pi ) (-2-8 e^8 x^2)}{(5+i \pi )^2-2 e^8 (5+i \pi ) x^2+e^{16} x^4} \, dx\) [4005]

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

Optimal result

Integrand size = 81, antiderivative size = 23 \[ \int \frac {4 (5+i \pi )^2-2 e^8 x^2+4 e^{16} x^4+(5+i \pi ) \left (-2-8 e^8 x^2\right )}{(5+i \pi )^2-2 e^8 (5+i \pi ) x^2+e^{16} x^4} \, dx=x \left (4-\frac {2}{5+i \pi -e^8 x^2}\right ) \]

[Out]

(4-2/(ln(-exp(5))-x^2*exp(4)^2))*x

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.04, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.049, Rules used = {28, 1828, 21, 8} \[ \int \frac {4 (5+i \pi )^2-2 e^8 x^2+4 e^{16} x^4+(5+i \pi ) \left (-2-8 e^8 x^2\right )}{(5+i \pi )^2-2 e^8 (5+i \pi ) x^2+e^{16} x^4} \, dx=4 x-\frac {2 x}{-e^8 x^2+i \pi +5} \]

[In]

Int[(4*(5 + I*Pi)^2 - 2*E^8*x^2 + 4*E^16*x^4 + (5 + I*Pi)*(-2 - 8*E^8*x^2))/((5 + I*Pi)^2 - 2*E^8*(5 + I*Pi)*x
^2 + E^16*x^4),x]

[Out]

4*x - (2*x)/(5 + I*Pi - E^8*x^2)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 21

Int[(u_.)*((a_) + (b_.)*(v_))^(m_.)*((c_) + (d_.)*(v_))^(n_.), x_Symbol] :> Dist[(b/d)^m, Int[u*(c + d*v)^(m +
 n), x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[b*c - a*d, 0] && IntegerQ[m] && ( !IntegerQ[n] || SimplerQ[c +
 d*x, a + b*x])

Rule 28

Int[(u_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Dist[1/c^p, Int[u*(b/2 + c*x^n)^(2*
p), x], x] /; FreeQ[{a, b, c, n}, x] && EqQ[n2, 2*n] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 1828

Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, a + b*x^2, x], f = Coeff[P
olynomialRemainder[Pq, a + b*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b*x^2, x], x, 1]}, Simp[(a*
g - b*f*x)*((a + b*x^2)^(p + 1)/(2*a*b*(p + 1))), x] + Dist[1/(2*a*(p + 1)), Int[(a + b*x^2)^(p + 1)*ExpandToS
um[2*a*(p + 1)*Q + f*(2*p + 3), x], x], x]] /; FreeQ[{a, b}, x] && PolyQ[Pq, x] && LtQ[p, -1]

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

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.00 \[ \int \frac {4 (5+i \pi )^2-2 e^8 x^2+4 e^{16} x^4+(5+i \pi ) \left (-2-8 e^8 x^2\right )}{(5+i \pi )^2-2 e^8 (5+i \pi ) x^2+e^{16} x^4} \, dx=4 x+\frac {2 x}{-5-i \pi +e^8 x^2} \]

[In]

Integrate[(4*(5 + I*Pi)^2 - 2*E^8*x^2 + 4*E^16*x^4 + (5 + I*Pi)*(-2 - 8*E^8*x^2))/((5 + I*Pi)^2 - 2*E^8*(5 + I
*Pi)*x^2 + E^16*x^4),x]

[Out]

4*x + (2*x)/(-5 - I*Pi + E^8*x^2)

Maple [C] (verified)

Result contains complex when optimal does not.

Time = 3.39 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.96

method result size
risch \(4 x +\frac {2 x}{x^{2} {\mathrm e}^{8}-i \pi -5}\) \(22\)
gosper \(\frac {2 x \left (2 x^{2} {\mathrm e}^{8}-2 \ln \left (-{\mathrm e}^{5}\right )+1\right )}{x^{2} {\mathrm e}^{8}-\ln \left (-{\mathrm e}^{5}\right )}\) \(40\)
parallelrisch \(\frac {\left (4 x^{3} {\mathrm e}^{16}-4 x \,{\mathrm e}^{8} \ln \left (-{\mathrm e}^{5}\right )+2 x \,{\mathrm e}^{8}\right ) {\mathrm e}^{-8}}{x^{2} {\mathrm e}^{8}-\ln \left (-{\mathrm e}^{5}\right )}\) \(53\)
default \(4 x -\frac {2 \left ({\mathrm e}^{16}\right )^{2} {\mathrm e}^{-8} {\mathrm e}^{-16} x}{-x^{2} {\mathrm e}^{16}+\ln \left (-{\mathrm e}^{5}\right ) {\mathrm e}^{8}}\) \(94\)

[In]

int((4*ln(-exp(5))^2+(-8*x^2*exp(4)^2-2)*ln(-exp(5))+4*x^4*exp(4)^4-2*x^2*exp(4)^2)/(ln(-exp(5))^2-2*x^2*exp(4
)^2*ln(-exp(5))+x^4*exp(4)^4),x,method=_RETURNVERBOSE)

[Out]

4*x+2*x/(x^2*exp(8)-I*Pi-5)

Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.24 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.35 \[ \int \frac {4 (5+i \pi )^2-2 e^8 x^2+4 e^{16} x^4+(5+i \pi ) \left (-2-8 e^8 x^2\right )}{(5+i \pi )^2-2 e^8 (5+i \pi ) x^2+e^{16} x^4} \, dx=-\frac {2 \, {\left (2 \, x^{3} e^{8} - 2 i \, \pi x - 9 \, x\right )}}{i \, \pi - x^{2} e^{8} + 5} \]

[In]

integrate((4*log(-exp(5))^2+(-8*x^2*exp(4)^2-2)*log(-exp(5))+4*x^4*exp(4)^4-2*x^2*exp(4)^2)/(log(-exp(5))^2-2*
x^2*exp(4)^2*log(-exp(5))+x^4*exp(4)^4),x, algorithm="fricas")

[Out]

-2*(2*x^3*e^8 - 2*I*pi*x - 9*x)/(I*pi - x^2*e^8 + 5)

Sympy [A] (verification not implemented)

Time = 0.24 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.74 \[ \int \frac {4 (5+i \pi )^2-2 e^8 x^2+4 e^{16} x^4+(5+i \pi ) \left (-2-8 e^8 x^2\right )}{(5+i \pi )^2-2 e^8 (5+i \pi ) x^2+e^{16} x^4} \, dx=4 x + \frac {2 x}{x^{2} e^{8} - 5 - i \pi } \]

[In]

integrate((4*ln(-exp(5))**2+(-8*x**2*exp(4)**2-2)*ln(-exp(5))+4*x**4*exp(4)**4-2*x**2*exp(4)**2)/(ln(-exp(5))*
*2-2*x**2*exp(4)**2*ln(-exp(5))+x**4*exp(4)**4),x)

[Out]

4*x + 2*x/(x**2*exp(8) - 5 - I*pi)

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.00 \[ \int \frac {4 (5+i \pi )^2-2 e^8 x^2+4 e^{16} x^4+(5+i \pi ) \left (-2-8 e^8 x^2\right )}{(5+i \pi )^2-2 e^8 (5+i \pi ) x^2+e^{16} x^4} \, dx=4 \, x + \frac {2 \, x}{x^{2} e^{8} - \log \left (-e^{5}\right )} \]

[In]

integrate((4*log(-exp(5))^2+(-8*x^2*exp(4)^2-2)*log(-exp(5))+4*x^4*exp(4)^4-2*x^2*exp(4)^2)/(log(-exp(5))^2-2*
x^2*exp(4)^2*log(-exp(5))+x^4*exp(4)^4),x, algorithm="maxima")

[Out]

4*x + 2*x/(x^2*e^8 - log(-e^5))

Giac [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.00 \[ \int \frac {4 (5+i \pi )^2-2 e^8 x^2+4 e^{16} x^4+(5+i \pi ) \left (-2-8 e^8 x^2\right )}{(5+i \pi )^2-2 e^8 (5+i \pi ) x^2+e^{16} x^4} \, dx=4 \, x + \frac {2 \, x}{x^{2} e^{8} - \log \left (-e^{5}\right )} \]

[In]

integrate((4*log(-exp(5))^2+(-8*x^2*exp(4)^2-2)*log(-exp(5))+4*x^4*exp(4)^4-2*x^2*exp(4)^2)/(log(-exp(5))^2-2*
x^2*exp(4)^2*log(-exp(5))+x^4*exp(4)^4),x, algorithm="giac")

[Out]

4*x + 2*x/(x^2*e^8 - log(-e^5))

Mupad [B] (verification not implemented)

Time = 0.24 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.96 \[ \int \frac {4 (5+i \pi )^2-2 e^8 x^2+4 e^{16} x^4+(5+i \pi ) \left (-2-8 e^8 x^2\right )}{(5+i \pi )^2-2 e^8 (5+i \pi ) x^2+e^{16} x^4} \, dx=4\,x-\frac {2\,x}{\ln \left (-{\mathrm {e}}^5\right )-x^2\,{\mathrm {e}}^8} \]

[In]

int(-(log(-exp(5))*(8*x^2*exp(8) + 2) - 4*log(-exp(5))^2 + 2*x^2*exp(8) - 4*x^4*exp(16))/(log(-exp(5))^2 + x^4
*exp(16) - 2*x^2*log(-exp(5))*exp(8)),x)

[Out]

4*x - (2*x)/(log(-exp(5)) - x^2*exp(8))