Optimal. Leaf size=22 \[ \left (5+2 e^x\right ) (-8+3 x) \log \left (-1+x-x^2\right ) \]
________________________________________________________________________________________
Rubi [B] time = 1.03, antiderivative size = 57, normalized size of antiderivative = 2.59, number of steps used = 31, number of rules used = 11, integrand size = 74, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.149, Rules used = {6688, 6728, 773, 634, 618, 204, 628, 2194, 2178, 2176, 2554} \begin {gather*} -6 e^x \log \left (-x^2+x-1\right )-2 e^x (5-3 x) \log \left (-x^2+x-1\right )+15 x \log \left (-x^2+x-1\right )-40 \log \left (x^2-x+1\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 204
Rule 618
Rule 628
Rule 634
Rule 773
Rule 2176
Rule 2178
Rule 2194
Rule 2554
Rule 6688
Rule 6728
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (\frac {\left (5+2 e^x\right ) \left (8-19 x+6 x^2\right )}{1-x+x^2}+\left (15+2 e^x (-5+3 x)\right ) \log \left (-1+x-x^2\right )\right ) \, dx\\ &=\int \frac {\left (5+2 e^x\right ) \left (8-19 x+6 x^2\right )}{1-x+x^2} \, dx+\int \left (15+2 e^x (-5+3 x)\right ) \log \left (-1+x-x^2\right ) \, dx\\ &=-6 e^x \log \left (-1+x-x^2\right )-2 e^x (5-3 x) \log \left (-1+x-x^2\right )+15 x \log \left (-1+x-x^2\right )-\int \frac {(1-2 x) \left (-15 x-2 e^x (-8+3 x)\right )}{1-x+x^2} \, dx+\int \left (\frac {5 (-1+2 x) (-8+3 x)}{1-x+x^2}+\frac {2 e^x (-1+2 x) (-8+3 x)}{1-x+x^2}\right ) \, dx\\ &=-6 e^x \log \left (-1+x-x^2\right )-2 e^x (5-3 x) \log \left (-1+x-x^2\right )+15 x \log \left (-1+x-x^2\right )+2 \int \frac {e^x (-1+2 x) (-8+3 x)}{1-x+x^2} \, dx+5 \int \frac {(-1+2 x) (-8+3 x)}{1-x+x^2} \, dx-\int \left (\frac {15 x (-1+2 x)}{1-x+x^2}+\frac {2 e^x (-1+2 x) (-8+3 x)}{1-x+x^2}\right ) \, dx\\ &=30 x-6 e^x \log \left (-1+x-x^2\right )-2 e^x (5-3 x) \log \left (-1+x-x^2\right )+15 x \log \left (-1+x-x^2\right )-2 \int \frac {e^x (-1+2 x) (-8+3 x)}{1-x+x^2} \, dx+2 \int \left (6 e^x+\frac {e^x (2-13 x)}{1-x+x^2}\right ) \, dx+5 \int \frac {2-13 x}{1-x+x^2} \, dx-15 \int \frac {x (-1+2 x)}{1-x+x^2} \, dx\\ &=-6 e^x \log \left (-1+x-x^2\right )-2 e^x (5-3 x) \log \left (-1+x-x^2\right )+15 x \log \left (-1+x-x^2\right )+2 \int \frac {e^x (2-13 x)}{1-x+x^2} \, dx-2 \int \left (6 e^x+\frac {e^x (2-13 x)}{1-x+x^2}\right ) \, dx+12 \int e^x \, dx-15 \int \frac {-2+x}{1-x+x^2} \, dx-\frac {45}{2} \int \frac {1}{1-x+x^2} \, dx-\frac {65}{2} \int \frac {-1+2 x}{1-x+x^2} \, dx\\ &=12 e^x-6 e^x \log \left (-1+x-x^2\right )-2 e^x (5-3 x) \log \left (-1+x-x^2\right )+15 x \log \left (-1+x-x^2\right )-\frac {65}{2} \log \left (1-x+x^2\right )-2 \int \frac {e^x (2-13 x)}{1-x+x^2} \, dx+2 \int \left (\frac {\left (-13+3 i \sqrt {3}\right ) e^x}{-1-i \sqrt {3}+2 x}+\frac {\left (-13-3 i \sqrt {3}\right ) e^x}{-1+i \sqrt {3}+2 x}\right ) \, dx-\frac {15}{2} \int \frac {-1+2 x}{1-x+x^2} \, dx-12 \int e^x \, dx+\frac {45}{2} \int \frac {1}{1-x+x^2} \, dx+45 \operatorname {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,-1+2 x\right )\\ &=15 \sqrt {3} \tan ^{-1}\left (\frac {1-2 x}{\sqrt {3}}\right )-6 e^x \log \left (-1+x-x^2\right )-2 e^x (5-3 x) \log \left (-1+x-x^2\right )+15 x \log \left (-1+x-x^2\right )-40 \log \left (1-x+x^2\right )-2 \int \left (\frac {\left (-13+3 i \sqrt {3}\right ) e^x}{-1-i \sqrt {3}+2 x}+\frac {\left (-13-3 i \sqrt {3}\right ) e^x}{-1+i \sqrt {3}+2 x}\right ) \, dx-45 \operatorname {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,-1+2 x\right )-\left (2 \left (13-3 i \sqrt {3}\right )\right ) \int \frac {e^x}{-1-i \sqrt {3}+2 x} \, dx-\left (2 \left (13+3 i \sqrt {3}\right )\right ) \int \frac {e^x}{-1+i \sqrt {3}+2 x} \, dx\\ &=-\left (\left (13-3 i \sqrt {3}\right ) e^{\frac {1}{2}+\frac {i \sqrt {3}}{2}} \text {Ei}\left (\frac {1}{2} \left (-1-i \sqrt {3}+2 x\right )\right )\right )-\left (13+3 i \sqrt {3}\right ) e^{\frac {1}{2}-\frac {i \sqrt {3}}{2}} \text {Ei}\left (\frac {1}{2} \left (-1+i \sqrt {3}+2 x\right )\right )-6 e^x \log \left (-1+x-x^2\right )-2 e^x (5-3 x) \log \left (-1+x-x^2\right )+15 x \log \left (-1+x-x^2\right )-40 \log \left (1-x+x^2\right )+\left (2 \left (13-3 i \sqrt {3}\right )\right ) \int \frac {e^x}{-1-i \sqrt {3}+2 x} \, dx+\left (2 \left (13+3 i \sqrt {3}\right )\right ) \int \frac {e^x}{-1+i \sqrt {3}+2 x} \, dx\\ &=-6 e^x \log \left (-1+x-x^2\right )-2 e^x (5-3 x) \log \left (-1+x-x^2\right )+15 x \log \left (-1+x-x^2\right )-40 \log \left (1-x+x^2\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.22, size = 37, normalized size = 1.68 \begin {gather*} \left (-16 e^x+15 x+6 e^x x\right ) \log \left (-1+x-x^2\right )-40 \log \left (1-x+x^2\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.55, size = 24, normalized size = 1.09 \begin {gather*} {\left (2 \, {\left (3 \, x - 8\right )} e^{x} + 15 \, x - 40\right )} \log \left (-x^{2} + x - 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.19, size = 51, normalized size = 2.32 \begin {gather*} 6 \, x e^{x} \log \left (-x^{2} + x - 1\right ) + 15 \, x \log \left (-x^{2} + x - 1\right ) - 16 \, e^{x} \log \left (-x^{2} + x - 1\right ) - 40 \, \log \left (x^{2} - x + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.83, size = 36, normalized size = 1.64
method | result | size |
risch | \(\left (6 \,{\mathrm e}^{x} x +15 x -16 \,{\mathrm e}^{x}\right ) \ln \left (-x^{2}+x -1\right )-40 \ln \left (x^{2}-x +1\right )\) | \(36\) |
default | \(-16 \,{\mathrm e}^{x} \ln \left (-x^{2}+x -1\right )+6 \,{\mathrm e}^{x} \ln \left (-x^{2}+x -1\right ) x -40 \ln \left (x^{2}-x +1\right )+15 \ln \left (-x^{2}+x -1\right ) x\) | \(52\) |
norman | \(-16 \,{\mathrm e}^{x} \ln \left (-x^{2}+x -1\right )+6 \,{\mathrm e}^{x} \ln \left (-x^{2}+x -1\right ) x -40 \ln \left (x^{2}-x +1\right )+15 \ln \left (-x^{2}+x -1\right ) x\) | \(52\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.48, size = 37, normalized size = 1.68 \begin {gather*} \frac {1}{2} \, {\left (4 \, {\left (3 \, x - 8\right )} e^{x} + 30 \, x - 15\right )} \log \left (-x^{2} + x - 1\right ) - \frac {65}{2} \, \log \left (x^{2} - x + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 5.91, size = 34, normalized size = 1.55 \begin {gather*} \ln \left (-x^2+x-1\right )\,\left (15\,x+{\mathrm {e}}^x\,\left (6\,x-16\right )\right )-40\,\ln \left (x^2-x+1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.52, size = 46, normalized size = 2.09 \begin {gather*} 15 x \log {\left (- x^{2} + x - 1 \right )} + \left (6 x \log {\left (- x^{2} + x - 1 \right )} - 16 \log {\left (- x^{2} + x - 1 \right )}\right ) e^{x} - 40 \log {\left (x^{2} - x + 1 \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________