\(\int \frac {\sec ^7(c+d x)}{(a+i a \tan (c+d x))^2} \, dx\) [123]

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

Optimal result

Integrand size = 24, antiderivative size = 100 \[ \int \frac {\sec ^7(c+d x)}{(a+i a \tan (c+d x))^2} \, dx=\frac {5 \text {arctanh}(\sin (c+d x))}{8 a^2 d}+\frac {5 \sec (c+d x) \tan (c+d x)}{8 a^2 d}+\frac {5 \sec ^3(c+d x) \tan (c+d x)}{12 a^2 d}-\frac {2 i \sec ^5(c+d x)}{3 d \left (a^2+i a^2 \tan (c+d x)\right )} \] Output:

5/8*arctanh(sin(d*x+c))/a^2/d+5/8*sec(d*x+c)*tan(d*x+c)/a^2/d+5/12*sec(d*x 
+c)^3*tan(d*x+c)/a^2/d-2/3*I*sec(d*x+c)^5/d/(a^2+I*a^2*tan(d*x+c))
 

Mathematica [B] (verified)

Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(215\) vs. \(2(100)=200\).

Time = 1.29 (sec) , antiderivative size = 215, normalized size of antiderivative = 2.15 \[ \int \frac {\sec ^7(c+d x)}{(a+i a \tan (c+d x))^2} \, dx=-\frac {\sec ^4(c+d x) \left (128 i \cos (c+d x)+45 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+60 \cos (2 (c+d x)) \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )+15 \cos (4 (c+d x)) \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )-45 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+18 \sin (c+d x)-30 \sin (3 (c+d x))\right )}{192 a^2 d} \] Input:

Integrate[Sec[c + d*x]^7/(a + I*a*Tan[c + d*x])^2,x]
 

Output:

-1/192*(Sec[c + d*x]^4*((128*I)*Cos[c + d*x] + 45*Log[Cos[(c + d*x)/2] - S 
in[(c + d*x)/2]] + 60*Cos[2*(c + d*x)]*(Log[Cos[(c + d*x)/2] - Sin[(c + d* 
x)/2]] - Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]]) + 15*Cos[4*(c + d*x)]*( 
Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] - Log[Cos[(c + d*x)/2] + Sin[(c + 
 d*x)/2]]) - 45*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] + 18*Sin[c + d*x] 
 - 30*Sin[3*(c + d*x)]))/(a^2*d)
 

Rubi [A] (verified)

Time = 0.48 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.04, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3042, 3981, 3042, 4255, 3042, 4255, 3042, 4257}

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 {\sec ^7(c+d x)}{(a+i a \tan (c+d x))^2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\sec (c+d x)^7}{(a+i a \tan (c+d x))^2}dx\)

\(\Big \downarrow \) 3981

\(\displaystyle \frac {5 \int \sec ^5(c+d x)dx}{3 a^2}-\frac {2 i \sec ^5(c+d x)}{3 d \left (a^2+i a^2 \tan (c+d x)\right )}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {5 \int \csc \left (c+d x+\frac {\pi }{2}\right )^5dx}{3 a^2}-\frac {2 i \sec ^5(c+d x)}{3 d \left (a^2+i a^2 \tan (c+d x)\right )}\)

\(\Big \downarrow \) 4255

\(\displaystyle \frac {5 \left (\frac {3}{4} \int \sec ^3(c+d x)dx+\frac {\tan (c+d x) \sec ^3(c+d x)}{4 d}\right )}{3 a^2}-\frac {2 i \sec ^5(c+d x)}{3 d \left (a^2+i a^2 \tan (c+d x)\right )}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {5 \left (\frac {3}{4} \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx+\frac {\tan (c+d x) \sec ^3(c+d x)}{4 d}\right )}{3 a^2}-\frac {2 i \sec ^5(c+d x)}{3 d \left (a^2+i a^2 \tan (c+d x)\right )}\)

\(\Big \downarrow \) 4255

\(\displaystyle \frac {5 \left (\frac {3}{4} \left (\frac {1}{2} \int \sec (c+d x)dx+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {\tan (c+d x) \sec ^3(c+d x)}{4 d}\right )}{3 a^2}-\frac {2 i \sec ^5(c+d x)}{3 d \left (a^2+i a^2 \tan (c+d x)\right )}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {5 \left (\frac {3}{4} \left (\frac {1}{2} \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {\tan (c+d x) \sec ^3(c+d x)}{4 d}\right )}{3 a^2}-\frac {2 i \sec ^5(c+d x)}{3 d \left (a^2+i a^2 \tan (c+d x)\right )}\)

\(\Big \downarrow \) 4257

\(\displaystyle \frac {5 \left (\frac {3}{4} \left (\frac {\text {arctanh}(\sin (c+d x))}{2 d}+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {\tan (c+d x) \sec ^3(c+d x)}{4 d}\right )}{3 a^2}-\frac {2 i \sec ^5(c+d x)}{3 d \left (a^2+i a^2 \tan (c+d x)\right )}\)

Input:

Int[Sec[c + d*x]^7/(a + I*a*Tan[c + d*x])^2,x]
 

Output:

(((-2*I)/3)*Sec[c + d*x]^5)/(d*(a^2 + I*a^2*Tan[c + d*x])) + (5*((Sec[c + 
d*x]^3*Tan[c + d*x])/(4*d) + (3*(ArcTanh[Sin[c + d*x]]/(2*d) + (Sec[c + d* 
x]*Tan[c + d*x])/(2*d)))/4))/(3*a^2)
 

Defintions of rubi rules used

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

rule 3981
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x 
_)])^(n_), x_Symbol] :> Simp[2*d^2*(d*Sec[e + f*x])^(m - 2)*((a + b*Tan[e + 
 f*x])^(n + 1)/(b*f*(m + 2*n))), x] - Simp[d^2*((m - 2)/(b^2*(m + 2*n))) 
Int[(d*Sec[e + f*x])^(m - 2)*(a + b*Tan[e + f*x])^(n + 2), x], x] /; FreeQ[ 
{a, b, d, e, f, m}, x] && EqQ[a^2 + b^2, 0] && LtQ[n, -1] && ((ILtQ[n/2, 0] 
 && IGtQ[m - 1/2, 0]) || EqQ[n, -2] || IGtQ[m + n, 0] || (IntegersQ[n, m + 
1/2] && GtQ[2*m + n + 1, 0])) && IntegerQ[2*m]
 

rule 4255
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* 
x]*((b*Csc[c + d*x])^(n - 1)/(d*(n - 1))), x] + Simp[b^2*((n - 2)/(n - 1)) 
  Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] 
&& IntegerQ[2*n]
 

rule 4257
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] 
 /; FreeQ[{c, d}, x]
 
Maple [A] (verified)

Time = 0.79 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.11

method result size
risch \(-\frac {i \left (15 \,{\mathrm e}^{7 i \left (d x +c \right )}+55 \,{\mathrm e}^{5 i \left (d x +c \right )}+73 \,{\mathrm e}^{3 i \left (d x +c \right )}-15 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{12 d \,a^{2} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}+\frac {5 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{8 a^{2} d}-\frac {5 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{8 a^{2} d}\) \(111\)
derivativedivides \(\frac {\frac {2 \left (\frac {3}{16}+\frac {i}{2}\right )}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+\frac {2 \left (\frac {1}{16}+\frac {i}{2}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {2 \left (-\frac {1}{4}+\frac {i}{3}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4}}-\frac {5 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8}+\frac {2 \left (\frac {3}{16}-\frac {i}{2}\right )}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}+\frac {2 \left (-\frac {1}{16}+\frac {i}{2}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {2 \left (-\frac {1}{4}-\frac {i}{3}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}+\frac {5 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8}}{a^{2} d}\) \(170\)
default \(\frac {\frac {2 \left (\frac {3}{16}+\frac {i}{2}\right )}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+\frac {2 \left (\frac {1}{16}+\frac {i}{2}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {2 \left (-\frac {1}{4}+\frac {i}{3}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4}}-\frac {5 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8}+\frac {2 \left (\frac {3}{16}-\frac {i}{2}\right )}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}+\frac {2 \left (-\frac {1}{16}+\frac {i}{2}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {2 \left (-\frac {1}{4}-\frac {i}{3}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}+\frac {5 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8}}{a^{2} d}\) \(170\)

Input:

int(sec(d*x+c)^7/(a+I*a*tan(d*x+c))^2,x,method=_RETURNVERBOSE)
 

Output:

-1/12*I/d/a^2/(exp(2*I*(d*x+c))+1)^4*(15*exp(7*I*(d*x+c))+55*exp(5*I*(d*x+ 
c))+73*exp(3*I*(d*x+c))-15*exp(I*(d*x+c)))+5/8/a^2/d*ln(exp(I*(d*x+c))+I)- 
5/8/a^2/d*ln(exp(I*(d*x+c))-I)
 

Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 230 vs. \(2 (88) = 176\).

Time = 0.10 (sec) , antiderivative size = 230, normalized size of antiderivative = 2.30 \[ \int \frac {\sec ^7(c+d x)}{(a+i a \tan (c+d x))^2} \, dx=\frac {15 \, {\left (e^{\left (8 i \, d x + 8 i \, c\right )} + 4 \, e^{\left (6 i \, d x + 6 i \, c\right )} + 6 \, e^{\left (4 i \, d x + 4 i \, c\right )} + 4 \, e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )} \log \left (e^{\left (i \, d x + i \, c\right )} + i\right ) - 15 \, {\left (e^{\left (8 i \, d x + 8 i \, c\right )} + 4 \, e^{\left (6 i \, d x + 6 i \, c\right )} + 6 \, e^{\left (4 i \, d x + 4 i \, c\right )} + 4 \, e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )} \log \left (e^{\left (i \, d x + i \, c\right )} - i\right ) - 30 i \, e^{\left (7 i \, d x + 7 i \, c\right )} - 110 i \, e^{\left (5 i \, d x + 5 i \, c\right )} - 146 i \, e^{\left (3 i \, d x + 3 i \, c\right )} + 30 i \, e^{\left (i \, d x + i \, c\right )}}{24 \, {\left (a^{2} d e^{\left (8 i \, d x + 8 i \, c\right )} + 4 \, a^{2} d e^{\left (6 i \, d x + 6 i \, c\right )} + 6 \, a^{2} d e^{\left (4 i \, d x + 4 i \, c\right )} + 4 \, a^{2} d e^{\left (2 i \, d x + 2 i \, c\right )} + a^{2} d\right )}} \] Input:

integrate(sec(d*x+c)^7/(a+I*a*tan(d*x+c))^2,x, algorithm="fricas")
 

Output:

1/24*(15*(e^(8*I*d*x + 8*I*c) + 4*e^(6*I*d*x + 6*I*c) + 6*e^(4*I*d*x + 4*I 
*c) + 4*e^(2*I*d*x + 2*I*c) + 1)*log(e^(I*d*x + I*c) + I) - 15*(e^(8*I*d*x 
 + 8*I*c) + 4*e^(6*I*d*x + 6*I*c) + 6*e^(4*I*d*x + 4*I*c) + 4*e^(2*I*d*x + 
 2*I*c) + 1)*log(e^(I*d*x + I*c) - I) - 30*I*e^(7*I*d*x + 7*I*c) - 110*I*e 
^(5*I*d*x + 5*I*c) - 146*I*e^(3*I*d*x + 3*I*c) + 30*I*e^(I*d*x + I*c))/(a^ 
2*d*e^(8*I*d*x + 8*I*c) + 4*a^2*d*e^(6*I*d*x + 6*I*c) + 6*a^2*d*e^(4*I*d*x 
 + 4*I*c) + 4*a^2*d*e^(2*I*d*x + 2*I*c) + a^2*d)
 

Sympy [F]

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

integrate(sec(d*x+c)**7/(a+I*a*tan(d*x+c))**2,x)
 

Output:

-Integral(sec(c + d*x)**7/(tan(c + d*x)**2 - 2*I*tan(c + d*x) - 1), x)/a** 
2
 

Maxima [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 295 vs. \(2 (88) = 176\).

Time = 0.06 (sec) , antiderivative size = 295, normalized size of antiderivative = 2.95 \[ \int \frac {\sec ^7(c+d x)}{(a+i a \tan (c+d x))^2} \, dx=\frac {\frac {2 \, {\left (\frac {9 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {16 i \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {33 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {48 i \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {33 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {48 i \, \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {9 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} - 16 i\right )}}{a^{2} - \frac {4 \, a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {6 \, a^{2} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {4 \, a^{2} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {a^{2} \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}}} + \frac {15 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{2}} - \frac {15 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{2}}}{24 \, d} \] Input:

integrate(sec(d*x+c)^7/(a+I*a*tan(d*x+c))^2,x, algorithm="maxima")
 

Output:

1/24*(2*(9*sin(d*x + c)/(cos(d*x + c) + 1) + 16*I*sin(d*x + c)^2/(cos(d*x 
+ c) + 1)^2 - 33*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 - 48*I*sin(d*x + c)^4 
/(cos(d*x + c) + 1)^4 - 33*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 + 48*I*sin( 
d*x + c)^6/(cos(d*x + c) + 1)^6 + 9*sin(d*x + c)^7/(cos(d*x + c) + 1)^7 - 
16*I)/(a^2 - 4*a^2*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + 6*a^2*sin(d*x + c 
)^4/(cos(d*x + c) + 1)^4 - 4*a^2*sin(d*x + c)^6/(cos(d*x + c) + 1)^6 + a^2 
*sin(d*x + c)^8/(cos(d*x + c) + 1)^8) + 15*log(sin(d*x + c)/(cos(d*x + c) 
+ 1) + 1)/a^2 - 15*log(sin(d*x + c)/(cos(d*x + c) + 1) - 1)/a^2)/d
 

Giac [A] (verification not implemented)

Time = 0.24 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.51 \[ \int \frac {\sec ^7(c+d x)}{(a+i a \tan (c+d x))^2} \, dx=\frac {\frac {15 \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}{a^{2}} - \frac {15 \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}{a^{2}} + \frac {2 \, {\left (9 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 48 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 33 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 48 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 33 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 16 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 9 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 16 i\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{4} a^{2}}}{24 \, d} \] Input:

integrate(sec(d*x+c)^7/(a+I*a*tan(d*x+c))^2,x, algorithm="giac")
 

Output:

1/24*(15*log(tan(1/2*d*x + 1/2*c) + 1)/a^2 - 15*log(tan(1/2*d*x + 1/2*c) - 
 1)/a^2 + 2*(9*tan(1/2*d*x + 1/2*c)^7 + 48*I*tan(1/2*d*x + 1/2*c)^6 - 33*t 
an(1/2*d*x + 1/2*c)^5 - 48*I*tan(1/2*d*x + 1/2*c)^4 - 33*tan(1/2*d*x + 1/2 
*c)^3 + 16*I*tan(1/2*d*x + 1/2*c)^2 + 9*tan(1/2*d*x + 1/2*c) - 16*I)/((tan 
(1/2*d*x + 1/2*c)^2 - 1)^4*a^2))/d
 

Mupad [B] (verification not implemented)

Time = 3.10 (sec) , antiderivative size = 136, normalized size of antiderivative = 1.36 \[ \int \frac {\sec ^7(c+d x)}{(a+i a \tan (c+d x))^2} \, dx=\frac {5\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{4\,a^2\,d}+\frac {\frac {3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{4}+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,4{}\mathrm {i}-\frac {11\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{4}-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,4{}\mathrm {i}-\frac {11\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{4}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,4{}\mathrm {i}}{3}+\frac {3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}-\frac {4}{3}{}\mathrm {i}}{a^2\,d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )}^4} \] Input:

int(1/(cos(c + d*x)^7*(a + a*tan(c + d*x)*1i)^2),x)
 

Output:

(5*atanh(tan(c/2 + (d*x)/2)))/(4*a^2*d) + ((3*tan(c/2 + (d*x)/2))/4 + (tan 
(c/2 + (d*x)/2)^2*4i)/3 - (11*tan(c/2 + (d*x)/2)^3)/4 - tan(c/2 + (d*x)/2) 
^4*4i - (11*tan(c/2 + (d*x)/2)^5)/4 + tan(c/2 + (d*x)/2)^6*4i + (3*tan(c/2 
 + (d*x)/2)^7)/4 - 4i/3)/(a^2*d*(tan(c/2 + (d*x)/2)^2 - 1)^4)
 

Reduce [F]

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

int(sec(d*x+c)^7/(a+I*a*tan(d*x+c))^2,x)
 

Output:

( - int(sec(c + d*x)**7/(tan(c + d*x)**2 - 2*tan(c + d*x)*i - 1),x))/a**2