Optimal. Leaf size=39 \[ \frac{2 x}{a^2}-\frac{2 i \log (a x+i)}{a^3}+\frac{i x^2}{a}-\frac{x^3}{3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0284318, antiderivative size = 39, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {5062, 77} \[ \frac{2 x}{a^2}-\frac{2 i \log (a x+i)}{a^3}+\frac{i x^2}{a}-\frac{x^3}{3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 5062
Rule 77
Rubi steps
\begin{align*} \int e^{2 i \tan ^{-1}(a x)} x^2 \, dx &=\int \frac{x^2 (1+i a x)}{1-i a x} \, dx\\ &=\int \left (\frac{2}{a^2}+\frac{2 i x}{a}-x^2-\frac{2 i}{a^2 (i+a x)}\right ) \, dx\\ &=\frac{2 x}{a^2}+\frac{i x^2}{a}-\frac{x^3}{3}-\frac{2 i \log (i+a x)}{a^3}\\ \end{align*}
Mathematica [A] time = 0.0125104, size = 39, normalized size = 1. \[ \frac{2 x}{a^2}-\frac{2 i \log (a x+i)}{a^3}+\frac{i x^2}{a}-\frac{x^3}{3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.036, size = 47, normalized size = 1.2 \begin{align*} -{\frac{{x}^{3}}{3}}+{\frac{i{x}^{2}}{a}}+2\,{\frac{x}{{a}^{2}}}-{\frac{i\ln \left ({a}^{2}{x}^{2}+1 \right ) }{{a}^{3}}}-2\,{\frac{\arctan \left ( ax \right ) }{{a}^{3}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.52594, size = 63, normalized size = 1.62 \begin{align*} -\frac{a^{2} x^{3} - 3 i \, a x^{2} - 6 \, x}{3 \, a^{2}} - \frac{2 \, \arctan \left (a x\right )}{a^{3}} - \frac{i \, \log \left (a^{2} x^{2} + 1\right )}{a^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.59275, size = 88, normalized size = 2.26 \begin{align*} -\frac{a^{3} x^{3} - 3 i \, a^{2} x^{2} - 6 \, a x + 6 i \, \log \left (\frac{a x + i}{a}\right )}{3 \, a^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.359366, size = 31, normalized size = 0.79 \begin{align*} - \frac{x^{3}}{3} + \frac{i x^{2}}{a} + \frac{2 x}{a^{2}} - \frac{2 i \log{\left (a x + i \right )}}{a^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.09093, size = 53, normalized size = 1.36 \begin{align*} -\frac{2 \, i \log \left (a x + i\right )}{a^{3}} - \frac{a^{3} x^{3} - 3 \, a^{2} i x^{2} - 6 \, a x}{3 \, a^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]