Integrand size = 74, antiderivative size = 22 \[ \int \frac {40-95 x+30 x^2+e^x \left (16-38 x+12 x^2\right )+\left (15-15 x+15 x^2+e^x \left (-10+16 x-16 x^2+6 x^3\right )\right ) \log \left (-1+x-x^2\right )}{1-x+x^2} \, dx=\left (5+2 e^x\right ) (-8+3 x) \log \left (-1+x-x^2\right ) \]
[Out]
Leaf count is larger than twice the leaf count of optimal. \(57\) vs. \(2(22)=44\).
Time = 0.65 (sec) , antiderivative size = 57, normalized size of antiderivative = 2.59, number of steps used = 31, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.149, Rules used = {6820, 6860, 787, 648, 632, 210, 642, 2225, 2209, 2207, 2634} \[ \int \frac {40-95 x+30 x^2+e^x \left (16-38 x+12 x^2\right )+\left (15-15 x+15 x^2+e^x \left (-10+16 x-16 x^2+6 x^3\right )\right ) \log \left (-1+x-x^2\right )}{1-x+x^2} \, dx=-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 ) \]
[In]
[Out]
Rule 210
Rule 632
Rule 642
Rule 648
Rule 787
Rule 2207
Rule 2209
Rule 2225
Rule 2634
Rule 6820
Rule 6860
Rubi steps \begin{align*} \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 \text {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,-1+2 x\right ) \\ & = 15 \sqrt {3} \arctan \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 \text {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}} \operatorname {ExpIntegralEi}\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}} \operatorname {ExpIntegralEi}\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{align*}
Time = 0.89 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.68 \[ \int \frac {40-95 x+30 x^2+e^x \left (16-38 x+12 x^2\right )+\left (15-15 x+15 x^2+e^x \left (-10+16 x-16 x^2+6 x^3\right )\right ) \log \left (-1+x-x^2\right )}{1-x+x^2} \, dx=\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 ) \]
[In]
[Out]
Time = 2.47 (sec) , antiderivative size = 36, normalized size of antiderivative = 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 | \(-40 \ln \left (-x^{2}+x -1\right )-16 \,{\mathrm e}^{x} \ln \left (-x^{2}+x -1\right )+15 \ln \left (-x^{2}+x -1\right ) x +6 \,{\mathrm e}^{x} \ln \left (-x^{2}+x -1\right ) x\) | \(52\) |
parallelrisch | \(-40 \ln \left (-x^{2}+x -1\right )-16 \,{\mathrm e}^{x} \ln \left (-x^{2}+x -1\right )+15 \ln \left (-x^{2}+x -1\right ) x +6 \,{\mathrm e}^{x} \ln \left (-x^{2}+x -1\right ) x\) | \(52\) |
parts | \(-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\) |
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.09 \[ \int \frac {40-95 x+30 x^2+e^x \left (16-38 x+12 x^2\right )+\left (15-15 x+15 x^2+e^x \left (-10+16 x-16 x^2+6 x^3\right )\right ) \log \left (-1+x-x^2\right )}{1-x+x^2} \, dx={\left (2 \, {\left (3 \, x - 8\right )} e^{x} + 15 \, x - 40\right )} \log \left (-x^{2} + x - 1\right ) \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 46 vs. \(2 (19) = 38\).
Time = 0.21 (sec) , antiderivative size = 46, normalized size of antiderivative = 2.09 \[ \int \frac {40-95 x+30 x^2+e^x \left (16-38 x+12 x^2\right )+\left (15-15 x+15 x^2+e^x \left (-10+16 x-16 x^2+6 x^3\right )\right ) \log \left (-1+x-x^2\right )}{1-x+x^2} \, dx=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 )} \]
[In]
[Out]
none
Time = 0.32 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.68 \[ \int \frac {40-95 x+30 x^2+e^x \left (16-38 x+12 x^2\right )+\left (15-15 x+15 x^2+e^x \left (-10+16 x-16 x^2+6 x^3\right )\right ) \log \left (-1+x-x^2\right )}{1-x+x^2} \, dx=\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 ) \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 51 vs. \(2 (21) = 42\).
Time = 0.28 (sec) , antiderivative size = 51, normalized size of antiderivative = 2.32 \[ \int \frac {40-95 x+30 x^2+e^x \left (16-38 x+12 x^2\right )+\left (15-15 x+15 x^2+e^x \left (-10+16 x-16 x^2+6 x^3\right )\right ) \log \left (-1+x-x^2\right )}{1-x+x^2} \, dx=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 ) \]
[In]
[Out]
Time = 14.31 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.55 \[ \int \frac {40-95 x+30 x^2+e^x \left (16-38 x+12 x^2\right )+\left (15-15 x+15 x^2+e^x \left (-10+16 x-16 x^2+6 x^3\right )\right ) \log \left (-1+x-x^2\right )}{1-x+x^2} \, dx=\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 ) \]
[In]
[Out]