Optimal. Leaf size=31 \[ \frac {e^{3-e^{\log ^2(5)}} \log \left (1-x^2\right )}{5+2 x+x^2} \]
[Out]
________________________________________________________________________________________
Rubi [C] Result contains complex when optimal does not.
time = 1.49, antiderivative size = 172, normalized size of antiderivative = 5.55, number of steps
used = 64, number of rules used = 17, integrand size = 81, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {12, 6820,
6857, 6860, 648, 632, 210, 642, 2608, 2513, 815, 2512, 266, 2463, 2441, 2440, 2438}
\begin {gather*} -\frac {1}{8} e^{3-e^{\log ^2(5)}} \text {ArcTan}\left (\frac {x+1}{2}\right )+\frac {i e^{3-e^{\log ^2(5)}} \log \left (1-x^2\right )}{2 (-2 x-(2-4 i))}+\frac {i e^{3-e^{\log ^2(5)}} \log \left (1-x^2\right )}{2 (2 x+(2+4 i))}-\frac {3}{16} e^{3-e^{\log ^2(5)}} \log \left (x^2+2 x+5\right )+\left (\frac {3}{16}-\frac {i}{16}\right ) e^{3-e^{\log ^2(5)}} \log (x+(1-2 i))+\left (\frac {3}{16}+\frac {i}{16}\right ) e^{3-e^{\log ^2(5)}} \log (x+(1+2 i)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 210
Rule 266
Rule 632
Rule 642
Rule 648
Rule 815
Rule 2438
Rule 2440
Rule 2441
Rule 2463
Rule 2512
Rule 2513
Rule 2608
Rule 6820
Rule 6857
Rule 6860
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=e^{3-e^{\log ^2(5)}} \int \frac {10 x+4 x^2+2 x^3+\left (2+2 x-2 x^2-2 x^3\right ) \log \left (1-x^2\right )}{-25-20 x+11 x^2+16 x^3+13 x^4+4 x^5+x^6} \, dx\\ &=e^{3-e^{\log ^2(5)}} \int \frac {-2 x \left (5+2 x+x^2\right )+2 (-1+x) (1+x)^2 \log \left (1-x^2\right )}{\left (1-x^2\right ) \left (5+2 x+x^2\right )^2} \, dx\\ &=e^{3-e^{\log ^2(5)}} \int \left (\frac {2 x}{(-1+x) (1+x) \left (5+2 x+x^2\right )}-\frac {2 (1+x) \log \left (1-x^2\right )}{\left (5+2 x+x^2\right )^2}\right ) \, dx\\ &=\left (2 e^{3-e^{\log ^2(5)}}\right ) \int \frac {x}{(-1+x) (1+x) \left (5+2 x+x^2\right )} \, dx-\left (2 e^{3-e^{\log ^2(5)}}\right ) \int \frac {(1+x) \log \left (1-x^2\right )}{\left (5+2 x+x^2\right )^2} \, dx\\ &=\left (2 e^{3-e^{\log ^2(5)}}\right ) \int \left (\frac {1}{16 (-1+x)}+\frac {1}{8 (1+x)}+\frac {-5-3 x}{16 \left (5+2 x+x^2\right )}\right ) \, dx-\left (2 e^{3-e^{\log ^2(5)}}\right ) \int \left (\frac {\log \left (1-x^2\right )}{\left (5+2 x+x^2\right )^2}+\frac {x \log \left (1-x^2\right )}{\left (5+2 x+x^2\right )^2}\right ) \, dx\\ &=\frac {1}{8} e^{3-e^{\log ^2(5)}} \log (1-x)+\frac {1}{4} e^{3-e^{\log ^2(5)}} \log (1+x)+\frac {1}{8} e^{3-e^{\log ^2(5)}} \int \frac {-5-3 x}{5+2 x+x^2} \, dx-\left (2 e^{3-e^{\log ^2(5)}}\right ) \int \frac {\log \left (1-x^2\right )}{\left (5+2 x+x^2\right )^2} \, dx-\left (2 e^{3-e^{\log ^2(5)}}\right ) \int \frac {x \log \left (1-x^2\right )}{\left (5+2 x+x^2\right )^2} \, dx\\ &=\frac {1}{8} e^{3-e^{\log ^2(5)}} \log (1-x)+\frac {1}{4} e^{3-e^{\log ^2(5)}} \log (1+x)-\frac {1}{16} \left (3 e^{3-e^{\log ^2(5)}}\right ) \int \frac {2+2 x}{5+2 x+x^2} \, dx-\frac {1}{4} e^{3-e^{\log ^2(5)}} \int \frac {1}{5+2 x+x^2} \, dx-\left (2 e^{3-e^{\log ^2(5)}}\right ) \int \left (\frac {\left (\frac {1}{4}-\frac {i}{2}\right ) \log \left (1-x^2\right )}{((-2+4 i)-2 x)^2}-\frac {i \log \left (1-x^2\right )}{16 ((-2+4 i)-2 x)}+\frac {\left (\frac {1}{4}+\frac {i}{2}\right ) \log \left (1-x^2\right )}{((2+4 i)+2 x)^2}-\frac {i \log \left (1-x^2\right )}{16 ((2+4 i)+2 x)}\right ) \, dx-\left (2 e^{3-e^{\log ^2(5)}}\right ) \int \left (-\frac {\log \left (1-x^2\right )}{4 ((-2+4 i)-2 x)^2}+\frac {i \log \left (1-x^2\right )}{16 ((-2+4 i)-2 x)}-\frac {\log \left (1-x^2\right )}{4 ((2+4 i)+2 x)^2}+\frac {i \log \left (1-x^2\right )}{16 ((2+4 i)+2 x)}\right ) \, dx\\ &=\frac {1}{8} e^{3-e^{\log ^2(5)}} \log (1-x)+\frac {1}{4} e^{3-e^{\log ^2(5)}} \log (1+x)-\frac {3}{16} e^{3-e^{\log ^2(5)}} \log \left (5+2 x+x^2\right )+\frac {1}{2} e^{3-e^{\log ^2(5)}} \int \frac {\log \left (1-x^2\right )}{((-2+4 i)-2 x)^2} \, dx+\frac {1}{2} e^{3-e^{\log ^2(5)}} \int \frac {\log \left (1-x^2\right )}{((2+4 i)+2 x)^2} \, dx+\frac {1}{2} e^{3-e^{\log ^2(5)}} \text {Subst}\left (\int \frac {1}{-16-x^2} \, dx,x,2+2 x\right )-\left (\left (\frac {1}{2}-i\right ) e^{3-e^{\log ^2(5)}}\right ) \int \frac {\log \left (1-x^2\right )}{((-2+4 i)-2 x)^2} \, dx-\left (\left (\frac {1}{2}+i\right ) e^{3-e^{\log ^2(5)}}\right ) \int \frac {\log \left (1-x^2\right )}{((2+4 i)+2 x)^2} \, dx\\ &=-\frac {1}{8} e^{3-e^{\log ^2(5)}} \tan ^{-1}\left (\frac {1+x}{2}\right )+\frac {1}{8} e^{3-e^{\log ^2(5)}} \log (1-x)+\frac {1}{4} e^{3-e^{\log ^2(5)}} \log (1+x)+\frac {i e^{3-e^{\log ^2(5)}} \log \left (1-x^2\right )}{2 ((-2+4 i)-2 x)}+\frac {i e^{3-e^{\log ^2(5)}} \log \left (1-x^2\right )}{2 ((2+4 i)+2 x)}-\frac {3}{16} e^{3-e^{\log ^2(5)}} \log \left (5+2 x+x^2\right )-\left (\left (-\frac {1}{2}-i\right ) e^{3-e^{\log ^2(5)}}\right ) \int \frac {x}{((2+4 i)+2 x) \left (1-x^2\right )} \, dx+\frac {1}{2} e^{3-e^{\log ^2(5)}} \int \frac {x}{((-2+4 i)-2 x) \left (1-x^2\right )} \, dx-\frac {1}{2} e^{3-e^{\log ^2(5)}} \int \frac {x}{((2+4 i)+2 x) \left (1-x^2\right )} \, dx-\left (\left (\frac {1}{2}-i\right ) e^{3-e^{\log ^2(5)}}\right ) \int \frac {x}{((-2+4 i)-2 x) \left (1-x^2\right )} \, dx\\ &=-\frac {1}{8} e^{3-e^{\log ^2(5)}} \tan ^{-1}\left (\frac {1+x}{2}\right )+\frac {1}{8} e^{3-e^{\log ^2(5)}} \log (1-x)+\frac {1}{4} e^{3-e^{\log ^2(5)}} \log (1+x)+\frac {i e^{3-e^{\log ^2(5)}} \log \left (1-x^2\right )}{2 ((-2+4 i)-2 x)}+\frac {i e^{3-e^{\log ^2(5)}} \log \left (1-x^2\right )}{2 ((2+4 i)+2 x)}-\frac {3}{16} e^{3-e^{\log ^2(5)}} \log \left (5+2 x+x^2\right )-\left (\left (-\frac {1}{2}-i\right ) e^{3-e^{\log ^2(5)}}\right ) \int \left (-\frac {\frac {1}{16}-\frac {i}{16}}{-1+x}+\frac {i}{8 (1+x)}+\frac {\frac {1}{16}-\frac {3 i}{16}}{(1+2 i)+x}\right ) \, dx+\frac {1}{2} e^{3-e^{\log ^2(5)}} \int \left (\frac {\frac {1}{16}+\frac {i}{16}}{-1+x}+\frac {i}{8 (1+x)}-\frac {\frac {1}{16}+\frac {3 i}{16}}{(1-2 i)+x}\right ) \, dx-\frac {1}{2} e^{3-e^{\log ^2(5)}} \int \left (-\frac {\frac {1}{16}-\frac {i}{16}}{-1+x}+\frac {i}{8 (1+x)}+\frac {\frac {1}{16}-\frac {3 i}{16}}{(1+2 i)+x}\right ) \, dx-\left (\left (\frac {1}{2}-i\right ) e^{3-e^{\log ^2(5)}}\right ) \int \left (\frac {\frac {1}{16}+\frac {i}{16}}{-1+x}+\frac {i}{8 (1+x)}-\frac {\frac {1}{16}+\frac {3 i}{16}}{(1-2 i)+x}\right ) \, dx\\ &=-\frac {1}{8} e^{3-e^{\log ^2(5)}} \tan ^{-1}\left (\frac {1+x}{2}\right )+\left (\frac {3}{16}-\frac {i}{16}\right ) e^{3-e^{\log ^2(5)}} \log ((1-2 i)+x)+\left (\frac {3}{16}+\frac {i}{16}\right ) e^{3-e^{\log ^2(5)}} \log ((1+2 i)+x)+\frac {i e^{3-e^{\log ^2(5)}} \log \left (1-x^2\right )}{2 ((-2+4 i)-2 x)}+\frac {i e^{3-e^{\log ^2(5)}} \log \left (1-x^2\right )}{2 ((2+4 i)+2 x)}-\frac {3}{16} e^{3-e^{\log ^2(5)}} \log \left (5+2 x+x^2\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A]
time = 0.11, size = 31, normalized size = 1.00 \begin {gather*} \frac {e^{3-e^{\log ^2(5)}} \log \left (1-x^2\right )}{5+2 x+x^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.85, size = 30, normalized size = 0.97
method | result | size |
risch | \(\frac {\ln \left (-x^{2}+1\right ) {\mathrm e}^{3-{\mathrm e}^{\ln \left (5\right )^{2}}}}{x^{2}+2 x +5}\) | \(30\) |
norman | \(\frac {{\mathrm e}^{-{\mathrm e}^{\ln \left (5\right )^{2}}} {\mathrm e}^{3} \ln \left (-x^{2}+1\right )}{x^{2}+2 x +5}\) | \(32\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 115 vs.
\(2 (29) = 58\).
time = 0.89, size = 115, normalized size = 3.71 \begin {gather*} -\frac {1}{32} \, {\left (\frac {4 \, {\left (2 \, {\left (x^{2} + 2 \, x + 1\right )} \log \left (x + 1\right ) + {\left (x^{2} + 2 \, x - 3\right )} \log \left (-x + 1\right )\right )}}{x^{2} + 2 \, x + 5} + \frac {9 \, x + 35}{x^{2} + 2 \, x + 5} - \frac {2 \, {\left (7 \, x + 5\right )}}{x^{2} + 2 \, x + 5} + \frac {5 \, {\left (x - 5\right )}}{x^{2} + 2 \, x + 5} - 8 \, \log \left (x + 1\right ) - 4 \, \log \left (x - 1\right )\right )} e^{\left (-e^{\left (\log \left (5\right )^{2}\right )} + 3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 29, normalized size = 0.94 \begin {gather*} \frac {e^{\left (-e^{\left (\log \left (5\right )^{2}\right )} + 3\right )} \log \left (-x^{2} + 1\right )}{x^{2} + 2 \, x + 5} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.13, size = 42, normalized size = 1.35 \begin {gather*} \frac {e^{3} \log {\left (1 - x^{2} \right )}}{x^{2} e^{e^{\log {\left (5 \right )}^{2}}} + 2 x e^{e^{\log {\left (5 \right )}^{2}}} + 5 e^{e^{\log {\left (5 \right )}^{2}}}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.40, size = 29, normalized size = 0.94 \begin {gather*} \frac {e^{\left (-e^{\left (\log \left (5\right )^{2}\right )} + 3\right )} \log \left (-x^{2} + 1\right )}{x^{2} + 2 \, x + 5} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.50, size = 29, normalized size = 0.94 \begin {gather*} \frac {\ln \left (1-x^2\right )\,{\mathrm {e}}^{3-{\mathrm {e}}^{{\ln \left (5\right )}^2}}}{x^2+2\,x+5} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________