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

Optimal. Leaf size=436 $-\frac{f \text{CosIntegral}\left (\frac{4 c f}{d}+4 f x\right ) \sin \left (4 e-\frac{4 c f}{d}\right )}{a^2 d^2}-\frac{f \text{CosIntegral}\left (\frac{2 c f}{d}+2 f x\right ) \sin \left (2 e-\frac{2 c f}{d}\right )}{a^2 d^2}-\frac{i f \text{CosIntegral}\left (\frac{2 c f}{d}+2 f x\right ) \cos \left (2 e-\frac{2 c f}{d}\right )}{a^2 d^2}-\frac{i f \text{CosIntegral}\left (\frac{4 c f}{d}+4 f x\right ) \cos \left (4 e-\frac{4 c f}{d}\right )}{a^2 d^2}+\frac{i f \sin \left (2 e-\frac{2 c f}{d}\right ) \text{Si}\left (2 x f+\frac{2 c f}{d}\right )}{a^2 d^2}+\frac{i f \sin \left (4 e-\frac{4 c f}{d}\right ) \text{Si}\left (4 x f+\frac{4 c f}{d}\right )}{a^2 d^2}-\frac{f \cos \left (2 e-\frac{2 c f}{d}\right ) \text{Si}\left (2 x f+\frac{2 c f}{d}\right )}{a^2 d^2}-\frac{f \cos \left (4 e-\frac{4 c f}{d}\right ) \text{Si}\left (4 x f+\frac{4 c f}{d}\right )}{a^2 d^2}+\frac{\sin ^2(2 e+2 f x)}{4 a^2 d (c+d x)}+\frac{i \sin (2 e+2 f x)}{2 a^2 d (c+d x)}+\frac{i \sin (4 e+4 f x)}{4 a^2 d (c+d x)}-\frac{\cos ^2(2 e+2 f x)}{4 a^2 d (c+d x)}-\frac{\cos (2 e+2 f x)}{2 a^2 d (c+d x)}-\frac{1}{4 a^2 d (c+d x)}$

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.738799, antiderivative size = 436, normalized size of antiderivative = 1., number of steps used = 24, number of rules used = 7, integrand size = 23, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.304, Rules used = {3728, 3297, 3303, 3299, 3302, 3313, 12} $-\frac{f \text{CosIntegral}\left (\frac{4 c f}{d}+4 f x\right ) \sin \left (4 e-\frac{4 c f}{d}\right )}{a^2 d^2}-\frac{f \text{CosIntegral}\left (\frac{2 c f}{d}+2 f x\right ) \sin \left (2 e-\frac{2 c f}{d}\right )}{a^2 d^2}-\frac{i f \text{CosIntegral}\left (\frac{2 c f}{d}+2 f x\right ) \cos \left (2 e-\frac{2 c f}{d}\right )}{a^2 d^2}-\frac{i f \text{CosIntegral}\left (\frac{4 c f}{d}+4 f x\right ) \cos \left (4 e-\frac{4 c f}{d}\right )}{a^2 d^2}+\frac{i f \sin \left (2 e-\frac{2 c f}{d}\right ) \text{Si}\left (2 x f+\frac{2 c f}{d}\right )}{a^2 d^2}+\frac{i f \sin \left (4 e-\frac{4 c f}{d}\right ) \text{Si}\left (4 x f+\frac{4 c f}{d}\right )}{a^2 d^2}-\frac{f \cos \left (2 e-\frac{2 c f}{d}\right ) \text{Si}\left (2 x f+\frac{2 c f}{d}\right )}{a^2 d^2}-\frac{f \cos \left (4 e-\frac{4 c f}{d}\right ) \text{Si}\left (4 x f+\frac{4 c f}{d}\right )}{a^2 d^2}+\frac{\sin ^2(2 e+2 f x)}{4 a^2 d (c+d x)}+\frac{i \sin (2 e+2 f x)}{2 a^2 d (c+d x)}+\frac{i \sin (4 e+4 f x)}{4 a^2 d (c+d x)}-\frac{\cos ^2(2 e+2 f x)}{4 a^2 d (c+d x)}-\frac{\cos (2 e+2 f x)}{2 a^2 d (c+d x)}-\frac{1}{4 a^2 d (c+d x)}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

Rule 3728

Int[((c_.) + (d_.)*(x_))^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Int[ExpandIntegrand[(c
+ d*x)^m, (1/(2*a) + Cos[2*e + 2*f*x]/(2*a) + Sin[2*e + 2*f*x]/(2*b))^(-n), x], x] /; FreeQ[{a, b, c, d, e, f
}, x] && EqQ[a^2 + b^2, 0] && ILtQ[m, 0] && ILtQ[n, 0]

Rule 3297

Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[((c + d*x)^(m + 1)*Sin[e + f*x])/(d*(
m + 1)), x] - Dist[f/(d*(m + 1)), Int[(c + d*x)^(m + 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && LtQ[
m, -1]

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]

Rule 3313

Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)]^(n_), x_Symbol] :> Simp[((c + d*x)^(m + 1)*Sin[e + f*x]^
n)/(d*(m + 1)), x] - Dist[(f*n)/(d*(m + 1)), Int[ExpandTrigReduce[(c + d*x)^(m + 1), Cos[e + f*x]*Sin[e + f*x]
^(n - 1), x], x], x] /; FreeQ[{c, d, e, f, m}, x] && IGtQ[n, 1] && GeQ[m, -2] && LtQ[m, -1]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rubi steps

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

Mathematica [A]  time = 1.37489, size = 467, normalized size = 1.07 $-\frac{\left (\cos \left (2 \left (f \left (x-\frac{c}{d}\right )+e\right )\right )-i \sin \left (2 \left (f \left (x-\frac{c}{d}\right )+e\right )\right )\right ) \left (4 f (c+d x) \text{CosIntegral}\left (\frac{4 f (c+d x)}{d}\right ) \left (\sin \left (2 e-\frac{2 f (c+d x)}{d}\right )+i \cos \left (2 e-\frac{2 f (c+d x)}{d}\right )\right )+4 i f (c+d x) (\cos (2 f x)+i \sin (2 f x)) \text{CosIntegral}\left (\frac{2 f (c+d x)}{d}\right )-4 i c f \text{Si}\left (\frac{4 f (c+d x)}{d}\right ) \sin \left (2 e-\frac{2 f (c+d x)}{d}\right )-4 i d f x \text{Si}\left (\frac{4 f (c+d x)}{d}\right ) \sin \left (2 e-\frac{2 f (c+d x)}{d}\right )+4 c f \text{Si}\left (\frac{4 f (c+d x)}{d}\right ) \cos \left (2 e-\frac{2 f (c+d x)}{d}\right )+4 d f x \text{Si}\left (\frac{4 f (c+d x)}{d}\right ) \cos \left (2 e-\frac{2 f (c+d x)}{d}\right )+i d \sin \left (2 \left (f \left (x-\frac{c}{d}\right )+e\right )\right )-i d \sin \left (2 \left (f \left (\frac{c}{d}+x\right )+e\right )\right )+d \cos \left (2 \left (f \left (x-\frac{c}{d}\right )+e\right )\right )+d \cos \left (2 \left (f \left (\frac{c}{d}+x\right )+e\right )\right )+4 i c f \sin (2 f x) \text{Si}\left (\frac{2 f (c+d x)}{d}\right )+4 i d f x \sin (2 f x) \text{Si}\left (\frac{2 f (c+d x)}{d}\right )+4 c f \cos (2 f x) \text{Si}\left (\frac{2 f (c+d x)}{d}\right )+4 d f x \cos (2 f x) \text{Si}\left (\frac{2 f (c+d x)}{d}\right )-2 i d \sin \left (\frac{2 c f}{d}\right )+2 d \cos \left (\frac{2 c f}{d}\right )\right )}{4 a^2 d^2 (c+d x)}$

Warning: Unable to verify antiderivative.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.277, size = 175, normalized size = 0.4 \begin{align*} -{\frac{1}{4\,{a}^{2}d \left ( dx+c \right ) }}-{\frac{f{{\rm e}^{-4\,i \left ( fx+e \right ) }}}{4\,{a}^{2} \left ( dfx+cf \right ) d}}+{\frac{if}{{a}^{2}{d}^{2}}{{\rm e}^{{\frac{4\,i \left ( cf-de \right ) }{d}}}}{\it Ei} \left ( 1,4\,ifx+4\,ie+{\frac{4\,i \left ( cf-de \right ) }{d}} \right ) }-{\frac{f{{\rm e}^{-2\,i \left ( fx+e \right ) }}}{2\,{a}^{2} \left ( dfx+cf \right ) d}}+{\frac{if}{{a}^{2}{d}^{2}}{{\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)^2/(a+I*a*tan(f*x+e))^2,x)

[Out]

-1/4/a^2/d/(d*x+c)-1/4/a^2*f*exp(-4*I*(f*x+e))/(d*f*x+c*f)/d+I/a^2*f/d^2*exp(4*I*(c*f-d*e)/d)*Ei(1,4*I*f*x+4*I
*e+4*I*(c*f-d*e)/d)-1/2/a^2*f*exp(-2*I*(f*x+e))/(d*f*x+c*f)/d+I/a^2*f/d^2*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.50772, size = 284, normalized size = 0.65 \begin{align*} -\frac{64 \, f^{2} \cos \left (-\frac{4 \,{\left (d e - c f\right )}}{d}\right ) E_{2}\left (\frac{4 i \,{\left (f x + e\right )} d - 4 i \, d e + 4 i \, c f}{d}\right ) + 128 \, f^{2} \cos \left (-\frac{2 \,{\left (d e - c f\right )}}{d}\right ) E_{2}\left (\frac{2 i \,{\left (f x + e\right )} d - 2 i \, d e + 2 i \, c f}{d}\right ) + 128 i \, f^{2} E_{2}\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 ) + 64 i \, f^{2} E_{2}\left (\frac{4 i \,{\left (f x + e\right )} d - 4 i \, d e + 4 i \, c f}{d}\right ) \sin \left (-\frac{4 \,{\left (d e - c f\right )}}{d}\right ) + 64 \, f^{2}}{256 \,{\left ({\left (f x + e\right )} a^{2} d^{2} - a^{2} d^{2} e + a^{2} c d f\right )} f} \end{align*}

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

[In]

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

[Out]

-1/256*(64*f^2*cos(-4*(d*e - c*f)/d)*exp_integral_e(2, (4*I*(f*x + e)*d - 4*I*d*e + 4*I*c*f)/d) + 128*f^2*cos(
-2*(d*e - c*f)/d)*exp_integral_e(2, (2*I*(f*x + e)*d - 2*I*d*e + 2*I*c*f)/d) + 128*I*f^2*exp_integral_e(2, (2*
I*(f*x + e)*d - 2*I*d*e + 2*I*c*f)/d)*sin(-2*(d*e - c*f)/d) + 64*I*f^2*exp_integral_e(2, (4*I*(f*x + e)*d - 4*
I*d*e + 4*I*c*f)/d)*sin(-4*(d*e - c*f)/d) + 64*f^2)/(((f*x + e)*a^2*d^2 - a^2*d^2*e + a^2*c*d*f)*f)

________________________________________________________________________________________

Fricas [A]  time = 1.62919, size = 362, normalized size = 0.83 \begin{align*} \frac{{\left ({\left ({\left (-4 i \, d f x - 4 i \, c f\right )}{\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 )} +{\left (-4 i \, d f x - 4 i \, c f\right )}{\rm Ei}\left (\frac{-4 i \, d f x - 4 i \, c f}{d}\right ) e^{\left (\frac{-4 i \, d e + 4 i \, c f}{d}\right )} - d\right )} e^{\left (4 i \, f x + 4 i \, e\right )} - 2 \, d e^{\left (2 i \, f x + 2 i \, e\right )} - d\right )} e^{\left (-4 i \, f x - 4 i \, e\right )}}{4 \,{\left (a^{2} d^{3} x + a^{2} c d^{2}\right )}} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

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)**2/(a+I*a*tan(f*x+e))**2,x)

[Out]

Exception raised: AttributeError

________________________________________________________________________________________

Giac [B]  time = 1.99281, size = 1551, normalized size = 3.56 \begin{align*} \text{result too large to display} \end{align*}

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

[In]

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

[Out]

1/4*(-4*I*d*f*x*cos(2*c*f/d)*cos(2*e)*cos_integral(-2*(d*f*x + c*f)/d) - 4*I*d*f*x*cos(4*c*f/d)*cos(4*e)*cos_i
ntegral(-4*(d*f*x + c*f)/d) + 4*d*f*x*cos(4*e)*cos_integral(-4*(d*f*x + c*f)/d)*sin(4*c*f/d) + 4*d*f*x*cos(2*e
)*cos_integral(-2*(d*f*x + c*f)/d)*sin(2*c*f/d) - 4*d*f*x*cos(4*c*f/d)*cos_integral(-4*(d*f*x + c*f)/d)*sin(4*
e) - 4*I*d*f*x*cos_integral(-4*(d*f*x + c*f)/d)*sin(4*c*f/d)*sin(4*e) - 4*d*f*x*cos(2*c*f/d)*cos_integral(-2*(
d*f*x + c*f)/d)*sin(2*e) - 4*I*d*f*x*cos_integral(-2*(d*f*x + c*f)/d)*sin(2*c*f/d)*sin(2*e) - 4*d*f*x*cos(4*c*
f/d)*cos(4*e)*sin_integral(4*(d*f*x + c*f)/d) - 4*I*d*f*x*cos(4*e)*sin(4*c*f/d)*sin_integral(4*(d*f*x + c*f)/d
) + 4*I*d*f*x*cos(4*c*f/d)*sin(4*e)*sin_integral(4*(d*f*x + c*f)/d) - 4*d*f*x*sin(4*c*f/d)*sin(4*e)*sin_integr
al(4*(d*f*x + c*f)/d) - 4*d*f*x*cos(2*c*f/d)*cos(2*e)*sin_integral(2*(d*f*x + c*f)/d) - 4*I*d*f*x*cos(2*e)*sin
(2*c*f/d)*sin_integral(2*(d*f*x + c*f)/d) + 4*I*d*f*x*cos(2*c*f/d)*sin(2*e)*sin_integral(2*(d*f*x + c*f)/d) -
4*d*f*x*sin(2*c*f/d)*sin(2*e)*sin_integral(2*(d*f*x + c*f)/d) - 4*I*c*f*cos(2*c*f/d)*cos(2*e)*cos_integral(-2*
(d*f*x + c*f)/d) - 4*I*c*f*cos(4*c*f/d)*cos(4*e)*cos_integral(-4*(d*f*x + c*f)/d) + 4*c*f*cos(4*e)*cos_integra
l(-4*(d*f*x + c*f)/d)*sin(4*c*f/d) + 4*c*f*cos(2*e)*cos_integral(-2*(d*f*x + c*f)/d)*sin(2*c*f/d) - 4*c*f*cos(
4*c*f/d)*cos_integral(-4*(d*f*x + c*f)/d)*sin(4*e) - 4*I*c*f*cos_integral(-4*(d*f*x + c*f)/d)*sin(4*c*f/d)*sin
(4*e) - 4*c*f*cos(2*c*f/d)*cos_integral(-2*(d*f*x + c*f)/d)*sin(2*e) - 4*I*c*f*cos_integral(-2*(d*f*x + c*f)/d
)*sin(2*c*f/d)*sin(2*e) - 4*c*f*cos(4*c*f/d)*cos(4*e)*sin_integral(4*(d*f*x + c*f)/d) - 4*I*c*f*cos(4*e)*sin(4
*c*f/d)*sin_integral(4*(d*f*x + c*f)/d) + 4*I*c*f*cos(4*c*f/d)*sin(4*e)*sin_integral(4*(d*f*x + c*f)/d) - 4*c*
f*sin(4*c*f/d)*sin(4*e)*sin_integral(4*(d*f*x + c*f)/d) - 4*c*f*cos(2*c*f/d)*cos(2*e)*sin_integral(2*(d*f*x +
c*f)/d) - 4*I*c*f*cos(2*e)*sin(2*c*f/d)*sin_integral(2*(d*f*x + c*f)/d) + 4*I*c*f*cos(2*c*f/d)*sin(2*e)*sin_in
tegral(2*(d*f*x + c*f)/d) - 4*c*f*sin(2*c*f/d)*sin(2*e)*sin_integral(2*(d*f*x + c*f)/d) - d*cos(4*f*x)*cos(4*e
) - 2*d*cos(2*f*x)*cos(2*e) + I*d*cos(4*e)*sin(4*f*x) + 2*I*d*cos(2*e)*sin(2*f*x) + I*d*cos(4*f*x)*sin(4*e) +
d*sin(4*f*x)*sin(4*e) + 2*I*d*cos(2*f*x)*sin(2*e) + 2*d*sin(2*f*x)*sin(2*e))/(a^2*d^3*x + a^2*c*d^2) - 1/4/((d
*x + c)*a^2*d)