Optimal. Leaf size=54 \[ \frac {2 (1-i a) x}{b^2}+\frac {i x^2}{b}-\frac {x^3}{3}+\frac {2 i (i+a)^2 \log (i+a+b x)}{b^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {5203, 78}
\begin {gather*} \frac {2 i (a+i)^2 \log (a+b x+i)}{b^3}+\frac {2 (1-i a) x}{b^2}+\frac {i x^2}{b}-\frac {x^3}{3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 78
Rule 5203
Rubi steps
\begin {align*} \int e^{2 i \tan ^{-1}(a+b x)} x^2 \, dx &=\int \frac {x^2 (1+i a+i b x)}{1-i a-i b x} \, dx\\ &=\int \left (-\frac {2 i (i+a)}{b^2}+\frac {2 i x}{b}-x^2+\frac {2 i (i+a)^2}{b^2 (i+a+b x)}\right ) \, dx\\ &=\frac {2 (1-i a) x}{b^2}+\frac {i x^2}{b}-\frac {x^3}{3}+\frac {2 i (i+a)^2 \log (i+a+b x)}{b^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 54, normalized size = 1.00 \begin {gather*} \frac {2 (1-i a) x}{b^2}+\frac {i x^2}{b}-\frac {x^3}{3}+\frac {2 i (i+a)^2 \log (i+a+b x)}{b^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 134 vs. \(2 (47 ) = 94\).
time = 0.11, size = 135, normalized size = 2.50
method | result | size |
default | \(\frac {i \left (\frac {1}{3} i b^{2} x^{3}+x^{2} b -2 i x -2 a x \right )}{b^{2}}+\frac {\frac {\left (2 i a^{2} b -4 a b -2 i b \right ) \ln \left (b^{2} x^{2}+2 a b x +a^{2}+1\right )}{2 b^{2}}+\frac {\left (2 i a^{3}+2 i a -2 a^{2}-2-\frac {\left (2 i a^{2} b -4 a b -2 i b \right ) a}{b}\right ) \arctan \left (\frac {2 b^{2} x +2 a b}{2 b}\right )}{b}}{b^{2}}\) | \(135\) |
risch | \(-\frac {x^{3}}{3}+\frac {i x^{2}}{b}+\frac {2 x}{b^{2}}-\frac {2 i a x}{b^{2}}-\frac {2 \ln \left (b^{2} x^{2}+2 a b x +a^{2}+1\right ) a}{b^{3}}+\frac {i \ln \left (b^{2} x^{2}+2 a b x +a^{2}+1\right ) a^{2}}{b^{3}}-\frac {i \ln \left (b^{2} x^{2}+2 a b x +a^{2}+1\right )}{b^{3}}+\frac {4 i \arctan \left (b x +a \right ) a}{b^{3}}+\frac {2 \arctan \left (b x +a \right ) a^{2}}{b^{3}}-\frac {2 \arctan \left (b x +a \right )}{b^{3}}\) | \(143\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 87 vs. \(2 (42) = 84\).
time = 0.46, size = 87, normalized size = 1.61 \begin {gather*} -\frac {b^{2} x^{3} - 3 i \, b x^{2} + 6 \, {\left (i \, a - 1\right )} x}{3 \, b^{2}} + \frac {2 \, {\left (a^{2} + 2 i \, a - 1\right )} \arctan \left (\frac {b^{2} x + a b}{b}\right )}{b^{3}} + \frac {{\left (i \, a^{2} - 2 \, a - i\right )} \log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + 1\right )}{b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.34, size = 53, normalized size = 0.98 \begin {gather*} -\frac {b^{3} x^{3} - 3 i \, b^{2} x^{2} + 6 \, {\left (i \, a - 1\right )} b x + 6 \, {\left (-i \, a^{2} + 2 \, a + i\right )} \log \left (\frac {b x + a + i}{b}\right )}{3 \, b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.15, size = 46, normalized size = 0.85 \begin {gather*} - \frac {x^{3}}{3} - x \left (\frac {2 i a}{b^{2}} - \frac {2}{b^{2}}\right ) + \frac {i x^{2}}{b} + \frac {2 i \left (a + i\right )^{2} \log {\left (a + b x + i \right )}}{b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.45, size = 53, normalized size = 0.98 \begin {gather*} -\frac {2 \, {\left (-i \, a^{2} + 2 \, a + i\right )} \log \left (b x + a + i\right )}{b^{3}} - \frac {b^{3} x^{3} - 3 i \, b^{2} x^{2} + 6 i \, a b x - 6 \, b x}{3 \, b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.51, size = 107, normalized size = 1.98 \begin {gather*} -\ln \left (x+\frac {a+1{}\mathrm {i}}{b}\right )\,\left (\frac {4\,a}{b^3}-\frac {\left (2\,a^2-2\right )\,1{}\mathrm {i}}{b^3}\right )-x^2\,\left (\frac {\left (-1+a\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{2\,b}-\frac {\left (1+a\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{2\,b}\right )-\frac {x^3}{3}-\frac {x\,\left (-1+a\,1{}\mathrm {i}\right )\,\left (\frac {\left (-1+a\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{b}-\frac {\left (1+a\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{b}\right )\,1{}\mathrm {i}}{b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________