Optimal. Leaf size=64 \[ \frac {\sqrt {x^2-1}}{-x+i}-\frac {i \tan ^{-1}\left (\frac {1-i x}{\sqrt {2} \sqrt {x^2-1}}\right )}{\sqrt {2}}+\tanh ^{-1}\left (\frac {x}{\sqrt {x^2-1}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 64, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.353, Rules used = {733, 844, 217, 206, 725, 204} \[ \frac {\sqrt {x^2-1}}{-x+i}-\frac {i \tan ^{-1}\left (\frac {1-i x}{\sqrt {2} \sqrt {x^2-1}}\right )}{\sqrt {2}}+\tanh ^{-1}\left (\frac {x}{\sqrt {x^2-1}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 204
Rule 206
Rule 217
Rule 725
Rule 733
Rule 844
Rubi steps
\begin {align*} \int \frac {\sqrt {-1+x^2}}{(-i+x)^2} \, dx &=\frac {\sqrt {-1+x^2}}{i-x}+\int \frac {x}{(-i+x) \sqrt {-1+x^2}} \, dx\\ &=\frac {\sqrt {-1+x^2}}{i-x}+i \int \frac {1}{(-i+x) \sqrt {-1+x^2}} \, dx+\int \frac {1}{\sqrt {-1+x^2}} \, dx\\ &=\frac {\sqrt {-1+x^2}}{i-x}-i \operatorname {Subst}\left (\int \frac {1}{-2-x^2} \, dx,x,\frac {-1+i x}{\sqrt {-1+x^2}}\right )+\operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\frac {x}{\sqrt {-1+x^2}}\right )\\ &=\frac {\sqrt {-1+x^2}}{i-x}-\frac {i \tan ^{-1}\left (\frac {1-i x}{\sqrt {2} \sqrt {-1+x^2}}\right )}{\sqrt {2}}+\tanh ^{-1}\left (\frac {x}{\sqrt {-1+x^2}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.09, size = 59, normalized size = 0.92 \[ -\frac {\sqrt {x^2-1}}{x-i}+\tanh ^{-1}\left (\frac {x}{\sqrt {x^2-1}}\right )-\frac {\tanh ^{-1}\left (\frac {x+i}{\sqrt {2} \sqrt {x^2-1}}\right )}{\sqrt {2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.98, size = 92, normalized size = 1.44 \[ -\frac {\sqrt {2} {\left (x - i\right )} \log \left (-x + i \, \sqrt {2} + \sqrt {x^{2} - 1} + i\right ) - \sqrt {2} {\left (x - i\right )} \log \left (-x - i \, \sqrt {2} + \sqrt {x^{2} - 1} + i\right ) + {\left (2 \, x - 2 i\right )} \log \left (-x + \sqrt {x^{2} - 1}\right ) + 2 \, x + 2 \, \sqrt {x^{2} - 1} - 2 i}{2 \, x - 2 i} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.07, size = 84, normalized size = 1.31 \[ i \, \sqrt {2} \arctan \left (-\frac {1}{2} \, \sqrt {2} {\left (x - \sqrt {x^{2} - 1} - i\right )}\right ) + \frac {2 \, {\left (i \, x - i \, \sqrt {x^{2} - 1} - 1\right )}}{{\left (x - \sqrt {x^{2} - 1}\right )}^{2} - 2 i \, x + 2 i \, \sqrt {x^{2} - 1} + 1} - \log \left ({\left | -x + \sqrt {x^{2} - 1} \right |}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.04, size = 125, normalized size = 1.95 \[ -\frac {\sqrt {\left (x -i\right )^{2}-2+2 i \left (x -i\right )}\, x}{2}+\frac {i \sqrt {2}\, \arctan \left (\frac {\left (-4+2 i \left (x -i\right )\right ) \sqrt {2}}{4 \sqrt {\left (x -i\right )^{2}-2+2 i \left (x -i\right )}}\right )}{2}+\ln \left (x +\sqrt {\left (x -i\right )^{2}-2+2 i \left (x -i\right )}\right )+\frac {\left (\left (x -i\right )^{2}-2+2 i \left (x -i\right )\right )^{\frac {3}{2}}}{2 x -2 i}-\frac {i \sqrt {\left (x -i\right )^{2}-2+2 i \left (x -i\right )}}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.45, size = 53, normalized size = 0.83 \[ \frac {1}{2} i \, \sqrt {2} \arcsin \left (\frac {i \, x}{{\left | x - i \right |}} - \frac {1}{{\left | x - i \right |}}\right ) - \frac {\sqrt {x^{2} - 1}}{x - i} + \log \left (2 \, x + 2 \, \sqrt {x^{2} - 1}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.02 \[ \int \frac {\sqrt {x^2-1}}{{\left (x-\mathrm {i}\right )}^2} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sqrt {\left (x - 1\right ) \left (x + 1\right )}}{\left (x - i\right )^{2}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________