Integrand size = 89, antiderivative size = 25 \[ \int \frac {e^{2 x} \left (-4 x+4 x^2\right )+e^x \left (-4 x^2+4 x^3\right )+e^{2 x} \left (2 e^{2 x}-2 x^2+4 e^x x^2+4 x^3\right )}{e^{4 x} x^2-2 e^{2 x} x^3+x^4} \, dx=\frac {2 \left (1+\frac {e^x}{x}\right )^2 x}{-e^{2 x}+x} \]
[Out]
\[ \int \frac {e^{2 x} \left (-4 x+4 x^2\right )+e^x \left (-4 x^2+4 x^3\right )+e^{2 x} \left (2 e^{2 x}-2 x^2+4 e^x x^2+4 x^3\right )}{e^{4 x} x^2-2 e^{2 x} x^3+x^4} \, dx=\int \frac {e^{2 x} \left (-4 x+4 x^2\right )+e^x \left (-4 x^2+4 x^3\right )+e^{2 x} \left (2 e^{2 x}-2 x^2+4 e^x x^2+4 x^3\right )}{e^{4 x} x^2-2 e^{2 x} x^3+x^4} \, dx \]
[In]
[Out]
Rubi steps \begin{align*} \text {integral}& = \int \frac {2 e^x \left (e^{3 x}+2 e^{2 x} x^2+2 (-1+x) x^2+e^x x \left (-2+x+2 x^2\right )\right )}{\left (e^{2 x}-x\right )^2 x^2} \, dx \\ & = 2 \int \frac {e^x \left (e^{3 x}+2 e^{2 x} x^2+2 (-1+x) x^2+e^x x \left (-2+x+2 x^2\right )\right )}{\left (e^{2 x}-x\right )^2 x^2} \, dx \\ & = 2 \int \left (\frac {e^x (-1+2 x) \left (e^x+2 x+e^x x\right )}{\left (e^{2 x}-x\right )^2 x}+\frac {e^x \left (e^x+2 x^2\right )}{\left (e^{2 x}-x\right ) x^2}\right ) \, dx \\ & = 2 \int \frac {e^x (-1+2 x) \left (e^x+2 x+e^x x\right )}{\left (e^{2 x}-x\right )^2 x} \, dx+2 \int \frac {e^x \left (e^x+2 x^2\right )}{\left (e^{2 x}-x\right ) x^2} \, dx \\ & = 2 \int \left (\frac {2 e^x}{e^{2 x}-x}+\frac {e^{2 x}}{\left (e^{2 x}-x\right ) x^2}\right ) \, dx+2 \int \left (\frac {2 e^x \left (e^x+2 x+e^x x\right )}{\left (e^{2 x}-x\right )^2}-\frac {e^x \left (e^x+2 x+e^x x\right )}{\left (e^{2 x}-x\right )^2 x}\right ) \, dx \\ & = 2 \int \frac {e^{2 x}}{\left (e^{2 x}-x\right ) x^2} \, dx-2 \int \frac {e^x \left (e^x+2 x+e^x x\right )}{\left (e^{2 x}-x\right )^2 x} \, dx+4 \int \frac {e^x}{e^{2 x}-x} \, dx+4 \int \frac {e^x \left (e^x+2 x+e^x x\right )}{\left (e^{2 x}-x\right )^2} \, dx \\ & = -\left (2 \int \left (\frac {2 e^x}{\left (e^{2 x}-x\right )^2}+\frac {e^{2 x}}{\left (e^{2 x}-x\right )^2}+\frac {e^{2 x}}{\left (e^{2 x}-x\right )^2 x}\right ) \, dx\right )+2 \int \frac {e^{2 x}}{\left (e^{2 x}-x\right ) x^2} \, dx+4 \int \frac {e^x}{e^{2 x}-x} \, dx+4 \int \left (\frac {e^{2 x}}{\left (e^{2 x}-x\right )^2}+\frac {2 e^x x}{\left (e^{2 x}-x\right )^2}+\frac {e^{2 x} x}{\left (e^{2 x}-x\right )^2}\right ) \, dx \\ & = -\left (2 \int \frac {e^{2 x}}{\left (e^{2 x}-x\right )^2} \, dx\right )+2 \int \frac {e^{2 x}}{\left (e^{2 x}-x\right ) x^2} \, dx-2 \int \frac {e^{2 x}}{\left (e^{2 x}-x\right )^2 x} \, dx-4 \int \frac {e^x}{\left (e^{2 x}-x\right )^2} \, dx+4 \int \frac {e^{2 x}}{\left (e^{2 x}-x\right )^2} \, dx+4 \int \frac {e^x}{e^{2 x}-x} \, dx+4 \int \frac {e^{2 x} x}{\left (e^{2 x}-x\right )^2} \, dx+8 \int \frac {e^x x}{\left (e^{2 x}-x\right )^2} \, dx \\ & = -\frac {1}{e^{2 x}-x}+\frac {1}{\left (e^{2 x}-x\right ) x}-\frac {2 x}{e^{2 x}-x}+2 \int \frac {1}{\left (e^{2 x}-x\right )^2} \, dx+2 \int \frac {1}{e^{2 x}-x} \, dx+2 \int \frac {e^{2 x}}{\left (e^{2 x}-x\right ) x^2} \, dx+2 \int \frac {x}{\left (e^{2 x}-x\right )^2} \, dx-4 \int \frac {e^x}{\left (e^{2 x}-x\right )^2} \, dx+4 \int \frac {e^x}{e^{2 x}-x} \, dx+8 \int \frac {e^x x}{\left (e^{2 x}-x\right )^2} \, dx-\int \frac {1}{\left (e^{2 x}-x\right )^2} \, dx+\int \frac {1}{\left (e^{2 x}-x\right ) x^2} \, dx-\int \frac {1}{\left (e^{2 x}-x\right )^2 x} \, dx \\ \end{align*}
Time = 4.74 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.92 \[ \int \frac {e^{2 x} \left (-4 x+4 x^2\right )+e^x \left (-4 x^2+4 x^3\right )+e^{2 x} \left (2 e^{2 x}-2 x^2+4 e^x x^2+4 x^3\right )}{e^{4 x} x^2-2 e^{2 x} x^3+x^4} \, dx=\frac {2 \left (e^x+x\right )^2}{x \left (-e^{2 x}+x\right )} \]
[In]
[Out]
Time = 0.15 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.04
method | result | size |
risch | \(-\frac {2}{x}+\frac {2 x +4 \,{\mathrm e}^{x}+2}{x -{\mathrm e}^{2 x}}\) | \(26\) |
parallelrisch | \(-\frac {-2 x^{2}-4 \,{\mathrm e}^{x} x -2 \,{\mathrm e}^{2 x}}{x \left (x -{\mathrm e}^{2 x}\right )}\) | \(33\) |
norman | \(\frac {2 x \,{\mathrm e}^{2 x}+2 \,{\mathrm e}^{2 x}+4 \,{\mathrm e}^{x} x}{x \left (x -{\mathrm e}^{2 x}\right )}\) | \(34\) |
parts | \(\frac {2 \,{\mathrm e}^{2 x}}{x \left (x -{\mathrm e}^{2 x}\right )}+\frac {4 \,{\mathrm e}^{x}}{x -{\mathrm e}^{2 x}}+\frac {2 \,{\mathrm e}^{2 x}}{x -{\mathrm e}^{2 x}}\) | \(51\) |
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.12 \[ \int \frac {e^{2 x} \left (-4 x+4 x^2\right )+e^x \left (-4 x^2+4 x^3\right )+e^{2 x} \left (2 e^{2 x}-2 x^2+4 e^x x^2+4 x^3\right )}{e^{4 x} x^2-2 e^{2 x} x^3+x^4} \, dx=\frac {2 \, {\left (x^{2} + 2 \, x e^{x} + e^{\left (2 \, x\right )}\right )}}{x^{2} - x e^{\left (2 \, x\right )}} \]
[In]
[Out]
Time = 0.10 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.80 \[ \int \frac {e^{2 x} \left (-4 x+4 x^2\right )+e^x \left (-4 x^2+4 x^3\right )+e^{2 x} \left (2 e^{2 x}-2 x^2+4 e^x x^2+4 x^3\right )}{e^{4 x} x^2-2 e^{2 x} x^3+x^4} \, dx=\frac {- 2 x - 4 e^{x} - 2}{- x + e^{2 x}} - \frac {2}{x} \]
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.12 \[ \int \frac {e^{2 x} \left (-4 x+4 x^2\right )+e^x \left (-4 x^2+4 x^3\right )+e^{2 x} \left (2 e^{2 x}-2 x^2+4 e^x x^2+4 x^3\right )}{e^{4 x} x^2-2 e^{2 x} x^3+x^4} \, dx=\frac {2 \, {\left (x^{2} + 2 \, x e^{x} + e^{\left (2 \, x\right )}\right )}}{x^{2} - x e^{\left (2 \, x\right )}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 62 vs. \(2 (23) = 46\).
Time = 0.28 (sec) , antiderivative size = 62, normalized size of antiderivative = 2.48 \[ \int \frac {e^{2 x} \left (-4 x+4 x^2\right )+e^x \left (-4 x^2+4 x^3\right )+e^{2 x} \left (2 e^{2 x}-2 x^2+4 e^x x^2+4 x^3\right )}{e^{4 x} x^2-2 e^{2 x} x^3+x^4} \, dx=\frac {2 \, {\left (x^{3} - x^{2} e^{\left (2 \, x\right )} + 4 \, x^{2} e^{x} - 4 \, x e^{\left (3 \, x\right )} + x e^{\left (2 \, x\right )} - e^{\left (4 \, x\right )}\right )}}{x^{3} - 2 \, x^{2} e^{\left (2 \, x\right )} + x e^{\left (4 \, x\right )}} \]
[In]
[Out]
Time = 14.70 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.84 \[ \int \frac {e^{2 x} \left (-4 x+4 x^2\right )+e^x \left (-4 x^2+4 x^3\right )+e^{2 x} \left (2 e^{2 x}-2 x^2+4 e^x x^2+4 x^3\right )}{e^{4 x} x^2-2 e^{2 x} x^3+x^4} \, dx=\frac {2\,{\left (x+{\mathrm {e}}^x\right )}^2}{x\,\left (x-{\mathrm {e}}^{2\,x}\right )} \]
[In]
[Out]