3.2.76 \(\int \frac {e^{2 i \text {ArcTan}(a+b x)}}{x} \, dx\) [176]

Optimal. Leaf size=38 \[ \frac {(i-a) \log (x)}{i+a}-\frac {2 \log (i+a+b x)}{1-i a} \]

[Out]

(I-a)*ln(x)/(I+a)-2*ln(I+a+b*x)/(1-I*a)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 38, 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]

Int[E^((2*I)*ArcTan[a + b*x])/x,x]

[Out]

((I - a)*Log[x])/(I + a) - (2*Log[I + a + b*x])/(1 - I*a)

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 5203

Int[E^(ArcTan[(c_.)*((a_) + (b_.)*(x_))]*(n_.))*((d_.) + (e_.)*(x_))^(m_.), x_Symbol] :> Int[(d + e*x)^m*((1 -
 I*a*c - I*b*c*x)^(I*(n/2))/(1 + I*a*c + I*b*c*x)^(I*(n/2))), x] /; FreeQ[{a, b, c, d, e, m, n}, x]

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.01, size = 31, normalized size = 0.82 \begin {gather*} -\frac {(-i+a) \log (x)+2 i \log (i+a+b x)}{i+a} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[E^((2*I)*ArcTan[a + b*x])/x,x]

[Out]

-(((-I + a)*Log[x] + (2*I)*Log[I + a + b*x])/(I + a))

________________________________________________________________________________________

Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 109 vs. \(2 (34 ) = 68\).
time = 0.11, size = 110, normalized size = 2.89

method result size
risch \(\frac {i \ln \left (-x \right )}{i+a}-\frac {\ln \left (-x \right ) a}{i+a}-\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}\) \(69\)
default \(-\frac {2 b \left (\frac {\left (i a b +b \right ) \ln \left (b^{2} x^{2}+2 a b x +a^{2}+1\right )}{2 b^{2}}+\frac {\left (i a^{2}-i+2 a -\frac {\left (i a b +b \right ) a}{b}\right ) \arctan \left (\frac {2 b^{2} x +2 a b}{2 b}\right )}{b}\right )}{a^{2}+1}+\frac {\left (-a^{2}+2 i a +1\right ) \ln \left (x \right )}{a^{2}+1}\) \(110\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((1+I*(b*x+a))^2/(1+(b*x+a)^2)/x,x,method=_RETURNVERBOSE)

[Out]

-2*b/(a^2+1)*(1/2*(I*b*a+b)/b^2*ln(b^2*x^2+2*a*b*x+a^2+1)+(I*a^2-I+2*a-(I*b*a+b)*a/b)/b*arctan(1/2*(2*b^2*x+2*
a*b)/b))+(2*I*a-a^2+1)/(a^2+1)*ln(x)

________________________________________________________________________________________

Maxima [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 78 vs. \(2 (29) = 58\).
time = 0.47, size = 78, normalized size = 2.05 \begin {gather*} -\frac {2 \, {\left (a - i\right )} \arctan \left (\frac {b^{2} x + a b}{b}\right )}{a^{2} + 1} - \frac {{\left (i \, a + 1\right )} \log \left (b^{2} x^{2} + 2 \, a b x + a^{2} + 1\right )}{a^{2} + 1} - \frac {{\left (a^{2} - 2 i \, a - 1\right )} \log \left (x\right )}{a^{2} + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+I*(b*x+a))^2/(1+(b*x+a)^2)/x,x, algorithm="maxima")

[Out]

-2*(a - I)*arctan((b^2*x + a*b)/b)/(a^2 + 1) - (I*a + 1)*log(b^2*x^2 + 2*a*b*x + a^2 + 1)/(a^2 + 1) - (a^2 - 2
*I*a - 1)*log(x)/(a^2 + 1)

________________________________________________________________________________________

Fricas [A]
time = 2.66, size = 27, normalized size = 0.71 \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]

integrate((1+I*(b*x+a))^2/(1+(b*x+a)^2)/x,x, algorithm="fricas")

[Out]

-((a - I)*log(x) + 2*I*log((b*x + a + I)/b))/(a + I)

________________________________________________________________________________________

Sympy [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 100 vs. \(2 (24) = 48\).
time = 0.45, size = 100, normalized size = 2.63 \begin {gather*} - \frac {\left (a - i\right ) \log {\left (- \frac {a^{2} \left (a - i\right )}{a + i} + a^{2} - \frac {2 i a \left (a - i\right )}{a + i} + x \left (a b - 3 i b\right ) + \frac {a - i}{a + i} + 1 \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]

integrate((1+I*(b*x+a))**2/(1+(b*x+a)**2)/x,x)

[Out]

-(a - I)*log(-a**2*(a - I)/(a + I) + a**2 - 2*I*a*(a - I)/(a + I) + x*(a*b - 3*I*b) + (a - I)/(a + I) + 1)/(a
+ I) - 2*I*log(a**2 - 2*I*a**2/(a + I) + 4*a/(a + I) + x*(a*b - 3*I*b) + 1 + 2*I/(a + I))/(a + I)

________________________________________________________________________________________

Giac [A]
time = 0.46, size = 33, normalized size = 0.87 \begin {gather*} -\frac {2 i \, b \log \left (b x + a + i\right )}{a b + i \, b} - \frac {{\left (a - i\right )} \log \left ({\left | x \right |}\right )}{a + i} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((1+I*(b*x+a))^2/(1+(b*x+a)^2)/x,x, algorithm="giac")

[Out]

-2*I*b*log(b*x + a + I)/(a*b + I*b) - (a - I)*log(abs(x))/(a + I)

________________________________________________________________________________________

Mupad [B]
time = 0.70, size = 32, normalized size = 0.84 \begin {gather*} \ln \left (x\right )\,\left (-1+\frac {2{}\mathrm {i}}{a+1{}\mathrm {i}}\right )-\frac {\ln \left (a+b\,x+1{}\mathrm {i}\right )\,2{}\mathrm {i}}{a+1{}\mathrm {i}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a*1i + b*x*1i + 1)^2/(x*((a + b*x)^2 + 1)),x)

[Out]

log(x)*(2i/(a + 1i) - 1) - (log(a + b*x + 1i)*2i)/(a + 1i)

________________________________________________________________________________________