\(\int (a+a \sec (c+d x))^3 \tan ^7(c+d x) \, dx\) [38]

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

Optimal result

Integrand size = 21, antiderivative size = 137 \[ \int (a+a \sec (c+d x))^3 \tan ^7(c+d x) \, dx=\frac {a^3 \log (\cos (c+d x))}{d}-\frac {3 a^3 \sec (c+d x)}{d}+\frac {8 a^3 \sec ^3(c+d x)}{3 d}+\frac {3 a^3 \sec ^4(c+d x)}{2 d}-\frac {6 a^3 \sec ^5(c+d x)}{5 d}-\frac {4 a^3 \sec ^6(c+d x)}{3 d}+\frac {3 a^3 \sec ^8(c+d x)}{8 d}+\frac {a^3 \sec ^9(c+d x)}{9 d} \] Output:

a^3*ln(cos(d*x+c))/d-3*a^3*sec(d*x+c)/d+8/3*a^3*sec(d*x+c)^3/d+3/2*a^3*sec 
(d*x+c)^4/d-6/5*a^3*sec(d*x+c)^5/d-4/3*a^3*sec(d*x+c)^6/d+3/8*a^3*sec(d*x+ 
c)^8/d+1/9*a^3*sec(d*x+c)^9/d
 

Mathematica [A] (verified)

Time = 0.40 (sec) , antiderivative size = 167, normalized size of antiderivative = 1.22 \[ \int (a+a \sec (c+d x))^3 \tan ^7(c+d x) \, dx=\frac {a^3 (-3754-7632 \cos (2 (c+d x))+1560 \cos (3 (c+d x))-3528 \cos (4 (c+d x))+1080 \cos (5 (c+d x))-1200 \cos (6 (c+d x))-270 \cos (8 (c+d x))+3780 \cos (3 (c+d x)) \log (\cos (c+d x))+1620 \cos (5 (c+d x)) \log (\cos (c+d x))+405 \cos (7 (c+d x)) \log (\cos (c+d x))+45 \cos (9 (c+d x)) \log (\cos (c+d x))+90 \cos (c+d x) (40+63 \log (\cos (c+d x)))) \sec ^9(c+d x)}{11520 d} \] Input:

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

Output:

(a^3*(-3754 - 7632*Cos[2*(c + d*x)] + 1560*Cos[3*(c + d*x)] - 3528*Cos[4*( 
c + d*x)] + 1080*Cos[5*(c + d*x)] - 1200*Cos[6*(c + d*x)] - 270*Cos[8*(c + 
 d*x)] + 3780*Cos[3*(c + d*x)]*Log[Cos[c + d*x]] + 1620*Cos[5*(c + d*x)]*L 
og[Cos[c + d*x]] + 405*Cos[7*(c + d*x)]*Log[Cos[c + d*x]] + 45*Cos[9*(c + 
d*x)]*Log[Cos[c + d*x]] + 90*Cos[c + d*x]*(40 + 63*Log[Cos[c + d*x]]))*Sec 
[c + d*x]^9)/(11520*d)
 

Rubi [A] (verified)

Time = 0.28 (sec) , antiderivative size = 98, normalized size of antiderivative = 0.72, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3042, 25, 4367, 27, 99, 2009}

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

\(\Big \downarrow \) 3042

\(\displaystyle \int -\cot \left (c+d x+\frac {\pi }{2}\right )^7 \left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^3dx\)

\(\Big \downarrow \) 25

\(\displaystyle -\int \cot \left (\frac {1}{2} (2 c+\pi )+d x\right )^7 \left (\csc \left (\frac {1}{2} (2 c+\pi )+d x\right ) a+a\right )^3dx\)

\(\Big \downarrow \) 4367

\(\displaystyle -\frac {\int a^9 (1-\cos (c+d x))^3 (\cos (c+d x)+1)^6 \sec ^{10}(c+d x)d\cos (c+d x)}{a^6 d}\)

\(\Big \downarrow \) 27

\(\displaystyle -\frac {a^3 \int (1-\cos (c+d x))^3 (\cos (c+d x)+1)^6 \sec ^{10}(c+d x)d\cos (c+d x)}{d}\)

\(\Big \downarrow \) 99

\(\displaystyle -\frac {a^3 \int \left (\sec ^{10}(c+d x)+3 \sec ^9(c+d x)-8 \sec ^7(c+d x)-6 \sec ^6(c+d x)+6 \sec ^5(c+d x)+8 \sec ^4(c+d x)-3 \sec ^2(c+d x)-\sec (c+d x)\right )d\cos (c+d x)}{d}\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {a^3 \left (-\frac {1}{9} \sec ^9(c+d x)-\frac {3}{8} \sec ^8(c+d x)+\frac {4}{3} \sec ^6(c+d x)+\frac {6}{5} \sec ^5(c+d x)-\frac {3}{2} \sec ^4(c+d x)-\frac {8}{3} \sec ^3(c+d x)+3 \sec (c+d x)-\log (\cos (c+d x))\right )}{d}\)

Input:

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

Output:

-((a^3*(-Log[Cos[c + d*x]] + 3*Sec[c + d*x] - (8*Sec[c + d*x]^3)/3 - (3*Se 
c[c + d*x]^4)/2 + (6*Sec[c + d*x]^5)/5 + (4*Sec[c + d*x]^6)/3 - (3*Sec[c + 
 d*x]^8)/8 - Sec[c + d*x]^9/9))/d)
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 99
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) 
)^(p_), x_] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], 
 x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] && (IntegerQ[p] | 
| (GtQ[m, 0] && GeQ[n, -1]))
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

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

rule 4367
Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n 
_.), x_Symbol] :> Simp[1/(a^(m - n - 1)*b^n*d)   Subst[Int[(a - b*x)^((m - 
1)/2)*((a + b*x)^((m - 1)/2 + n)/x^(m + n)), x], x, Sin[c + d*x]], x] /; Fr 
eeQ[{a, b, c, d}, x] && IntegerQ[(m - 1)/2] && EqQ[a^2 - b^2, 0] && Integer 
Q[n]
 
Maple [A] (verified)

Time = 1.01 (sec) , antiderivative size = 86, normalized size of antiderivative = 0.63

method result size
derivativedivides \(\frac {a^{3} \left (\frac {\sec \left (d x +c \right )^{9}}{9}+\frac {3 \sec \left (d x +c \right )^{8}}{8}-\frac {4 \sec \left (d x +c \right )^{6}}{3}-\frac {6 \sec \left (d x +c \right )^{5}}{5}+\frac {3 \sec \left (d x +c \right )^{4}}{2}+\frac {8 \sec \left (d x +c \right )^{3}}{3}-3 \sec \left (d x +c \right )-\ln \left (\sec \left (d x +c \right )\right )\right )}{d}\) \(86\)
default \(\frac {a^{3} \left (\frac {\sec \left (d x +c \right )^{9}}{9}+\frac {3 \sec \left (d x +c \right )^{8}}{8}-\frac {4 \sec \left (d x +c \right )^{6}}{3}-\frac {6 \sec \left (d x +c \right )^{5}}{5}+\frac {3 \sec \left (d x +c \right )^{4}}{2}+\frac {8 \sec \left (d x +c \right )^{3}}{3}-3 \sec \left (d x +c \right )-\ln \left (\sec \left (d x +c \right )\right )\right )}{d}\) \(86\)
parts \(\frac {a^{3} \left (\frac {\tan \left (d x +c \right )^{6}}{6}-\frac {\tan \left (d x +c \right )^{4}}{4}+\frac {\tan \left (d x +c \right )^{2}}{2}-\frac {\ln \left (1+\tan \left (d x +c \right )^{2}\right )}{2}\right )}{d}+\frac {a^{3} \left (\frac {\sec \left (d x +c \right )^{9}}{9}-\frac {3 \sec \left (d x +c \right )^{7}}{7}+\frac {3 \sec \left (d x +c \right )^{5}}{5}-\frac {\sec \left (d x +c \right )^{3}}{3}\right )}{d}+\frac {3 a^{3} \left (\frac {\sec \left (d x +c \right )^{7}}{7}-\frac {3 \sec \left (d x +c \right )^{5}}{5}+\sec \left (d x +c \right )^{3}-\sec \left (d x +c \right )\right )}{d}+\frac {3 a^{3} \tan \left (d x +c \right )^{8}}{8 d}\) \(162\)
risch \(-i a^{3} x -\frac {2 i a^{3} c}{d}-\frac {2 a^{3} \left (135 \,{\mathrm e}^{17 i \left (d x +c \right )}+600 \,{\mathrm e}^{15 i \left (d x +c \right )}-540 \,{\mathrm e}^{14 i \left (d x +c \right )}+1764 \,{\mathrm e}^{13 i \left (d x +c \right )}-780 \,{\mathrm e}^{12 i \left (d x +c \right )}+3816 \,{\mathrm e}^{11 i \left (d x +c \right )}-1800 \,{\mathrm e}^{10 i \left (d x +c \right )}+3754 \,{\mathrm e}^{9 i \left (d x +c \right )}-1800 \,{\mathrm e}^{8 i \left (d x +c \right )}+3816 \,{\mathrm e}^{7 i \left (d x +c \right )}-780 \,{\mathrm e}^{6 i \left (d x +c \right )}+1764 \,{\mathrm e}^{5 i \left (d x +c \right )}-540 \,{\mathrm e}^{4 i \left (d x +c \right )}+600 \,{\mathrm e}^{3 i \left (d x +c \right )}+135 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{45 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{9}}+\frac {a^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) \(225\)

Input:

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

Output:

a^3/d*(1/9*sec(d*x+c)^9+3/8*sec(d*x+c)^8-4/3*sec(d*x+c)^6-6/5*sec(d*x+c)^5 
+3/2*sec(d*x+c)^4+8/3*sec(d*x+c)^3-3*sec(d*x+c)-ln(sec(d*x+c)))
 

Fricas [A] (verification not implemented)

Time = 0.10 (sec) , antiderivative size = 117, normalized size of antiderivative = 0.85 \[ \int (a+a \sec (c+d x))^3 \tan ^7(c+d x) \, dx=\frac {360 \, a^{3} \cos \left (d x + c\right )^{9} \log \left (-\cos \left (d x + c\right )\right ) - 1080 \, a^{3} \cos \left (d x + c\right )^{8} + 960 \, a^{3} \cos \left (d x + c\right )^{6} + 540 \, a^{3} \cos \left (d x + c\right )^{5} - 432 \, a^{3} \cos \left (d x + c\right )^{4} - 480 \, a^{3} \cos \left (d x + c\right )^{3} + 135 \, a^{3} \cos \left (d x + c\right ) + 40 \, a^{3}}{360 \, d \cos \left (d x + c\right )^{9}} \] Input:

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

Output:

1/360*(360*a^3*cos(d*x + c)^9*log(-cos(d*x + c)) - 1080*a^3*cos(d*x + c)^8 
 + 960*a^3*cos(d*x + c)^6 + 540*a^3*cos(d*x + c)^5 - 432*a^3*cos(d*x + c)^ 
4 - 480*a^3*cos(d*x + c)^3 + 135*a^3*cos(d*x + c) + 40*a^3)/(d*cos(d*x + c 
)^9)
 

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 350 vs. \(2 (126) = 252\).

Time = 1.99 (sec) , antiderivative size = 350, normalized size of antiderivative = 2.55 \[ \int (a+a \sec (c+d x))^3 \tan ^7(c+d x) \, dx=\begin {cases} - \frac {a^{3} \log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 d} + \frac {a^{3} \tan ^{6}{\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}}{9 d} + \frac {3 a^{3} \tan ^{6}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}}{8 d} + \frac {3 a^{3} \tan ^{6}{\left (c + d x \right )} \sec {\left (c + d x \right )}}{7 d} + \frac {a^{3} \tan ^{6}{\left (c + d x \right )}}{6 d} - \frac {2 a^{3} \tan ^{4}{\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}}{21 d} - \frac {3 a^{3} \tan ^{4}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}}{8 d} - \frac {18 a^{3} \tan ^{4}{\left (c + d x \right )} \sec {\left (c + d x \right )}}{35 d} - \frac {a^{3} \tan ^{4}{\left (c + d x \right )}}{4 d} + \frac {8 a^{3} \tan ^{2}{\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}}{105 d} + \frac {3 a^{3} \tan ^{2}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}}{8 d} + \frac {24 a^{3} \tan ^{2}{\left (c + d x \right )} \sec {\left (c + d x \right )}}{35 d} + \frac {a^{3} \tan ^{2}{\left (c + d x \right )}}{2 d} - \frac {16 a^{3} \sec ^{3}{\left (c + d x \right )}}{315 d} - \frac {3 a^{3} \sec ^{2}{\left (c + d x \right )}}{8 d} - \frac {48 a^{3} \sec {\left (c + d x \right )}}{35 d} & \text {for}\: d \neq 0 \\x \left (a \sec {\left (c \right )} + a\right )^{3} \tan ^{7}{\left (c \right )} & \text {otherwise} \end {cases} \] Input:

integrate((a+a*sec(d*x+c))**3*tan(d*x+c)**7,x)
 

Output:

Piecewise((-a**3*log(tan(c + d*x)**2 + 1)/(2*d) + a**3*tan(c + d*x)**6*sec 
(c + d*x)**3/(9*d) + 3*a**3*tan(c + d*x)**6*sec(c + d*x)**2/(8*d) + 3*a**3 
*tan(c + d*x)**6*sec(c + d*x)/(7*d) + a**3*tan(c + d*x)**6/(6*d) - 2*a**3* 
tan(c + d*x)**4*sec(c + d*x)**3/(21*d) - 3*a**3*tan(c + d*x)**4*sec(c + d* 
x)**2/(8*d) - 18*a**3*tan(c + d*x)**4*sec(c + d*x)/(35*d) - a**3*tan(c + d 
*x)**4/(4*d) + 8*a**3*tan(c + d*x)**2*sec(c + d*x)**3/(105*d) + 3*a**3*tan 
(c + d*x)**2*sec(c + d*x)**2/(8*d) + 24*a**3*tan(c + d*x)**2*sec(c + d*x)/ 
(35*d) + a**3*tan(c + d*x)**2/(2*d) - 16*a**3*sec(c + d*x)**3/(315*d) - 3* 
a**3*sec(c + d*x)**2/(8*d) - 48*a**3*sec(c + d*x)/(35*d), Ne(d, 0)), (x*(a 
*sec(c) + a)**3*tan(c)**7, True))
 

Maxima [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 110, normalized size of antiderivative = 0.80 \[ \int (a+a \sec (c+d x))^3 \tan ^7(c+d x) \, dx=\frac {360 \, a^{3} \log \left (\cos \left (d x + c\right )\right ) - \frac {1080 \, a^{3} \cos \left (d x + c\right )^{8} - 960 \, a^{3} \cos \left (d x + c\right )^{6} - 540 \, a^{3} \cos \left (d x + c\right )^{5} + 432 \, a^{3} \cos \left (d x + c\right )^{4} + 480 \, a^{3} \cos \left (d x + c\right )^{3} - 135 \, a^{3} \cos \left (d x + c\right ) - 40 \, a^{3}}{\cos \left (d x + c\right )^{9}}}{360 \, d} \] Input:

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

Output:

1/360*(360*a^3*log(cos(d*x + c)) - (1080*a^3*cos(d*x + c)^8 - 960*a^3*cos( 
d*x + c)^6 - 540*a^3*cos(d*x + c)^5 + 432*a^3*cos(d*x + c)^4 + 480*a^3*cos 
(d*x + c)^3 - 135*a^3*cos(d*x + c) - 40*a^3)/cos(d*x + c)^9)/d
 

Giac [A] (verification not implemented)

Time = 0.47 (sec) , antiderivative size = 111, normalized size of antiderivative = 0.81 \[ \int (a+a \sec (c+d x))^3 \tan ^7(c+d x) \, dx=\frac {360 \, a^{3} \log \left ({\left | \cos \left (d x + c\right ) \right |}\right ) - \frac {1080 \, a^{3} \cos \left (d x + c\right )^{8} - 960 \, a^{3} \cos \left (d x + c\right )^{6} - 540 \, a^{3} \cos \left (d x + c\right )^{5} + 432 \, a^{3} \cos \left (d x + c\right )^{4} + 480 \, a^{3} \cos \left (d x + c\right )^{3} - 135 \, a^{3} \cos \left (d x + c\right ) - 40 \, a^{3}}{\cos \left (d x + c\right )^{9}}}{360 \, d} \] Input:

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

Output:

1/360*(360*a^3*log(abs(cos(d*x + c))) - (1080*a^3*cos(d*x + c)^8 - 960*a^3 
*cos(d*x + c)^6 - 540*a^3*cos(d*x + c)^5 + 432*a^3*cos(d*x + c)^4 + 480*a^ 
3*cos(d*x + c)^3 - 135*a^3*cos(d*x + c) - 40*a^3)/cos(d*x + c)^9)/d
 

Mupad [B] (verification not implemented)

Time = 16.19 (sec) , antiderivative size = 278, normalized size of antiderivative = 2.03 \[ \int (a+a \sec (c+d x))^3 \tan ^7(c+d x) \, dx=\frac {2\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{16}-18\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{14}+\frac {218\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}}{3}-174\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+\frac {1382\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8}{5}-\frac {1558\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{5}+\frac {602\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{5}-\frac {138\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{5}+\frac {128\,a^3}{45}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{18}-9\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{16}+36\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{14}-84\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}+126\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-126\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+84\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-36\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+9\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )}-\frac {2\,a^3\,\mathrm {atanh}\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}{d} \] Input:

int(tan(c + d*x)^7*(a + a/cos(c + d*x))^3,x)
 

Output:

((602*a^3*tan(c/2 + (d*x)/2)^4)/5 - (138*a^3*tan(c/2 + (d*x)/2)^2)/5 - (15 
58*a^3*tan(c/2 + (d*x)/2)^6)/5 + (1382*a^3*tan(c/2 + (d*x)/2)^8)/5 - 174*a 
^3*tan(c/2 + (d*x)/2)^10 + (218*a^3*tan(c/2 + (d*x)/2)^12)/3 - 18*a^3*tan( 
c/2 + (d*x)/2)^14 + 2*a^3*tan(c/2 + (d*x)/2)^16 + (128*a^3)/45)/(d*(9*tan( 
c/2 + (d*x)/2)^2 - 36*tan(c/2 + (d*x)/2)^4 + 84*tan(c/2 + (d*x)/2)^6 - 126 
*tan(c/2 + (d*x)/2)^8 + 126*tan(c/2 + (d*x)/2)^10 - 84*tan(c/2 + (d*x)/2)^ 
12 + 36*tan(c/2 + (d*x)/2)^14 - 9*tan(c/2 + (d*x)/2)^16 + tan(c/2 + (d*x)/ 
2)^18 - 1)) - (2*a^3*atanh(tan(c/2 + (d*x)/2)^2))/d
 

Reduce [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 236, normalized size of antiderivative = 1.72 \[ \int (a+a \sec (c+d x))^3 \tan ^7(c+d x) \, dx=\frac {a^{3} \left (-1260 \,\mathrm {log}\left (\tan \left (d x +c \right )^{2}+1\right )+280 \sec \left (d x +c \right )^{3} \tan \left (d x +c \right )^{6}-240 \sec \left (d x +c \right )^{3} \tan \left (d x +c \right )^{4}+192 \sec \left (d x +c \right )^{3} \tan \left (d x +c \right )^{2}-128 \sec \left (d x +c \right )^{3}+945 \sec \left (d x +c \right )^{2} \tan \left (d x +c \right )^{6}-945 \sec \left (d x +c \right )^{2} \tan \left (d x +c \right )^{4}+945 \sec \left (d x +c \right )^{2} \tan \left (d x +c \right )^{2}-945 \sec \left (d x +c \right )^{2}+1080 \sec \left (d x +c \right ) \tan \left (d x +c \right )^{6}-1296 \sec \left (d x +c \right ) \tan \left (d x +c \right )^{4}+1728 \sec \left (d x +c \right ) \tan \left (d x +c \right )^{2}-3456 \sec \left (d x +c \right )+420 \tan \left (d x +c \right )^{6}-630 \tan \left (d x +c \right )^{4}+1260 \tan \left (d x +c \right )^{2}\right )}{2520 d} \] Input:

int((a+a*sec(d*x+c))^3*tan(d*x+c)^7,x)
 

Output:

(a**3*( - 1260*log(tan(c + d*x)**2 + 1) + 280*sec(c + d*x)**3*tan(c + d*x) 
**6 - 240*sec(c + d*x)**3*tan(c + d*x)**4 + 192*sec(c + d*x)**3*tan(c + d* 
x)**2 - 128*sec(c + d*x)**3 + 945*sec(c + d*x)**2*tan(c + d*x)**6 - 945*se 
c(c + d*x)**2*tan(c + d*x)**4 + 945*sec(c + d*x)**2*tan(c + d*x)**2 - 945* 
sec(c + d*x)**2 + 1080*sec(c + d*x)*tan(c + d*x)**6 - 1296*sec(c + d*x)*ta 
n(c + d*x)**4 + 1728*sec(c + d*x)*tan(c + d*x)**2 - 3456*sec(c + d*x) + 42 
0*tan(c + d*x)**6 - 630*tan(c + d*x)**4 + 1260*tan(c + d*x)**2))/(2520*d)