\(\int \frac {-24+8 e^6+e^{2 x}+2 x-x^2}{24-8 e^6+e^{2 x}+x^2} \, dx\) [9976]

   Optimal result
   Rubi [F]
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (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 = 38, antiderivative size = 22 \[ \int \frac {-24+8 e^6+e^{2 x}+2 x-x^2}{24-8 e^6+e^{2 x}+x^2} \, dx=\log \left (e^x+e^{-x} \left (-8 \left (-3+e^6\right )+x^2\right )\right ) \]

[Out]

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

Rubi [F]

\[ \int \frac {-24+8 e^6+e^{2 x}+2 x-x^2}{24-8 e^6+e^{2 x}+x^2} \, dx=\int \frac {-24+8 e^6+e^{2 x}+2 x-x^2}{24-8 e^6+e^{2 x}+x^2} \, dx \]

[In]

Int[(-24 + 8*E^6 + E^(2*x) + 2*x - x^2)/(24 - 8*E^6 + E^(2*x) + x^2),x]

[Out]

x + 2*Defer[Int][x^2/(-E^(2*x) - 24*(1 - E^6/3) - x^2), x] - 16*(3 - E^6)*Defer[Int][(E^(2*x) + 24*(1 - E^6/3)
 + x^2)^(-1), x] + 2*Defer[Int][x/(E^(2*x) + 24*(1 - E^6/3) + x^2), x]

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

Mathematica [A] (verified)

Time = 0.65 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.91 \[ \int \frac {-24+8 e^6+e^{2 x}+2 x-x^2}{24-8 e^6+e^{2 x}+x^2} \, dx=-x+\log \left (24-8 e^6+e^{2 x}+x^2\right ) \]

[In]

Integrate[(-24 + 8*E^6 + E^(2*x) + 2*x - x^2)/(24 - 8*E^6 + E^(2*x) + x^2),x]

[Out]

-x + Log[24 - 8*E^6 + E^(2*x) + x^2]

Maple [A] (verified)

Time = 0.98 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.86

method result size
risch \(-x +\ln \left ({\mathrm e}^{2 x}-8 \,{\mathrm e}^{6}+x^{2}+24\right )\) \(19\)
parallelrisch \(-x +\ln \left ({\mathrm e}^{2 x}-8 \,{\mathrm e}^{6}+x^{2}+24\right )\) \(21\)
norman \(-x +\ln \left (-{\mathrm e}^{2 x}+8 \,{\mathrm e}^{6}-x^{2}-24\right )\) \(25\)

[In]

int((exp(x)^2+8*exp(3)^2-x^2+2*x-24)/(exp(x)^2-8*exp(3)^2+x^2+24),x,method=_RETURNVERBOSE)

[Out]

-x+ln(exp(2*x)-8*exp(6)+x^2+24)

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.82 \[ \int \frac {-24+8 e^6+e^{2 x}+2 x-x^2}{24-8 e^6+e^{2 x}+x^2} \, dx=-x + \log \left (x^{2} - 8 \, e^{6} + e^{\left (2 \, x\right )} + 24\right ) \]

[In]

integrate((exp(x)^2+8*exp(3)^2-x^2+2*x-24)/(exp(x)^2-8*exp(3)^2+x^2+24),x, algorithm="fricas")

[Out]

-x + log(x^2 - 8*e^6 + e^(2*x) + 24)

Sympy [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.77 \[ \int \frac {-24+8 e^6+e^{2 x}+2 x-x^2}{24-8 e^6+e^{2 x}+x^2} \, dx=- x + \log {\left (x^{2} + e^{2 x} - 8 e^{6} + 24 \right )} \]

[In]

integrate((exp(x)**2+8*exp(3)**2-x**2+2*x-24)/(exp(x)**2-8*exp(3)**2+x**2+24),x)

[Out]

-x + log(x**2 + exp(2*x) - 8*exp(6) + 24)

Maxima [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.82 \[ \int \frac {-24+8 e^6+e^{2 x}+2 x-x^2}{24-8 e^6+e^{2 x}+x^2} \, dx=-x + \log \left (x^{2} - 8 \, e^{6} + e^{\left (2 \, x\right )} + 24\right ) \]

[In]

integrate((exp(x)^2+8*exp(3)^2-x^2+2*x-24)/(exp(x)^2-8*exp(3)^2+x^2+24),x, algorithm="maxima")

[Out]

-x + log(x^2 - 8*e^6 + e^(2*x) + 24)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.00 \[ \int \frac {-24+8 e^6+e^{2 x}+2 x-x^2}{24-8 e^6+e^{2 x}+x^2} \, dx=-x + \log \left (-x^{2} + 8 \, e^{6} - e^{\left (2 \, x\right )} - 24\right ) \]

[In]

integrate((exp(x)^2+8*exp(3)^2-x^2+2*x-24)/(exp(x)^2-8*exp(3)^2+x^2+24),x, algorithm="giac")

[Out]

-x + log(-x^2 + 8*e^6 - e^(2*x) - 24)

Mupad [B] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.82 \[ \int \frac {-24+8 e^6+e^{2 x}+2 x-x^2}{24-8 e^6+e^{2 x}+x^2} \, dx=\ln \left ({\mathrm {e}}^{2\,x}-8\,{\mathrm {e}}^6+x^2+24\right )-x \]

[In]

int((2*x + exp(2*x) + 8*exp(6) - x^2 - 24)/(exp(2*x) - 8*exp(6) + x^2 + 24),x)

[Out]

log(exp(2*x) - 8*exp(6) + x^2 + 24) - x