Optimal. Leaf size=19 \[ \tan ^{-1}\left (\frac {x}{a}\right )+\frac {1}{2} \log \left (a^2+x^2\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.00, antiderivative size = 19, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {649, 209, 266}
\begin {gather*} \frac {1}{2} \log \left (a^2+x^2\right )+\tan ^{-1}\left (\frac {x}{a}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 266
Rule 649
Rubi steps
\begin {align*} \int \frac {a+x}{a^2+x^2} \, dx &=a \int \frac {1}{a^2+x^2} \, dx+\int \frac {x}{a^2+x^2} \, dx\\ &=\tan ^{-1}\left (\frac {x}{a}\right )+\frac {1}{2} \log \left (a^2+x^2\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.00, size = 19, normalized size = 1.00 \begin {gather*} \tan ^{-1}\left (\frac {x}{a}\right )+\frac {1}{2} \log \left (a^2+x^2\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Mathics [C] Result contains complex when optimal does not.
time = 1.86, size = 17, normalized size = 0.89 \begin {gather*} \left (\frac {1}{2}-\frac {I}{2}\right ) \left (\text {Log}\left [-I a+x\right ]+I \text {Log}\left [I a+x\right ]\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.04, size = 18, normalized size = 0.95
method | result | size |
default | \(\arctan \left (\frac {x}{a}\right )+\frac {\ln \left (a^{2}+x^{2}\right )}{2}\) | \(18\) |
risch | \(\arctan \left (\frac {x}{a}\right )+\frac {\ln \left (a^{2}+x^{2}\right )}{2}\) | \(18\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.35, size = 17, normalized size = 0.89 \begin {gather*} \arctan \left (\frac {x}{a}\right ) + \frac {1}{2} \, \log \left (a^{2} + x^{2}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.33, size = 17, normalized size = 0.89 \begin {gather*} \arctan \left (\frac {x}{a}\right ) + \frac {1}{2} \, \log \left (a^{2} + x^{2}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [C] Result contains complex when optimal does not.
time = 0.05, size = 42, normalized size = 2.21 \begin {gather*} \left (\frac {1}{2} - \frac {i}{2}\right ) \log {\left (- a + 2 a \left (\frac {1}{2} - \frac {i}{2}\right ) + x \right )} + \left (\frac {1}{2} + \frac {i}{2}\right ) \log {\left (- a + 2 a \left (\frac {1}{2} + \frac {i}{2}\right ) + x \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.00, size = 17, normalized size = 0.89 \begin {gather*} \frac {\ln \left (x^{2}+a^{2}\right )}{2}+\arctan \left (\frac {x}{a}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.04, size = 17, normalized size = 0.89 \begin {gather*} \frac {\ln \left (a^2+x^2\right )}{2}+\mathrm {atan}\left (\frac {x}{a}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________