Integrand size = 16, antiderivative size = 130 \[ \int \frac {e^{i \arctan (a+b x)}}{x^2} \, dx=-\frac {\sqrt {1-i a-i b x} \sqrt {1+i a+i b x}}{(1-i a) x}+\frac {2 i b \text {arctanh}\left (\frac {\sqrt {i+a} \sqrt {1+i a+i b x}}{\sqrt {i-a} \sqrt {1-i a-i b x}}\right )}{\sqrt {i-a} (i+a)^{3/2}} \]
[Out]
Time = 0.05 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {5203, 96, 95, 214} \[ \int \frac {e^{i \arctan (a+b x)}}{x^2} \, dx=\frac {2 i b \text {arctanh}\left (\frac {\sqrt {a+i} \sqrt {i a+i b x+1}}{\sqrt {-a+i} \sqrt {-i a-i b x+1}}\right )}{\sqrt {-a+i} (a+i)^{3/2}}-\frac {\sqrt {-i a-i b x+1} \sqrt {i a+i b x+1}}{(1-i a) x} \]
[In]
[Out]
Rule 95
Rule 96
Rule 214
Rule 5203
Rubi steps \begin{align*} \text {integral}& = \int \frac {\sqrt {1+i a+i b x}}{x^2 \sqrt {1-i a-i b x}} \, dx \\ & = -\frac {\sqrt {1-i a-i b x} \sqrt {1+i a+i b x}}{(1-i a) x}-\frac {b \int \frac {1}{x \sqrt {1-i a-i b x} \sqrt {1+i a+i b x}} \, dx}{i+a} \\ & = -\frac {\sqrt {1-i a-i b x} \sqrt {1+i a+i b x}}{(1-i a) x}-\frac {(2 b) \text {Subst}\left (\int \frac {1}{-1-i a-(-1+i a) x^2} \, dx,x,\frac {\sqrt {1+i a+i b x}}{\sqrt {1-i a-i b x}}\right )}{i+a} \\ & = -\frac {\sqrt {1-i a-i b x} \sqrt {1+i a+i b x}}{(1-i a) x}+\frac {2 i b \text {arctanh}\left (\frac {\sqrt {i+a} \sqrt {1+i a+i b x}}{\sqrt {i-a} \sqrt {1-i a-i b x}}\right )}{\sqrt {i-a} (i+a)^{3/2}} \\ \end{align*}
Time = 0.06 (sec) , antiderivative size = 120, normalized size of antiderivative = 0.92 \[ \int \frac {e^{i \arctan (a+b x)}}{x^2} \, dx=-i \left (\frac {\sqrt {1+a^2+2 a b x+b^2 x^2}}{i x+a x}+\frac {2 b \text {arctanh}\left (\frac {\sqrt {-1-i a} \sqrt {-i (i+a+b x)}}{\sqrt {-1+i a} \sqrt {1+i a+i b x}}\right )}{\sqrt {-1-i a} (-1+i a)^{3/2}}\right ) \]
[In]
[Out]
Time = 0.68 (sec) , antiderivative size = 93, normalized size of antiderivative = 0.72
method | result | size |
risch | \(-\frac {i \sqrt {b^{2} x^{2}+2 a b x +a^{2}+1}}{\left (i+a \right ) x}+\frac {b \ln \left (\frac {2 a^{2}+2+2 a b x +2 \sqrt {a^{2}+1}\, \sqrt {b^{2} x^{2}+2 a b x +a^{2}+1}}{x}\right )}{\left (i+a \right ) \sqrt {a^{2}+1}}\) | \(93\) |
default | \(-\frac {i b \ln \left (\frac {2 a^{2}+2+2 a b x +2 \sqrt {a^{2}+1}\, \sqrt {b^{2} x^{2}+2 a b x +a^{2}+1}}{x}\right )}{\sqrt {a^{2}+1}}+\left (i a +1\right ) \left (-\frac {\sqrt {b^{2} x^{2}+2 a b x +a^{2}+1}}{\left (a^{2}+1\right ) x}+\frac {a b \ln \left (\frac {2 a^{2}+2+2 a b x +2 \sqrt {a^{2}+1}\, \sqrt {b^{2} x^{2}+2 a b x +a^{2}+1}}{x}\right )}{\left (a^{2}+1\right )^{\frac {3}{2}}}\right )\) | \(152\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 224 vs. \(2 (86) = 172\).
Time = 0.27 (sec) , antiderivative size = 224, normalized size of antiderivative = 1.72 \[ \int \frac {e^{i \arctan (a+b x)}}{x^2} \, dx=-\frac {{\left (a + i\right )} \sqrt {\frac {b^{2}}{a^{4} + 2 i \, a^{3} + 2 i \, a - 1}} x \log \left (-\frac {b^{2} x - \sqrt {b^{2} x^{2} + 2 \, a b x + a^{2} + 1} b + {\left (a^{3} + i \, a^{2} + a + i\right )} \sqrt {\frac {b^{2}}{a^{4} + 2 i \, a^{3} + 2 i \, a - 1}}}{b}\right ) - {\left (a + i\right )} \sqrt {\frac {b^{2}}{a^{4} + 2 i \, a^{3} + 2 i \, a - 1}} x \log \left (-\frac {b^{2} x - \sqrt {b^{2} x^{2} + 2 \, a b x + a^{2} + 1} b - {\left (a^{3} + i \, a^{2} + a + i\right )} \sqrt {\frac {b^{2}}{a^{4} + 2 i \, a^{3} + 2 i \, a - 1}}}{b}\right ) + i \, b x + i \, \sqrt {b^{2} x^{2} + 2 \, a b x + a^{2} + 1}}{{\left (a + i\right )} x} \]
[In]
[Out]
\[ \int \frac {e^{i \arctan (a+b x)}}{x^2} \, dx=i \left (\int \left (- \frac {i}{x^{2} \sqrt {a^{2} + 2 a b x + b^{2} x^{2} + 1}}\right )\, dx + \int \frac {a}{x^{2} \sqrt {a^{2} + 2 a b x + b^{2} x^{2} + 1}}\, dx + \int \frac {b}{x \sqrt {a^{2} + 2 a b x + b^{2} x^{2} + 1}}\, dx\right ) \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 239 vs. \(2 (86) = 172\).
Time = 0.18 (sec) , antiderivative size = 239, normalized size of antiderivative = 1.84 \[ \int \frac {e^{i \arctan (a+b x)}}{x^2} \, dx=\frac {a {\left (i \, a + 1\right )} b \operatorname {arsinh}\left (\frac {2 \, a b x}{\sqrt {-4 \, a^{2} b^{2} + 4 \, {\left (a^{2} + 1\right )} b^{2}} {\left | x \right |}} + \frac {2 \, a^{2}}{\sqrt {-4 \, a^{2} b^{2} + 4 \, {\left (a^{2} + 1\right )} b^{2}} {\left | x \right |}} + \frac {2}{\sqrt {-4 \, a^{2} b^{2} + 4 \, {\left (a^{2} + 1\right )} b^{2}} {\left | x \right |}}\right )}{{\left (a^{2} + 1\right )}^{\frac {3}{2}}} - \frac {i \, b \operatorname {arsinh}\left (\frac {2 \, a b x}{\sqrt {-4 \, a^{2} b^{2} + 4 \, {\left (a^{2} + 1\right )} b^{2}} {\left | x \right |}} + \frac {2 \, a^{2}}{\sqrt {-4 \, a^{2} b^{2} + 4 \, {\left (a^{2} + 1\right )} b^{2}} {\left | x \right |}} + \frac {2}{\sqrt {-4 \, a^{2} b^{2} + 4 \, {\left (a^{2} + 1\right )} b^{2}} {\left | x \right |}}\right )}{\sqrt {a^{2} + 1}} + \frac {\sqrt {b^{2} x^{2} + 2 \, a b x + a^{2} + 1} {\left (-i \, a - 1\right )}}{{\left (a^{2} + 1\right )} x} \]
[In]
[Out]
none
Time = 0.35 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.12 \[ \int \frac {e^{i \arctan (a+b x)}}{x^2} \, dx=\frac {b \log \left (\frac {{\left | 2 \, x {\left | b \right |} - 2 \, \sqrt {{\left (b x + a\right )}^{2} + 1} - 2 \, \sqrt {a^{2} + 1} \right |}}{{\left | 2 \, x {\left | b \right |} - 2 \, \sqrt {{\left (b x + a\right )}^{2} + 1} + 2 \, \sqrt {a^{2} + 1} \right |}}\right )}{\sqrt {a^{2} + 1} {\left (a + i\right )}} - \frac {2 \, {\left ({\left (x {\left | b \right |} - \sqrt {{\left (b x + a\right )}^{2} + 1}\right )} a b + a^{2} {\left | b \right |} + {\left | b \right |}\right )}}{{\left ({\left (x {\left | b \right |} - \sqrt {{\left (b x + a\right )}^{2} + 1}\right )}^{2} - a^{2} - 1\right )} {\left (i \, a - 1\right )}} \]
[In]
[Out]
Time = 1.85 (sec) , antiderivative size = 218, normalized size of antiderivative = 1.68 \[ \int \frac {e^{i \arctan (a+b x)}}{x^2} \, dx=\frac {a\,b\,\mathrm {atanh}\left (\frac {a^2+b\,x\,a+1}{\sqrt {a^2+1}\,\sqrt {a^2+2\,a\,b\,x+b^2\,x^2+1}}\right )}{{\left (a^2+1\right )}^{3/2}}-\frac {\sqrt {a^2+2\,a\,b\,x+b^2\,x^2+1}}{x\,\left (a^2+1\right )}-\frac {b\,\ln \left (a\,b+\frac {a^2+1}{x}+\frac {\sqrt {a^2+1}\,\sqrt {a^2+2\,a\,b\,x+b^2\,x^2+1}}{x}\right )\,1{}\mathrm {i}}{\sqrt {a^2+1}}+\frac {a^2\,b\,\mathrm {atanh}\left (\frac {a^2+b\,x\,a+1}{\sqrt {a^2+1}\,\sqrt {a^2+2\,a\,b\,x+b^2\,x^2+1}}\right )\,1{}\mathrm {i}}{{\left (a^2+1\right )}^{3/2}}-\frac {a\,\sqrt {a^2+2\,a\,b\,x+b^2\,x^2+1}\,1{}\mathrm {i}}{x\,\left (a^2+1\right )} \]
[In]
[Out]