\(\int \frac {260+96 e^{2 x}+5 e^{4 x}+2 x-x^2}{256+32 e^{2 x}+e^{4 x}+4 x-x^2} \, dx\) [5954]

   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 = 49, antiderivative size = 27 \[ \int \frac {260+96 e^{2 x}+5 e^{4 x}+2 x-x^2}{256+32 e^{2 x}+e^{4 x}+4 x-x^2} \, dx=\log \left (e^x \left (x+\frac {1}{3} \left (\left (16+e^{2 x}\right )^2+x-x^2\right )\right )\right ) \]

[Out]

ln(exp(x)*(4/3*x-1/3*x^2+1/3*(exp(2*x)+16)^2))

Rubi [F]

\[ \int \frac {260+96 e^{2 x}+5 e^{4 x}+2 x-x^2}{256+32 e^{2 x}+e^{4 x}+4 x-x^2} \, dx=\int \frac {260+96 e^{2 x}+5 e^{4 x}+2 x-x^2}{256+32 e^{2 x}+e^{4 x}+4 x-x^2} \, dx \]

[In]

Int[(260 + 96*E^(2*x) + 5*E^(4*x) + 2*x - x^2)/(256 + 32*E^(2*x) + E^(4*x) + 4*x - x^2),x]

[Out]

5*x - 1020*Defer[Int][(256 + 32*E^(2*x) + E^(4*x) + 4*x - x^2)^(-1), x] - 64*Defer[Int][E^(2*x)/(256 + 32*E^(2
*x) + E^(4*x) + 4*x - x^2), x] + 18*Defer[Int][x/(-256 - 32*E^(2*x) - E^(4*x) - 4*x + x^2), x] - 4*Defer[Int][
x^2/(-256 - 32*E^(2*x) - E^(4*x) - 4*x + x^2), x]

Rubi steps \begin{align*} \text {integral}& = \int \left (5-\frac {2 \left (510+32 e^{2 x}+9 x-2 x^2\right )}{256+32 e^{2 x}+e^{4 x}+4 x-x^2}\right ) \, dx \\ & = 5 x-2 \int \frac {510+32 e^{2 x}+9 x-2 x^2}{256+32 e^{2 x}+e^{4 x}+4 x-x^2} \, dx \\ & = 5 x-2 \int \left (\frac {510}{256+32 e^{2 x}+e^{4 x}+4 x-x^2}+\frac {32 e^{2 x}}{256+32 e^{2 x}+e^{4 x}+4 x-x^2}-\frac {9 x}{-256-32 e^{2 x}-e^{4 x}-4 x+x^2}+\frac {2 x^2}{-256-32 e^{2 x}-e^{4 x}-4 x+x^2}\right ) \, dx \\ & = 5 x-4 \int \frac {x^2}{-256-32 e^{2 x}-e^{4 x}-4 x+x^2} \, dx+18 \int \frac {x}{-256-32 e^{2 x}-e^{4 x}-4 x+x^2} \, dx-64 \int \frac {e^{2 x}}{256+32 e^{2 x}+e^{4 x}+4 x-x^2} \, dx-1020 \int \frac {1}{256+32 e^{2 x}+e^{4 x}+4 x-x^2} \, dx \\ \end{align*}

Mathematica [A] (verified)

Time = 0.37 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.93 \[ \int \frac {260+96 e^{2 x}+5 e^{4 x}+2 x-x^2}{256+32 e^{2 x}+e^{4 x}+4 x-x^2} \, dx=x+\log \left (256+32 e^{2 x}+e^{4 x}+4 x-x^2\right ) \]

[In]

Integrate[(260 + 96*E^(2*x) + 5*E^(4*x) + 2*x - x^2)/(256 + 32*E^(2*x) + E^(4*x) + 4*x - x^2),x]

[Out]

x + Log[256 + 32*E^(2*x) + E^(4*x) + 4*x - x^2]

Maple [A] (verified)

Time = 0.16 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.89

method result size
risch \(x +\ln \left ({\mathrm e}^{4 x}+32 \,{\mathrm e}^{2 x}-x^{2}+4 x +256\right )\) \(24\)
norman \(x +\ln \left (x^{2}-{\mathrm e}^{4 x}-4 x -32 \,{\mathrm e}^{2 x}-256\right )\) \(26\)
parallelrisch \(x +\ln \left (x^{2}-{\mathrm e}^{4 x}-4 x -32 \,{\mathrm e}^{2 x}-256\right )\) \(26\)

[In]

int((5*exp(2*x)^2+96*exp(2*x)-x^2+2*x+260)/(exp(2*x)^2+32*exp(2*x)-x^2+4*x+256),x,method=_RETURNVERBOSE)

[Out]

x+ln(exp(4*x)+32*exp(2*x)-x^2+4*x+256)

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.85 \[ \int \frac {260+96 e^{2 x}+5 e^{4 x}+2 x-x^2}{256+32 e^{2 x}+e^{4 x}+4 x-x^2} \, dx=x + \log \left (-x^{2} + 4 \, x + e^{\left (4 \, x\right )} + 32 \, e^{\left (2 \, x\right )} + 256\right ) \]

[In]

integrate((5*exp(2*x)^2+96*exp(2*x)-x^2+2*x+260)/(exp(2*x)^2+32*exp(2*x)-x^2+4*x+256),x, algorithm="fricas")

[Out]

x + log(-x^2 + 4*x + e^(4*x) + 32*e^(2*x) + 256)

Sympy [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.81 \[ \int \frac {260+96 e^{2 x}+5 e^{4 x}+2 x-x^2}{256+32 e^{2 x}+e^{4 x}+4 x-x^2} \, dx=x + \log {\left (- x^{2} + 4 x + e^{4 x} + 32 e^{2 x} + 256 \right )} \]

[In]

integrate((5*exp(2*x)**2+96*exp(2*x)-x**2+2*x+260)/(exp(2*x)**2+32*exp(2*x)-x**2+4*x+256),x)

[Out]

x + log(-x**2 + 4*x + exp(4*x) + 32*exp(2*x) + 256)

Maxima [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.85 \[ \int \frac {260+96 e^{2 x}+5 e^{4 x}+2 x-x^2}{256+32 e^{2 x}+e^{4 x}+4 x-x^2} \, dx=x + \log \left (-x^{2} + 4 \, x + e^{\left (4 \, x\right )} + 32 \, e^{\left (2 \, x\right )} + 256\right ) \]

[In]

integrate((5*exp(2*x)^2+96*exp(2*x)-x^2+2*x+260)/(exp(2*x)^2+32*exp(2*x)-x^2+4*x+256),x, algorithm="maxima")

[Out]

x + log(-x^2 + 4*x + e^(4*x) + 32*e^(2*x) + 256)

Giac [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.85 \[ \int \frac {260+96 e^{2 x}+5 e^{4 x}+2 x-x^2}{256+32 e^{2 x}+e^{4 x}+4 x-x^2} \, dx=x + \log \left (-x^{2} + 4 \, x + e^{\left (4 \, x\right )} + 32 \, e^{\left (2 \, x\right )} + 256\right ) \]

[In]

integrate((5*exp(2*x)^2+96*exp(2*x)-x^2+2*x+260)/(exp(2*x)^2+32*exp(2*x)-x^2+4*x+256),x, algorithm="giac")

[Out]

x + log(-x^2 + 4*x + e^(4*x) + 32*e^(2*x) + 256)

Mupad [B] (verification not implemented)

Time = 11.44 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.85 \[ \int \frac {260+96 e^{2 x}+5 e^{4 x}+2 x-x^2}{256+32 e^{2 x}+e^{4 x}+4 x-x^2} \, dx=x+\ln \left (x^2-32\,{\mathrm {e}}^{2\,x}-{\mathrm {e}}^{4\,x}-4\,x-256\right ) \]

[In]

int((2*x + 96*exp(2*x) + 5*exp(4*x) - x^2 + 260)/(4*x + 32*exp(2*x) + exp(4*x) - x^2 + 256),x)

[Out]

x + log(x^2 - 32*exp(2*x) - exp(4*x) - 4*x - 256)