Optimal. Leaf size=23 \[ x \log \left (a^2+x^2\right )+2 a \tan ^{-1}\left (\frac{x}{a}\right )-2 x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0074804, antiderivative size = 23, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.375, Rules used = {2448, 321, 203} \[ x \log \left (a^2+x^2\right )+2 a \tan ^{-1}\left (\frac{x}{a}\right )-2 x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2448
Rule 321
Rule 203
Rubi steps
\begin{align*} \int \log \left (a^2+x^2\right ) \, dx &=x \log \left (a^2+x^2\right )-2 \int \frac{x^2}{a^2+x^2} \, dx\\ &=-2 x+x \log \left (a^2+x^2\right )+\left (2 a^2\right ) \int \frac{1}{a^2+x^2} \, dx\\ &=-2 x+2 a \tan ^{-1}\left (\frac{x}{a}\right )+x \log \left (a^2+x^2\right )\\ \end{align*}
Mathematica [A] time = 0.0016114, size = 23, normalized size = 1. \[ x \log \left (a^2+x^2\right )+2 a \tan ^{-1}\left (\frac{x}{a}\right )-2 x \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.003, size = 24, normalized size = 1. \begin{align*} -2\,x+2\,a\arctan \left ({\frac{x}{a}} \right ) +x\ln \left ({a}^{2}+{x}^{2} \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.44333, size = 31, normalized size = 1.35 \begin{align*} 2 \, a \arctan \left (\frac{x}{a}\right ) + x \log \left (a^{2} + x^{2}\right ) - 2 \, x \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.05649, size = 57, normalized size = 2.48 \begin{align*} 2 \, a \arctan \left (\frac{x}{a}\right ) + x \log \left (a^{2} + x^{2}\right ) - 2 \, x \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [C] time = 0.304679, size = 36, normalized size = 1.57 \begin{align*} - 2 a \left (\frac{i \log{\left (- i a + x \right )}}{2} - \frac{i \log{\left (i a + x \right )}}{2}\right ) + x \log{\left (a^{2} + x^{2} \right )} - 2 x \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.18137, size = 31, normalized size = 1.35 \begin{align*} 2 \, a \arctan \left (\frac{x}{a}\right ) + x \log \left (a^{2} + x^{2}\right ) - 2 \, x \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]