Optimal. Leaf size=41 \[ \frac {(i+a) \log (x)}{i-a}-\frac {2 \log (i-a-b x)}{1+i a} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 41, 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 {(a+i) \log (x)}{-a+i}-\frac {2 \log (-a-b x+i)}{1+i a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 78
Rule 5203
Rubi steps
\begin {align*} \int \frac {e^{-2 i \tan ^{-1}(a+b x)}}{x} \, dx &=\int \frac {1-i a-i b x}{x (1+i a+i b x)} \, dx\\ &=\int \left (\frac {-i-a}{(-i+a) x}+\frac {2 i b}{(-i+a) (-i+a+b x)}\right ) \, dx\\ &=\frac {(i+a) \log (x)}{i-a}-\frac {2 \log (i-a-b x)}{1+i a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 34, normalized size = 0.83 \begin {gather*} \frac {-((i+a) \log (x))+2 i \log (i-a-b x)}{-i+a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.10, size = 42, normalized size = 1.02
method | result | size |
default | \(-\frac {2 i \ln \left (-b x -a +i\right )}{i-a}+\frac {\left (-a^{2}-1\right ) \ln \left (x \right )}{\left (i-a \right )^{2}}\) | \(42\) |
risch | \(-\frac {i \ln \left (b^{2} x^{2}+2 a b x +a^{2}+1\right )}{i-a}+\frac {2 \arctan \left (b x +a \right )}{i-a}+\frac {i \ln \left (x \right )}{i-a}+\frac {\ln \left (x \right ) a}{i-a}\) | \(72\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 47, normalized size = 1.15 \begin {gather*} -\frac {2 \, {\left (-i \, a - 1\right )} \log \left (i \, b x + i \, a + 1\right )}{a^{2} - 2 i \, a - 1} - \frac {{\left (a^{2} + 1\right )} \log \left (x\right )}{a^{2} - 2 i \, a - 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.91, size = 27, normalized size = 0.66 \begin {gather*} -\frac {{\left (a + i\right )} \log \left (x\right ) - 2 i \, \log \left (\frac {b x + a - i}{b}\right )}{a - i} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 99 vs. \(2 (24) = 48\).
time = 0.47, size = 99, normalized size = 2.41 \begin {gather*} - \frac {\left (a + i\right ) \log {\left (a^{2} - \frac {a^{2} \left (a + i\right )}{a - i} + \frac {2 i a \left (a + i\right )}{a - i} + x \left (a b + 3 i b\right ) + 1 + \frac {a + i}{a - i} \right )}}{a - i} + \frac {2 i \log {\left (a^{2} + \frac {2 i a^{2}}{a - i} + \frac {4 a}{a - i} + x \left (a b + 3 i b\right ) + 1 - \frac {2 i}{a - i} \right )}}{a - i} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 70 vs. \(2 (32) = 64\).
time = 0.45, size = 70, normalized size = 1.71 \begin {gather*} -i \, b {\left (\frac {{\left (-i \, a + 1\right )} \log \left (\frac {a}{i \, b x + i \, a + 1} - \frac {i}{i \, b x + i \, a + 1} + i\right )}{a b - i \, b} + \frac {i \, \log \left (\frac {1}{\sqrt {{\left (b x + a\right )}^{2} + 1} {\left | b \right |}}\right )}{b}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.72, size = 34, normalized size = 0.83 \begin {gather*} -\frac {2\,\ln \left (a+b\,x-\mathrm {i}\right )}{1+a\,1{}\mathrm {i}}+\ln \left (x\right )\,\left (\frac {2}{1+a\,1{}\mathrm {i}}-1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________