\(\int \frac {\sec ^9(c+d x)}{(a+i a \tan (c+d x))^4} \, dx\) [158]

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

Optimal result

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

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

Mathematica [A] (verified)

Time = 1.38 (sec) , antiderivative size = 237, normalized size of antiderivative = 1.78 \[ \int \frac {\sec ^9(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=-\frac {\sec ^4(c+d x) \left (896 i \cos (c+d x)+3 \left (128 i \cos (3 (c+d x))+105 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+35 \cos (4 (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+140 \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 )-105 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )-35 \cos (4 (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+42 \sin (c+d x)+58 \sin (3 (c+d x))\right )\right )}{192 a^4 d} \] Input:

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

Output:

-1/192*(Sec[c + d*x]^4*((896*I)*Cos[c + d*x] + 3*((128*I)*Cos[3*(c + d*x)] 
 + 105*Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] + 35*Cos[4*(c + d*x)]*Log[ 
Cos[(c + d*x)/2] - Sin[(c + d*x)/2]] + 140*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]]) - 
105*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] - 35*Cos[4*(c + d*x)]*Log[Cos 
[(c + d*x)/2] + Sin[(c + d*x)/2]] + 42*Sin[c + d*x] + 58*Sin[3*(c + d*x)]) 
))/(a^4*d)
 

Rubi [A] (verified)

Time = 0.67 (sec) , antiderivative size = 143, normalized size of antiderivative = 1.08, number of steps used = 10, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.417, Rules used = {3042, 3981, 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 ^9(c+d x)}{(a+i a \tan (c+d x))^4} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3981

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3981

\(\displaystyle \frac {7 \left (\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 )}\right )}{a^2}-\frac {2 i \sec ^7(c+d x)}{a d (a+i a \tan (c+d x))^3}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {7 \left (\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 )}\right )}{a^2}-\frac {2 i \sec ^7(c+d x)}{a d (a+i a \tan (c+d x))^3}\)

\(\Big \downarrow \) 4255

\(\displaystyle \frac {7 \left (\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 )}\right )}{a^2}-\frac {2 i \sec ^7(c+d x)}{a d (a+i a \tan (c+d x))^3}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {7 \left (\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 )}\right )}{a^2}-\frac {2 i \sec ^7(c+d x)}{a d (a+i a \tan (c+d x))^3}\)

\(\Big \downarrow \) 4255

\(\displaystyle \frac {7 \left (\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 )}\right )}{a^2}-\frac {2 i \sec ^7(c+d x)}{a d (a+i a \tan (c+d x))^3}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {7 \left (\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 )}\right )}{a^2}-\frac {2 i \sec ^7(c+d x)}{a d (a+i a \tan (c+d x))^3}\)

\(\Big \downarrow \) 4257

\(\displaystyle \frac {7 \left (\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 )}\right )}{a^2}-\frac {2 i \sec ^7(c+d x)}{a d (a+i a \tan (c+d x))^3}\)

Input:

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

Output:

((-2*I)*Sec[c + d*x]^7)/(a*d*(a + I*a*Tan[c + d*x])^3) + (7*((((-2*I)/3)*S 
ec[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)))/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 = 1.00 (sec) , antiderivative size = 111, normalized size of antiderivative = 0.83

method result size
risch \(-\frac {i \left (105 \,{\mathrm e}^{7 i \left (d x +c \right )}+385 \,{\mathrm e}^{5 i \left (d x +c \right )}+511 \,{\mathrm e}^{3 i \left (d x +c \right )}+279 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{12 d \,a^{4} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}+\frac {35 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{8 a^{4} d}-\frac {35 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{8 a^{4} d}\) \(111\)
derivativedivides \(\frac {\frac {2 \left (\frac {25}{16}-i\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {2 \left (\frac {1}{4}+\frac {2 i}{3}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {2 \left (-\frac {27}{16}-3 i\right )}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}-\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}+\frac {35 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8}+\frac {2 \left (\frac {1}{4}-\frac {2 i}{3}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}+\frac {2 \left (-\frac {25}{16}-i\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {2 \left (-\frac {27}{16}+3 i\right )}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4}}-\frac {35 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8}}{a^{4} d}\) \(170\)
default \(\frac {\frac {2 \left (\frac {25}{16}-i\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {2 \left (\frac {1}{4}+\frac {2 i}{3}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {2 \left (-\frac {27}{16}-3 i\right )}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}-\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}+\frac {35 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8}+\frac {2 \left (\frac {1}{4}-\frac {2 i}{3}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}+\frac {2 \left (-\frac {25}{16}-i\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {2 \left (-\frac {27}{16}+3 i\right )}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4}}-\frac {35 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8}}{a^{4} d}\) \(170\)

Input:

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

Output:

-1/12*I/d/a^4/(exp(2*I*(d*x+c))+1)^4*(105*exp(7*I*(d*x+c))+385*exp(5*I*(d* 
x+c))+511*exp(3*I*(d*x+c))+279*exp(I*(d*x+c)))+35/8/a^4/d*ln(exp(I*(d*x+c) 
)+I)-35/8/a^4/d*ln(exp(I*(d*x+c))-I)
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 230, normalized size of antiderivative = 1.73 \[ \int \frac {\sec ^9(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {105 \, {\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 ) - 105 \, {\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 ) - 210 i \, e^{\left (7 i \, d x + 7 i \, c\right )} - 770 i \, e^{\left (5 i \, d x + 5 i \, c\right )} - 1022 i \, e^{\left (3 i \, d x + 3 i \, c\right )} - 558 i \, e^{\left (i \, d x + i \, c\right )}}{24 \, {\left (a^{4} d e^{\left (8 i \, d x + 8 i \, c\right )} + 4 \, a^{4} d e^{\left (6 i \, d x + 6 i \, c\right )} + 6 \, a^{4} d e^{\left (4 i \, d x + 4 i \, c\right )} + 4 \, a^{4} d e^{\left (2 i \, d x + 2 i \, c\right )} + a^{4} d\right )}} \] Input:

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

Output:

1/24*(105*(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) - 105*(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) - 210*I*e^(7*I*d*x + 7*I*c) - 770* 
I*e^(5*I*d*x + 5*I*c) - 1022*I*e^(3*I*d*x + 3*I*c) - 558*I*e^(I*d*x + I*c) 
)/(a^4*d*e^(8*I*d*x + 8*I*c) + 4*a^4*d*e^(6*I*d*x + 6*I*c) + 6*a^4*d*e^(4* 
I*d*x + 4*I*c) + 4*a^4*d*e^(2*I*d*x + 2*I*c) + a^4*d)
 

Sympy [F]

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

integrate(sec(d*x+c)**9/(a+I*a*tan(d*x+c))**4,x)
 

Output:

Integral(sec(c + d*x)**9/(tan(c + d*x)**4 - 4*I*tan(c + d*x)**3 - 6*tan(c 
+ d*x)**2 + 4*I*tan(c + d*x) + 1), x)/a**4
 

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 (117) = 234\).

Time = 0.05 (sec) , antiderivative size = 295, normalized size of antiderivative = 2.22 \[ \int \frac {\sec ^9(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=-\frac {\frac {2 \, {\left (\frac {81 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {544 i \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {105 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {480 i \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {105 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {96 i \, \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {81 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} + 160 i\right )}}{a^{4} - \frac {4 \, a^{4} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {6 \, a^{4} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {4 \, a^{4} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {a^{4} \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}}} - \frac {105 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{4}} + \frac {105 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{4}}}{24 \, d} \] Input:

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

Output:

-1/24*(2*(81*sin(d*x + c)/(cos(d*x + c) + 1) - 544*I*sin(d*x + c)^2/(cos(d 
*x + c) + 1)^2 - 105*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 480*I*sin(d*x + 
 c)^4/(cos(d*x + c) + 1)^4 - 105*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 - 96* 
I*sin(d*x + c)^6/(cos(d*x + c) + 1)^6 + 81*sin(d*x + c)^7/(cos(d*x + c) + 
1)^7 + 160*I)/(a^4 - 4*a^4*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + 6*a^4*sin 
(d*x + c)^4/(cos(d*x + c) + 1)^4 - 4*a^4*sin(d*x + c)^6/(cos(d*x + c) + 1) 
^6 + a^4*sin(d*x + c)^8/(cos(d*x + c) + 1)^8) - 105*log(sin(d*x + c)/(cos( 
d*x + c) + 1) + 1)/a^4 + 105*log(sin(d*x + c)/(cos(d*x + c) + 1) - 1)/a^4) 
/d
 

Giac [A] (verification not implemented)

Time = 0.39 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.14 \[ \int \frac {\sec ^9(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {\frac {105 \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}{a^{4}} - \frac {105 \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}{a^{4}} - \frac {2 \, {\left (81 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 96 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 105 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 480 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 105 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 544 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 81 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 160 i\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{4} a^{4}}}{24 \, d} \] Input:

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

Output:

1/24*(105*log(tan(1/2*d*x + 1/2*c) + 1)/a^4 - 105*log(tan(1/2*d*x + 1/2*c) 
 - 1)/a^4 - 2*(81*tan(1/2*d*x + 1/2*c)^7 - 96*I*tan(1/2*d*x + 1/2*c)^6 - 1 
05*tan(1/2*d*x + 1/2*c)^5 + 480*I*tan(1/2*d*x + 1/2*c)^4 - 105*tan(1/2*d*x 
 + 1/2*c)^3 - 544*I*tan(1/2*d*x + 1/2*c)^2 + 81*tan(1/2*d*x + 1/2*c) + 160 
*I)/((tan(1/2*d*x + 1/2*c)^2 - 1)^4*a^4))/d
 

Mupad [B] (verification not implemented)

Time = 4.11 (sec) , antiderivative size = 197, normalized size of antiderivative = 1.48 \[ \int \frac {\sec ^9(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {35\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{4\,a^4\,d}+\frac {\frac {35\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{4\,a^4}+\frac {35\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{4\,a^4}-\frac {27\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{4\,a^4}-\frac {27\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4\,a^4}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,136{}\mathrm {i}}{3\,a^4}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,40{}\mathrm {i}}{a^4}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,8{}\mathrm {i}}{a^4}-\frac {40{}\mathrm {i}}{3\,a^4}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \] Input:

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

Output:

(35*atanh(tan(c/2 + (d*x)/2)))/(4*a^4*d) + ((tan(c/2 + (d*x)/2)^2*136i)/(3 
*a^4) + (35*tan(c/2 + (d*x)/2)^3)/(4*a^4) - (tan(c/2 + (d*x)/2)^4*40i)/a^4 
 + (35*tan(c/2 + (d*x)/2)^5)/(4*a^4) + (tan(c/2 + (d*x)/2)^6*8i)/a^4 - (27 
*tan(c/2 + (d*x)/2)^7)/(4*a^4) - 40i/(3*a^4) - (27*tan(c/2 + (d*x)/2))/(4* 
a^4))/(d*(6*tan(c/2 + (d*x)/2)^4 - 4*tan(c/2 + (d*x)/2)^2 - 4*tan(c/2 + (d 
*x)/2)^6 + tan(c/2 + (d*x)/2)^8 + 1))
 

Reduce [B] (verification not implemented)

Time = 0.22 (sec) , antiderivative size = 216, normalized size of antiderivative = 1.62 \[ \int \frac {\sec ^9(c+d x)}{(a+i a \tan (c+d x))^4} \, dx=\frac {192 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} i -160 \cos \left (d x +c \right ) i -105 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{4}+210 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{2}-105 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+105 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{4}-210 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{2}+105 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-112 \sin \left (d x +c \right )^{4} i +87 \sin \left (d x +c \right )^{3}+224 \sin \left (d x +c \right )^{2} i -81 \sin \left (d x +c \right )-112 i}{24 a^{4} d \left (\sin \left (d x +c \right )^{4}-2 \sin \left (d x +c \right )^{2}+1\right )} \] Input:

int(sec(d*x+c)^9/(a+I*a*tan(d*x+c))^4,x)
 

Output:

(192*cos(c + d*x)*sin(c + d*x)**2*i - 160*cos(c + d*x)*i - 105*log(tan((c 
+ d*x)/2) - 1)*sin(c + d*x)**4 + 210*log(tan((c + d*x)/2) - 1)*sin(c + d*x 
)**2 - 105*log(tan((c + d*x)/2) - 1) + 105*log(tan((c + d*x)/2) + 1)*sin(c 
 + d*x)**4 - 210*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**2 + 105*log(tan(( 
c + d*x)/2) + 1) - 112*sin(c + d*x)**4*i + 87*sin(c + d*x)**3 + 224*sin(c 
+ d*x)**2*i - 81*sin(c + d*x) - 112*i)/(24*a**4*d*(sin(c + d*x)**4 - 2*sin 
(c + d*x)**2 + 1))