Optimal. Leaf size=19 \[ x (5+2 x) \log \left (e^x \left (1+x^2\right )^2\right ) \]
________________________________________________________________________________________
Rubi [B] time = 0.20, antiderivative size = 39, normalized size of antiderivative = 2.05, number of steps used = 13, number of rules used = 7, integrand size = 58, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.121, Rules used = {6725, 1802, 635, 203, 260, 2551, 1629} \begin {gather*} \frac {1}{8} (4 x+5)^2 \log \left (e^x \left (x^2+1\right )^2\right )-\frac {25}{4} \log \left (x^2+1\right )-\frac {25 x}{8} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 260
Rule 635
Rule 1629
Rule 1802
Rule 2551
Rule 6725
Rubi steps
\begin {gather*} \begin {aligned} \text {integral} &=\int \left (\frac {x \left (5+22 x+13 x^2+2 x^3\right )}{1+x^2}+(5+4 x) \log \left (e^x \left (1+x^2\right )^2\right )\right ) \, dx\\ &=\int \frac {x \left (5+22 x+13 x^2+2 x^3\right )}{1+x^2} \, dx+\int (5+4 x) \log \left (e^x \left (1+x^2\right )^2\right ) \, dx\\ &=\frac {1}{8} (5+4 x)^2 \log \left (e^x \left (1+x^2\right )^2\right )-\frac {1}{8} \int \frac {(5+4 x)^2 \left (1+4 x+x^2\right )}{1+x^2} \, dx+\int \left (20+13 x+2 x^2-\frac {4 (5+2 x)}{1+x^2}\right ) \, dx\\ &=20 x+\frac {13 x^2}{2}+\frac {2 x^3}{3}+\frac {1}{8} (5+4 x)^2 \log \left (e^x \left (1+x^2\right )^2\right )-\frac {1}{8} \int \left (185+104 x+16 x^2-\frac {4 (40-9 x)}{1+x^2}\right ) \, dx-4 \int \frac {5+2 x}{1+x^2} \, dx\\ &=-\frac {25 x}{8}+\frac {1}{8} (5+4 x)^2 \log \left (e^x \left (1+x^2\right )^2\right )+\frac {1}{2} \int \frac {40-9 x}{1+x^2} \, dx-8 \int \frac {x}{1+x^2} \, dx-20 \int \frac {1}{1+x^2} \, dx\\ &=-\frac {25 x}{8}-20 \tan ^{-1}(x)-4 \log \left (1+x^2\right )+\frac {1}{8} (5+4 x)^2 \log \left (e^x \left (1+x^2\right )^2\right )-\frac {9}{2} \int \frac {x}{1+x^2} \, dx+20 \int \frac {1}{1+x^2} \, dx\\ &=-\frac {25 x}{8}-\frac {25}{4} \log \left (1+x^2\right )+\frac {1}{8} (5+4 x)^2 \log \left (e^x \left (1+x^2\right )^2\right )\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 19, normalized size = 1.00 \begin {gather*} x (5+2 x) \log \left (e^x \left (1+x^2\right )^2\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.73, size = 24, normalized size = 1.26 \begin {gather*} {\left (2 \, x^{2} + 5 \, x\right )} \log \left ({\left (x^{4} + 2 \, x^{2} + 1\right )} e^{x}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.25, size = 28, normalized size = 1.47 \begin {gather*} 2 \, x^{3} + 5 \, x^{2} + 2 \, {\left (2 \, x^{2} + 5 \, x\right )} \log \left (x^{2} + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.40, size = 38, normalized size = 2.00
method | result | size |
default | \(2 \ln \left (\left (x^{4}+2 x^{2}+1\right ) {\mathrm e}^{x}\right ) x^{2}+5 \ln \left (\left (x^{4}+2 x^{2}+1\right ) {\mathrm e}^{x}\right ) x\) | \(38\) |
norman | \(2 \ln \left (\left (x^{4}+2 x^{2}+1\right ) {\mathrm e}^{x}\right ) x^{2}+5 \ln \left (\left (x^{4}+2 x^{2}+1\right ) {\mathrm e}^{x}\right ) x\) | \(38\) |
risch | \(\left (2 x^{2}+5 x \right ) \ln \left ({\mathrm e}^{x}\right )+4 x^{2} \ln \left (x^{2}+1\right )+10 x \ln \left (x^{2}+1\right )+2 i \pi \,x^{2} \mathrm {csgn}\left (i \left (x^{2}+1\right )\right ) \mathrm {csgn}\left (i \left (x^{2}+1\right )^{2}\right )^{2}+\frac {5 i \pi x \,\mathrm {csgn}\left (i \left (x^{2}+1\right )^{2}\right ) \mathrm {csgn}\left (i {\mathrm e}^{x} \left (x^{2}+1\right )^{2}\right )^{2}}{2}-\frac {5 i \pi x \mathrm {csgn}\left (i \left (x^{2}+1\right )\right )^{2} \mathrm {csgn}\left (i \left (x^{2}+1\right )^{2}\right )}{2}+5 i \pi x \,\mathrm {csgn}\left (i \left (x^{2}+1\right )\right ) \mathrm {csgn}\left (i \left (x^{2}+1\right )^{2}\right )^{2}+i \pi \,x^{2} \mathrm {csgn}\left (i \left (x^{2}+1\right )^{2}\right ) \mathrm {csgn}\left (i {\mathrm e}^{x} \left (x^{2}+1\right )^{2}\right )^{2}-\frac {5 i \pi x \,\mathrm {csgn}\left (i {\mathrm e}^{x}\right ) \mathrm {csgn}\left (i \left (x^{2}+1\right )^{2}\right ) \mathrm {csgn}\left (i {\mathrm e}^{x} \left (x^{2}+1\right )^{2}\right )}{2}-i \pi \,x^{2} \mathrm {csgn}\left (i \left (x^{2}+1\right )\right )^{2} \mathrm {csgn}\left (i \left (x^{2}+1\right )^{2}\right )-i \pi \,x^{2} \mathrm {csgn}\left (i {\mathrm e}^{x} \left (x^{2}+1\right )^{2}\right )^{3}+i \pi \,x^{2} \mathrm {csgn}\left (i {\mathrm e}^{x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{x} \left (x^{2}+1\right )^{2}\right )^{2}-i \pi \,x^{2} \mathrm {csgn}\left (i \left (x^{2}+1\right )^{2}\right )^{3}+\frac {5 i \pi x \,\mathrm {csgn}\left (i {\mathrm e}^{x}\right ) \mathrm {csgn}\left (i {\mathrm e}^{x} \left (x^{2}+1\right )^{2}\right )^{2}}{2}-\frac {5 i \pi x \mathrm {csgn}\left (i \left (x^{2}+1\right )^{2}\right )^{3}}{2}-\frac {5 i \pi x \mathrm {csgn}\left (i {\mathrm e}^{x} \left (x^{2}+1\right )^{2}\right )^{3}}{2}-i \pi \,x^{2} \mathrm {csgn}\left (i {\mathrm e}^{x}\right ) \mathrm {csgn}\left (i \left (x^{2}+1\right )^{2}\right ) \mathrm {csgn}\left (i {\mathrm e}^{x} \left (x^{2}+1\right )^{2}\right )\) | \(417\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.64, size = 37, normalized size = 1.95 \begin {gather*} 2 \, x^{3} + 5 \, x^{2} + 2 \, {\left (2 \, x^{2} + 5 \, x + 2\right )} \log \left (x^{2} + 1\right ) - 4 \, \log \left (x^{2} + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.32, size = 23, normalized size = 1.21 \begin {gather*} \left (2\,x^2+5\,x\right )\,\left (x+\ln \left (x^4+2\,x^2+1\right )\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.38, size = 34, normalized size = 1.79 \begin {gather*} - x + \left (2 x^{2} + 5 x + 1\right ) \log {\left (\left (x^{4} + 2 x^{2} + 1\right ) e^{x} \right )} - 2 \log {\left (x^{2} + 1 \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________