\(\int \frac {1}{(c+d x) (a+i a \tan (e+f x))} \, dx\) [21]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [F]
Maxima [A] (verification not implemented)
Giac [A] (verification not implemented)
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 23, antiderivative size = 161 \[ \int \frac {1}{(c+d x) (a+i a \tan (e+f x))} \, dx=\frac {\cos \left (2 e-\frac {2 c f}{d}\right ) \operatorname {CosIntegral}\left (\frac {2 c f}{d}+2 f x\right )}{2 a d}+\frac {\log (c+d x)}{2 a d}-\frac {i \operatorname {CosIntegral}\left (\frac {2 c f}{d}+2 f x\right ) \sin \left (2 e-\frac {2 c f}{d}\right )}{2 a d}-\frac {i \cos \left (2 e-\frac {2 c f}{d}\right ) \text {Si}\left (\frac {2 c f}{d}+2 f x\right )}{2 a d}-\frac {\sin \left (2 e-\frac {2 c f}{d}\right ) \text {Si}\left (\frac {2 c f}{d}+2 f x\right )}{2 a d} \] Output:

1/2*cos(-2*e+2*c*f/d)*Ci(2*c*f/d+2*f*x)/a/d+1/2*ln(d*x+c)/a/d+1/2*I*Ci(2*c 
*f/d+2*f*x)*sin(-2*e+2*c*f/d)/a/d-1/2*I*cos(-2*e+2*c*f/d)*Si(2*c*f/d+2*f*x 
)/a/d+1/2*sin(-2*e+2*c*f/d)*Si(2*c*f/d+2*f*x)/a/d
 

Mathematica [A] (verified)

Time = 0.54 (sec) , antiderivative size = 166, normalized size of antiderivative = 1.03 \[ \int \frac {1}{(c+d x) (a+i a \tan (e+f x))} \, dx=\frac {\sec (e+f x) \left (-i \cos \left (f \left (\frac {c}{d}+x\right )\right )+\sin \left (f \left (\frac {c}{d}+x\right )\right )\right ) \left (\operatorname {CosIntegral}\left (\frac {2 f (c+d x)}{d}\right ) \left (\cos \left (e-\frac {c f}{d}\right )-i \sin \left (e-\frac {c f}{d}\right )\right )+\log (f (c+d x)) \left (\cos \left (e-\frac {c f}{d}\right )+i \sin \left (e-\frac {c f}{d}\right )\right )+\left (-i \cos \left (e-\frac {c f}{d}\right )-\sin \left (e-\frac {c f}{d}\right )\right ) \text {Si}\left (\frac {2 f (c+d x)}{d}\right )\right )}{2 a d (-i+\tan (e+f x))} \] Input:

Integrate[1/((c + d*x)*(a + I*a*Tan[e + f*x])),x]
 

Output:

(Sec[e + f*x]*((-I)*Cos[f*(c/d + x)] + Sin[f*(c/d + x)])*(CosIntegral[(2*f 
*(c + d*x))/d]*(Cos[e - (c*f)/d] - I*Sin[e - (c*f)/d]) + Log[f*(c + d*x)]* 
(Cos[e - (c*f)/d] + I*Sin[e - (c*f)/d]) + ((-I)*Cos[e - (c*f)/d] - Sin[e - 
 (c*f)/d])*SinIntegral[(2*f*(c + d*x))/d]))/(2*a*d*(-I + Tan[e + f*x]))
 

Rubi [A] (verified)

Time = 0.76 (sec) , antiderivative size = 152, normalized size of antiderivative = 0.94, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {3042, 4209, 3042, 3784, 3042, 3780, 3783}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {1}{(c+d x) (a+i a \tan (e+f x))} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {1}{(c+d x) (a+i a \tan (e+f x))}dx\)

\(\Big \downarrow \) 4209

\(\displaystyle -\frac {i \int \frac {\sin (2 e+2 f x)}{c+d x}dx}{2 a}+\frac {\int \frac {\cos (2 e+2 f x)}{c+d x}dx}{2 a}+\frac {\log (c+d x)}{2 a d}\)

\(\Big \downarrow \) 3042

\(\displaystyle -\frac {i \int \frac {\sin (2 e+2 f x)}{c+d x}dx}{2 a}+\frac {\int \frac {\sin \left (2 e+2 f x+\frac {\pi }{2}\right )}{c+d x}dx}{2 a}+\frac {\log (c+d x)}{2 a d}\)

\(\Big \downarrow \) 3784

\(\displaystyle -\frac {i \left (\sin \left (2 e-\frac {2 c f}{d}\right ) \int \frac {\cos \left (2 x f+\frac {2 c f}{d}\right )}{c+d x}dx+\cos \left (2 e-\frac {2 c f}{d}\right ) \int \frac {\sin \left (2 x f+\frac {2 c f}{d}\right )}{c+d x}dx\right )}{2 a}+\frac {\cos \left (2 e-\frac {2 c f}{d}\right ) \int \frac {\cos \left (2 x f+\frac {2 c f}{d}\right )}{c+d x}dx-\sin \left (2 e-\frac {2 c f}{d}\right ) \int \frac {\sin \left (2 x f+\frac {2 c f}{d}\right )}{c+d x}dx}{2 a}+\frac {\log (c+d x)}{2 a d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\cos \left (2 e-\frac {2 c f}{d}\right ) \int \frac {\sin \left (2 x f+\frac {2 c f}{d}+\frac {\pi }{2}\right )}{c+d x}dx-\sin \left (2 e-\frac {2 c f}{d}\right ) \int \frac {\sin \left (2 x f+\frac {2 c f}{d}\right )}{c+d x}dx}{2 a}-\frac {i \left (\sin \left (2 e-\frac {2 c f}{d}\right ) \int \frac {\sin \left (2 x f+\frac {2 c f}{d}+\frac {\pi }{2}\right )}{c+d x}dx+\cos \left (2 e-\frac {2 c f}{d}\right ) \int \frac {\sin \left (2 x f+\frac {2 c f}{d}\right )}{c+d x}dx\right )}{2 a}+\frac {\log (c+d x)}{2 a d}\)

\(\Big \downarrow \) 3780

\(\displaystyle \frac {\cos \left (2 e-\frac {2 c f}{d}\right ) \int \frac {\sin \left (2 x f+\frac {2 c f}{d}+\frac {\pi }{2}\right )}{c+d x}dx-\frac {\sin \left (2 e-\frac {2 c f}{d}\right ) \text {Si}\left (2 x f+\frac {2 c f}{d}\right )}{d}}{2 a}-\frac {i \left (\sin \left (2 e-\frac {2 c f}{d}\right ) \int \frac {\sin \left (2 x f+\frac {2 c f}{d}+\frac {\pi }{2}\right )}{c+d x}dx+\frac {\cos \left (2 e-\frac {2 c f}{d}\right ) \text {Si}\left (2 x f+\frac {2 c f}{d}\right )}{d}\right )}{2 a}+\frac {\log (c+d x)}{2 a d}\)

\(\Big \downarrow \) 3783

\(\displaystyle -\frac {i \left (\frac {\operatorname {CosIntegral}\left (2 x f+\frac {2 c f}{d}\right ) \sin \left (2 e-\frac {2 c f}{d}\right )}{d}+\frac {\cos \left (2 e-\frac {2 c f}{d}\right ) \text {Si}\left (2 x f+\frac {2 c f}{d}\right )}{d}\right )}{2 a}+\frac {\frac {\operatorname {CosIntegral}\left (2 x f+\frac {2 c f}{d}\right ) \cos \left (2 e-\frac {2 c f}{d}\right )}{d}-\frac {\sin \left (2 e-\frac {2 c f}{d}\right ) \text {Si}\left (2 x f+\frac {2 c f}{d}\right )}{d}}{2 a}+\frac {\log (c+d x)}{2 a d}\)

Input:

Int[1/((c + d*x)*(a + I*a*Tan[e + f*x])),x]
 

Output:

Log[c + d*x]/(2*a*d) - ((I/2)*((CosIntegral[(2*c*f)/d + 2*f*x]*Sin[2*e - ( 
2*c*f)/d])/d + (Cos[2*e - (2*c*f)/d]*SinIntegral[(2*c*f)/d + 2*f*x])/d))/a 
 + ((Cos[2*e - (2*c*f)/d]*CosIntegral[(2*c*f)/d + 2*f*x])/d - (Sin[2*e - ( 
2*c*f)/d]*SinIntegral[(2*c*f)/d + 2*f*x])/d)/(2*a)
 

Defintions of rubi rules used

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3780
Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinInte 
gral[e + f*x]/d, x] /; FreeQ[{c, d, e, f}, x] && EqQ[d*e - c*f, 0]
 

rule 3783
Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosInte 
gral[e - Pi/2 + f*x]/d, x] /; FreeQ[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - 
c*f, 0]
 

rule 3784
Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[Cos[(d* 
e - c*f)/d]   Int[Sin[c*(f/d) + f*x]/(c + d*x), x], x] + Simp[Sin[(d*e - c* 
f)/d]   Int[Cos[c*(f/d) + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f}, x] 
&& NeQ[d*e - c*f, 0]
 

rule 4209
Int[1/(((c_.) + (d_.)*(x_))*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])), x_Symb 
ol] :> Simp[Log[c + d*x]/(2*a*d), x] + (Simp[1/(2*a)   Int[Cos[2*e + 2*f*x] 
/(c + d*x), x], x] + Simp[1/(2*b)   Int[Sin[2*e + 2*f*x]/(c + d*x), x], x]) 
 /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[a^2 + b^2, 0]
 
Maple [A] (verified)

Time = 0.54 (sec) , antiderivative size = 65, normalized size of antiderivative = 0.40

method result size
risch \(\frac {\ln \left (d x +c \right )}{2 a d}-\frac {{\mathrm e}^{\frac {2 i \left (c f -d e \right )}{d}} \operatorname {expIntegral}_{1}\left (2 i f x +2 i e +\frac {2 i \left (c f -d e \right )}{d}\right )}{2 a d}\) \(65\)

Input:

int(1/(d*x+c)/(a+I*a*tan(f*x+e)),x,method=_RETURNVERBOSE)
 

Output:

1/2*ln(d*x+c)/a/d-1/2/a/d*exp(2*I*(c*f-d*e)/d)*Ei(1,2*I*f*x+2*I*e+2*I*(c*f 
-d*e)/d)
 

Fricas [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 51, normalized size of antiderivative = 0.32 \[ \int \frac {1}{(c+d x) (a+i a \tan (e+f x))} \, dx=\frac {{\rm Ei}\left (-\frac {2 \, {\left (i \, d f x + i \, c f\right )}}{d}\right ) e^{\left (-\frac {2 \, {\left (i \, d e - i \, c f\right )}}{d}\right )} + \log \left (\frac {d x + c}{d}\right )}{2 \, a d} \] Input:

integrate(1/(d*x+c)/(a+I*a*tan(f*x+e)),x, algorithm="fricas")
 

Output:

1/2*(Ei(-2*(I*d*f*x + I*c*f)/d)*e^(-2*(I*d*e - I*c*f)/d) + log((d*x + c)/d 
))/(a*d)
 

Sympy [F]

\[ \int \frac {1}{(c+d x) (a+i a \tan (e+f x))} \, dx=- \frac {i \int \frac {1}{c \tan {\left (e + f x \right )} - i c + d x \tan {\left (e + f x \right )} - i d x}\, dx}{a} \] Input:

integrate(1/(d*x+c)/(a+I*a*tan(f*x+e)),x)
 

Output:

-I*Integral(1/(c*tan(e + f*x) - I*c + d*x*tan(e + f*x) - I*d*x), x)/a
 

Maxima [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 112, normalized size of antiderivative = 0.70 \[ \int \frac {1}{(c+d x) (a+i a \tan (e+f x))} \, dx=-\frac {f \cos \left (-\frac {2 \, {\left (d e - c f\right )}}{d}\right ) E_{1}\left (-\frac {2 \, {\left (-i \, {\left (f x + e\right )} d + i \, d e - i \, c f\right )}}{d}\right ) + i \, f E_{1}\left (-\frac {2 \, {\left (-i \, {\left (f x + e\right )} d + i \, d e - i \, c f\right )}}{d}\right ) \sin \left (-\frac {2 \, {\left (d e - c f\right )}}{d}\right ) - f \log \left ({\left (f x + e\right )} d - d e + c f\right )}{2 \, a d f} \] Input:

integrate(1/(d*x+c)/(a+I*a*tan(f*x+e)),x, algorithm="maxima")
 

Output:

-1/2*(f*cos(-2*(d*e - c*f)/d)*exp_integral_e(1, -2*(-I*(f*x + e)*d + I*d*e 
 - I*c*f)/d) + I*f*exp_integral_e(1, -2*(-I*(f*x + e)*d + I*d*e - I*c*f)/d 
)*sin(-2*(d*e - c*f)/d) - f*log((f*x + e)*d - d*e + c*f))/(a*d*f)
 

Giac [A] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 138, normalized size of antiderivative = 0.86 \[ \int \frac {1}{(c+d x) (a+i a \tan (e+f x))} \, dx=\frac {\cos \left (\frac {2 \, c f}{d}\right ) \operatorname {Ci}\left (-\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) + \cos \left (2 \, e\right ) \log \left (d x + c\right ) + i \, \log \left (d x + c\right ) \sin \left (2 \, e\right ) + i \, \operatorname {Ci}\left (-\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) \sin \left (\frac {2 \, c f}{d}\right ) - i \, \cos \left (\frac {2 \, c f}{d}\right ) \operatorname {Si}\left (\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) + \sin \left (\frac {2 \, c f}{d}\right ) \operatorname {Si}\left (\frac {2 \, {\left (d f x + c f\right )}}{d}\right )}{2 \, {\left (a d \cos \left (2 \, e\right ) + i \, a d \sin \left (2 \, e\right )\right )}} \] Input:

integrate(1/(d*x+c)/(a+I*a*tan(f*x+e)),x, algorithm="giac")
 

Output:

1/2*(cos(2*c*f/d)*cos_integral(-2*(d*f*x + c*f)/d) + cos(2*e)*log(d*x + c) 
 + I*log(d*x + c)*sin(2*e) + I*cos_integral(-2*(d*f*x + c*f)/d)*sin(2*c*f/ 
d) - I*cos(2*c*f/d)*sin_integral(2*(d*f*x + c*f)/d) + sin(2*c*f/d)*sin_int 
egral(2*(d*f*x + c*f)/d))/(a*d*cos(2*e) + I*a*d*sin(2*e))
 

Mupad [F(-1)]

Timed out. \[ \int \frac {1}{(c+d x) (a+i a \tan (e+f x))} \, dx=\int \frac {1}{\left (a+a\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )\,\left (c+d\,x\right )} \,d x \] Input:

int(1/((a + a*tan(e + f*x)*1i)*(c + d*x)),x)
 

Output:

int(1/((a + a*tan(e + f*x)*1i)*(c + d*x)), x)
 

Reduce [F]

\[ \int \frac {1}{(c+d x) (a+i a \tan (e+f x))} \, dx=\frac {\int \frac {1}{\tan \left (f x +e \right ) c i +\tan \left (f x +e \right ) d i x +c +d x}d x}{a} \] Input:

int(1/(d*x+c)/(a+I*a*tan(f*x+e)),x)
 

Output:

int(1/(tan(e + f*x)*c*i + tan(e + f*x)*d*i*x + c + d*x),x)/a