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

Optimal. Leaf size=161 $-\frac{i \text{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{\text{CosIntegral}\left (\frac{2 c f}{d}+2 f x\right ) \cos \left (2 e-\frac{2 c f}{d}\right )}{2 a d}-\frac{\sin \left (2 e-\frac{2 c f}{d}\right ) \text{Si}\left (2 x f+\frac{2 c f}{d}\right )}{2 a d}-\frac{i \cos \left (2 e-\frac{2 c f}{d}\right ) \text{Si}\left (2 x f+\frac{2 c f}{d}\right )}{2 a d}+\frac{\log (c+d x)}{2 a d}$

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.276545, antiderivative size = 161, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 4, integrand size = 23, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.174, Rules used = {3726, 3303, 3299, 3302} $-\frac{i \text{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{\text{CosIntegral}\left (\frac{2 c f}{d}+2 f x\right ) \cos \left (2 e-\frac{2 c f}{d}\right )}{2 a d}-\frac{\sin \left (2 e-\frac{2 c f}{d}\right ) \text{Si}\left (2 x f+\frac{2 c f}{d}\right )}{2 a d}-\frac{i \cos \left (2 e-\frac{2 c f}{d}\right ) \text{Si}\left (2 x f+\frac{2 c f}{d}\right )}{2 a d}+\frac{\log (c+d x)}{2 a d}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

Rule 3726

Int[1/(((c_.) + (d_.)*(x_))*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])), x_Symbol] :> Simp[Log[c + d*x]/(2*a*d), x
] + (Dist[1/(2*a), Int[Cos[2*e + 2*f*x]/(c + d*x), x], x] + Dist[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]

Rule 3303

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Dist[Cos[(d*e - c*f)/d], Int[Sin[(c*f)/d + f*x]
/(c + d*x), x], x] + Dist[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 3299

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

Rule 3302

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

Rubi steps

\begin{align*} \int \frac{1}{(c+d x) (a+i a \tan (e+f x))} \, dx &=\frac{\log (c+d x)}{2 a d}-\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}-\frac{\left (i \cos \left (2 e-\frac{2 c f}{d}\right )\right ) \int \frac{\sin \left (\frac{2 c f}{d}+2 f x\right )}{c+d x} \, dx}{2 a}+\frac{\cos \left (2 e-\frac{2 c f}{d}\right ) \int \frac{\cos \left (\frac{2 c f}{d}+2 f x\right )}{c+d x} \, dx}{2 a}-\frac{\left (i \sin \left (2 e-\frac{2 c f}{d}\right )\right ) \int \frac{\cos \left (\frac{2 c f}{d}+2 f x\right )}{c+d x} \, dx}{2 a}-\frac{\sin \left (2 e-\frac{2 c f}{d}\right ) \int \frac{\sin \left (\frac{2 c f}{d}+2 f x\right )}{c+d x} \, dx}{2 a}\\ &=\frac{\cos \left (2 e-\frac{2 c f}{d}\right ) \text{Ci}\left (\frac{2 c f}{d}+2 f x\right )}{2 a d}+\frac{\log (c+d x)}{2 a d}-\frac{i \text{Ci}\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}\\ \end{align*}

Mathematica [A]  time = 0.310651, size = 166, normalized size = 1.03 $\frac{\sec (e+f x) \left (\sin \left (f \left (\frac{c}{d}+x\right )\right )-i \cos \left (f \left (\frac{c}{d}+x\right )\right )\right ) \left (\text{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 )+\text{Si}\left (\frac{2 f (c+d x)}{d}\right ) \left (-\sin \left (e-\frac{c f}{d}\right )-i \cos \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 )\right )}{2 a d (\tan (e+f x)-i)}$

Warning: Unable to verify antiderivative.

[In]

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

[Out]

(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]))

________________________________________________________________________________________

Maple [A]  time = 0.15, size = 65, normalized size = 0.4 \begin{align*}{\frac{\ln \left ( dx+c \right ) }{2\,ad}}-{\frac{1}{2\,ad}{{\rm e}^{{\frac{2\,i \left ( cf-de \right ) }{d}}}}{\it Ei} \left ( 1,2\,ifx+2\,ie+{\frac{2\,i \left ( cf-de \right ) }{d}} \right ) } \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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)

________________________________________________________________________________________

Maxima [A]  time = 1.19139, size = 149, normalized size = 0.93 \begin{align*} -\frac{f \cos \left (-\frac{2 \,{\left (d e - c f\right )}}{d}\right ) E_{1}\left (\frac{2 i \,{\left (f x + e\right )} d - 2 i \, d e + 2 i \, c f}{d}\right ) + i \, f E_{1}\left (\frac{2 i \,{\left (f x + e\right )} d - 2 i \, d e + 2 i \, c f}{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} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.59565, size = 119, normalized size = 0.74 \begin{align*} \frac{{\rm Ei}\left (\frac{-2 i \, d f x - 2 i \, c f}{d}\right ) e^{\left (\frac{-2 i \, d e + 2 i \, c f}{d}\right )} + \log \left (\frac{d x + c}{d}\right )}{2 \, a d} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: AttributeError

________________________________________________________________________________________

Giac [A]  time = 1.17769, size = 192, normalized size = 1.19 \begin{align*} \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 \, \operatorname{Ci}\left (-\frac{2 \,{\left (d f x + c f\right )}}{d}\right ) \sin \left (\frac{2 \, c f}{d}\right ) + i \, \log \left (d x + c\right ) \sin \left (2 \, e\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 \, a d \cos \left (2 \, e\right ) + 2 i \, a d \sin \left (2 \, e\right )} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(cos(2*c*f/d)*cos_integral(-2*(d*f*x + c*f)/d) + cos(2*e)*log(d*x + c) + I*cos_integral(-2*(d*f*x + c*f)/d)*si
n(2*c*f/d) + I*log(d*x + c)*sin(2*e) - I*cos(2*c*f/d)*sin_integral(2*(d*f*x + c*f)/d) + sin(2*c*f/d)*sin_integ
ral(2*(d*f*x + c*f)/d))/(2*a*d*cos(2*e) + 2*I*a*d*sin(2*e))