Optimal. Leaf size=28 \[ -3+\frac {3 \left (-5+e^{2 x}\right )}{x+x^2-\frac {x+x^2}{x^2}} \]
________________________________________________________________________________________
Rubi [B] time = 0.84, antiderivative size = 74, normalized size of antiderivative = 2.64, number of steps used = 25, number of rules used = 9, integrand size = 53, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.170, Rules used = {6741, 6742, 44, 207, 77, 88, 2177, 2178, 2269} \begin {gather*} -\frac {3 e^{2 x}}{4 (x+1)}+\frac {15}{4 (x+1)}+\frac {3 e^{2 x}}{2 (x+1)^2}-\frac {15}{2 (x+1)^2}-\frac {3 e^{2 x}}{4 (1-x)}+\frac {15}{4 (1-x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 44
Rule 77
Rule 88
Rule 207
Rule 2177
Rule 2178
Rule 2269
Rule 6741
Rule 6742
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {15-15 x+30 x^2+e^{2 x} \left (-3-3 x-6 x^2+6 x^3\right )}{(1-x)^2 (1+x)^3} \, dx\\ &=\int \left (\frac {15}{(-1+x)^2 (1+x)^3}-\frac {15 x}{(-1+x)^2 (1+x)^3}+\frac {30 x^2}{(-1+x)^2 (1+x)^3}+\frac {3 e^{2 x} \left (-1-x-2 x^2+2 x^3\right )}{(-1+x)^2 (1+x)^3}\right ) \, dx\\ &=3 \int \frac {e^{2 x} \left (-1-x-2 x^2+2 x^3\right )}{(-1+x)^2 (1+x)^3} \, dx+15 \int \frac {1}{(-1+x)^2 (1+x)^3} \, dx-15 \int \frac {x}{(-1+x)^2 (1+x)^3} \, dx+30 \int \frac {x^2}{(-1+x)^2 (1+x)^3} \, dx\\ &=3 \int \left (-\frac {e^{2 x}}{4 (-1+x)^2}-\frac {e^{2 x}}{(1+x)^3}+\frac {5 e^{2 x}}{4 (1+x)^2}+\frac {e^{2 x}}{-1+x^2}\right ) \, dx+15 \int \left (\frac {1}{8 (-1+x)^2}+\frac {1}{4 (1+x)^3}+\frac {1}{4 (1+x)^2}-\frac {3}{8 \left (-1+x^2\right )}\right ) \, dx-15 \int \left (\frac {1}{8 (-1+x)^2}-\frac {1}{4 (1+x)^3}-\frac {1}{8 \left (-1+x^2\right )}\right ) \, dx+30 \int \left (\frac {1}{8 (-1+x)^2}+\frac {1}{4 (1+x)^3}-\frac {1}{4 (1+x)^2}+\frac {1}{8 \left (-1+x^2\right )}\right ) \, dx\\ &=\frac {15}{4 (1-x)}-\frac {15}{2 (1+x)^2}+\frac {15}{4 (1+x)}-\frac {3}{4} \int \frac {e^{2 x}}{(-1+x)^2} \, dx+\frac {15}{8} \int \frac {1}{-1+x^2} \, dx-3 \int \frac {e^{2 x}}{(1+x)^3} \, dx+3 \int \frac {e^{2 x}}{-1+x^2} \, dx+\frac {15}{4} \int \frac {e^{2 x}}{(1+x)^2} \, dx+\frac {15}{4} \int \frac {1}{-1+x^2} \, dx-\frac {45}{8} \int \frac {1}{-1+x^2} \, dx\\ &=\frac {15}{4 (1-x)}-\frac {3 e^{2 x}}{4 (1-x)}-\frac {15}{2 (1+x)^2}+\frac {3 e^{2 x}}{2 (1+x)^2}+\frac {15}{4 (1+x)}-\frac {15 e^{2 x}}{4 (1+x)}-\frac {3}{2} \int \frac {e^{2 x}}{-1+x} \, dx-3 \int \frac {e^{2 x}}{(1+x)^2} \, dx+3 \int \left (-\frac {e^{2 x}}{2 (1-x)}-\frac {e^{2 x}}{2 (1+x)}\right ) \, dx+\frac {15}{2} \int \frac {e^{2 x}}{1+x} \, dx\\ &=\frac {15}{4 (1-x)}-\frac {3 e^{2 x}}{4 (1-x)}-\frac {15}{2 (1+x)^2}+\frac {3 e^{2 x}}{2 (1+x)^2}+\frac {15}{4 (1+x)}-\frac {3 e^{2 x}}{4 (1+x)}-\frac {3}{2} e^2 \text {Ei}(-2 (1-x))+\frac {15 \text {Ei}(2 (1+x))}{2 e^2}-\frac {3}{2} \int \frac {e^{2 x}}{1-x} \, dx-\frac {3}{2} \int \frac {e^{2 x}}{1+x} \, dx-6 \int \frac {e^{2 x}}{1+x} \, dx\\ &=\frac {15}{4 (1-x)}-\frac {3 e^{2 x}}{4 (1-x)}-\frac {15}{2 (1+x)^2}+\frac {3 e^{2 x}}{2 (1+x)^2}+\frac {15}{4 (1+x)}-\frac {3 e^{2 x}}{4 (1+x)}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.37, size = 20, normalized size = 0.71 \begin {gather*} \frac {3 \left (-5+e^{2 x}\right ) x}{(-1+x) (1+x)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.27, size = 25, normalized size = 0.89 \begin {gather*} \frac {3 \, {\left (x e^{\left (2 \, x\right )} - 5 \, x\right )}}{x^{3} + x^{2} - x - 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.19, size = 25, normalized size = 0.89 \begin {gather*} \frac {3 \, {\left (x e^{\left (2 \, x\right )} - 5 \, x\right )}}{x^{3} + x^{2} - x - 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.08, size = 23, normalized size = 0.82
method | result | size |
norman | \(\frac {-15 x +3 x \,{\mathrm e}^{2 x}}{\left (x -1\right ) \left (x +1\right )^{2}}\) | \(23\) |
risch | \(-\frac {15 x}{x^{3}+x^{2}-x -1}+\frac {3 x \,{\mathrm e}^{2 x}}{\left (x -1\right ) \left (x +1\right )^{2}}\) | \(35\) |
default | \(-\frac {15}{2 \left (x +1\right )^{2}}+\frac {15}{4 \left (x +1\right )}-\frac {15}{4 \left (x -1\right )}-\frac {3 \,{\mathrm e}^{2 x}}{4 \left (x +1\right )}+\frac {3 \,{\mathrm e}^{2 x}}{4 \left (x -1\right )}+\frac {3 \,{\mathrm e}^{2 x}}{2 \left (x +1\right )^{2}}\) | \(56\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.41, size = 90, normalized size = 3.21 \begin {gather*} \frac {3 \, x e^{\left (2 \, x\right )}}{x^{3} + x^{2} - x - 1} - \frac {15 \, {\left (3 \, x^{2} + 3 \, x - 2\right )}}{8 \, {\left (x^{3} + x^{2} - x - 1\right )}} + \frac {15 \, {\left (x^{2} + x + 2\right )}}{8 \, {\left (x^{3} + x^{2} - x - 1\right )}} + \frac {15 \, {\left (x^{2} - 3 \, x - 2\right )}}{4 \, {\left (x^{3} + x^{2} - x - 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.46, size = 26, normalized size = 0.93 \begin {gather*} -\frac {x\,\left (3\,{\mathrm {e}}^{2\,x}-15\right )}{-x^3-x^2+x+1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.14, size = 31, normalized size = 1.11 \begin {gather*} \frac {3 x e^{2 x}}{x^{3} + x^{2} - x - 1} - \frac {15 x}{x^{3} + x^{2} - x - 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________