Optimal. Leaf size=62 \[ -\frac {i+a}{(i-a) x}+\frac {2 i b \log (x)}{(i-a)^2}-\frac {2 i b \log (i-a-b x)}{(i-a)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 62, 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 b \log (x)}{(-a+i)^2}-\frac {2 i b \log (-a-b x+i)}{(-a+i)^2}-\frac {a+i}{(-a+i) x} \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^2} \, dx &=\int \frac {1-i a-i b x}{x^2 (1+i a+i b x)} \, dx\\ &=\int \left (\frac {-i-a}{(-i+a) x^2}+\frac {2 i b}{(-i+a)^2 x}-\frac {2 i b^2}{(-i+a)^2 (-i+a+b x)}\right ) \, dx\\ &=-\frac {i+a}{(i-a) x}+\frac {2 i b \log (x)}{(i-a)^2}-\frac {2 i b \log (i-a-b x)}{(i-a)^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 42, normalized size = 0.68 \begin {gather*} \frac {1+a^2+2 i b x \log (x)-2 i b x \log (i-a-b x)}{(-i+a)^2 x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.11, size = 69, normalized size = 1.11
method | result | size |
default | \(-\frac {-a^{2}-1}{x \left (i-a \right )^{2}}-\frac {2 b \left (i a +1\right ) \ln \left (x \right )}{\left (i-a \right )^{3}}+\frac {2 b \left (i a +1\right ) \ln \left (-b x -a +i\right )}{\left (i-a \right )^{3}}\) | \(69\) |
risch | \(\frac {i}{\left (a -i\right ) x}+\frac {a}{\left (a -i\right ) x}-\frac {2 b \ln \left (\left (-2 a^{2} b -2 b \right ) x \right )}{i a^{2}+2 a -i}+\frac {b \ln \left (4 a^{4} b^{2} x^{2}+8 a^{5} b x +4 a^{6}+8 a^{2} b^{2} x^{2}+16 a^{3} b x +12 a^{4}+4 b^{2} x^{2}+8 a b x +12 a^{2}+4\right )}{i a^{2}+2 a -i}-\frac {2 i b \arctan \left (\frac {\left (2 a^{2} b +2 b \right ) x +2 a^{3}+2 a}{-2 a^{2}-2}\right )}{i a^{2}+2 a -i}\) | \(188\) |
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. 110 vs. \(2 (41) = 82\).
time = 0.27, size = 110, normalized size = 1.77 \begin {gather*} -\frac {2 \, {\left (a - i\right )} b \log \left (i \, b x + i \, a + 1\right )}{-i \, a^{3} - 3 \, a^{2} + 3 i \, a + 1} + \frac {2 \, {\left (a - i\right )} b \log \left (x\right )}{-i \, a^{3} - 3 \, a^{2} + 3 i \, a + 1} + \frac {a^{3} + {\left (a^{2} + 1\right )} b x - i \, a^{2} + a - i}{{\left (a^{2} - 2 i \, a - 1\right )} b x^{2} + {\left (a^{3} - 3 i \, a^{2} - 3 \, a + i\right )} x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 4.08, size = 40, normalized size = 0.65 \begin {gather*} \frac {2 i \, b x \log \left (x\right ) - 2 i \, b x \log \left (\frac {b x + a - i}{b}\right ) + a^{2} + 1}{{\left (a^{2} - 2 i \, a - 1\right )} x} \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. 158 vs. \(2 (41) = 82\).
time = 0.35, size = 158, normalized size = 2.55 \begin {gather*} \frac {2 i b \log {\left (- \frac {2 a^{3} b}{\left (a - i\right )^{2}} + \frac {6 i a^{2} b}{\left (a - i\right )^{2}} + 2 a b + \frac {6 a b}{\left (a - i\right )^{2}} + 4 b^{2} x - 2 i b - \frac {2 i b}{\left (a - i\right )^{2}} \right )}}{\left (a - i\right )^{2}} - \frac {2 i b \log {\left (\frac {2 a^{3} b}{\left (a - i\right )^{2}} - \frac {6 i a^{2} b}{\left (a - i\right )^{2}} + 2 a b - \frac {6 a b}{\left (a - i\right )^{2}} + 4 b^{2} x - 2 i b + \frac {2 i b}{\left (a - i\right )^{2}} \right )}}{\left (a - i\right )^{2}} - \frac {- a - i}{x \left (a - i\right )} \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. 95 vs. \(2 (41) = 82\).
time = 0.44, size = 95, normalized size = 1.53 \begin {gather*} \frac {2 \, b^{2} \log \left (-\frac {i \, a}{i \, b x + i \, a + 1} - \frac {1}{i \, b x + i \, a + 1} + 1\right )}{-i \, a^{2} b - 2 \, a b + i \, b} - \frac {a b + i \, b}{{\left (a - i\right )}^{2} {\left (\frac {i \, a}{i \, b x + i \, a + 1} + \frac {1}{i \, b x + i \, a + 1} - 1\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.65, size = 100, normalized size = 1.61 \begin {gather*} \frac {-1+a\,1{}\mathrm {i}}{x\,\left (1+a\,1{}\mathrm {i}\right )}-\frac {4\,b\,\mathrm {atan}\left (\frac {a^2\,1{}\mathrm {i}+2\,a-\mathrm {i}}{{\left (a-\mathrm {i}\right )}^2}+\frac {x\,\left (2\,a^4\,b^2+4\,a^2\,b^2+2\,b^2\right )}{{\left (a-\mathrm {i}\right )}^2\,\left (-1{}\mathrm {i}\,b\,a^3+b\,a^2-1{}\mathrm {i}\,b\,a+b\right )}\right )}{{\left (a-\mathrm {i}\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________