\(\int (a+a \sec (c+d x))^2 \tan ^6(c+d x) \, dx\) [29]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [F]
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 = 161 \[ \int (a+a \sec (c+d x))^2 \tan ^6(c+d x) \, dx=-a^2 x-\frac {5 a^2 \text {arctanh}(\sin (c+d x))}{8 d}+\frac {a^2 \tan (c+d x)}{d}+\frac {5 a^2 \sec (c+d x) \tan (c+d x)}{8 d}-\frac {a^2 \tan ^3(c+d x)}{3 d}-\frac {5 a^2 \sec (c+d x) \tan ^3(c+d x)}{12 d}+\frac {a^2 \tan ^5(c+d x)}{5 d}+\frac {a^2 \sec (c+d x) \tan ^5(c+d x)}{3 d}+\frac {a^2 \tan ^7(c+d x)}{7 d} \] Output:

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

Mathematica [A] (verified)

Time = 0.62 (sec) , antiderivative size = 218, normalized size of antiderivative = 1.35 \[ \int (a+a \sec (c+d x))^2 \tan ^6(c+d x) \, dx=-\frac {a^2 \arctan (\tan (c+d x))}{d}-\frac {5 a^2 \text {arctanh}(\sin (c+d x))}{8 d}+\frac {a^2 \tan (c+d x)}{d}-\frac {5 a^2 \sec (c+d x) \tan (c+d x)}{8 d}-\frac {5 a^2 \sec ^3(c+d x) \tan (c+d x)}{12 d}+\frac {5 a^2 \sec ^5(c+d x) \tan (c+d x)}{3 d}-\frac {a^2 \tan ^3(c+d x)}{3 d}-\frac {10 a^2 \sec ^3(c+d x) \tan ^3(c+d x)}{3 d}+\frac {a^2 \tan ^5(c+d x)}{5 d}+\frac {2 a^2 \sec (c+d x) \tan ^5(c+d x)}{d}+\frac {a^2 \tan ^7(c+d x)}{7 d} \] Input:

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

Output:

-((a^2*ArcTan[Tan[c + d*x]])/d) - (5*a^2*ArcTanh[Sin[c + d*x]])/(8*d) + (a 
^2*Tan[c + d*x])/d - (5*a^2*Sec[c + d*x]*Tan[c + d*x])/(8*d) - (5*a^2*Sec[ 
c + d*x]^3*Tan[c + d*x])/(12*d) + (5*a^2*Sec[c + d*x]^5*Tan[c + d*x])/(3*d 
) - (a^2*Tan[c + d*x]^3)/(3*d) - (10*a^2*Sec[c + d*x]^3*Tan[c + d*x]^3)/(3 
*d) + (a^2*Tan[c + d*x]^5)/(5*d) + (2*a^2*Sec[c + d*x]*Tan[c + d*x]^5)/d + 
 (a^2*Tan[c + d*x]^7)/(7*d)
 

Rubi [A] (verified)

Time = 0.42 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3042, 4374, 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 ^6(c+d x) (a \sec (c+d x)+a)^2 \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4374

\(\displaystyle \int \left (a^2 \tan ^6(c+d x)+a^2 \tan ^6(c+d x) \sec ^2(c+d x)+2 a^2 \tan ^6(c+d x) \sec (c+d x)\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {5 a^2 \text {arctanh}(\sin (c+d x))}{8 d}+\frac {a^2 \tan ^7(c+d x)}{7 d}+\frac {a^2 \tan ^5(c+d x)}{5 d}-\frac {a^2 \tan ^3(c+d x)}{3 d}+\frac {a^2 \tan (c+d x)}{d}+\frac {a^2 \tan ^5(c+d x) \sec (c+d x)}{3 d}-\frac {5 a^2 \tan ^3(c+d x) \sec (c+d x)}{12 d}+\frac {5 a^2 \tan (c+d x) \sec (c+d x)}{8 d}-a^2 x\)

Input:

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

Output:

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

Defintions of rubi rules used

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 4374
Int[(cot[(c_.) + (d_.)*(x_)]*(e_.))^(m_)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + ( 
a_))^(n_), x_Symbol] :> Int[ExpandIntegrand[(e*Cot[c + d*x])^m, (a + b*Csc[ 
c + d*x])^n, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && IGtQ[n, 0]
 
Maple [A] (verified)

Time = 0.56 (sec) , antiderivative size = 168, normalized size of antiderivative = 1.04

method result size
parts \(\frac {a^{2} \left (\frac {\tan \left (d x +c \right )^{5}}{5}-\frac {\tan \left (d x +c \right )^{3}}{3}+\tan \left (d x +c \right )-\arctan \left (\tan \left (d x +c \right )\right )\right )}{d}+\frac {a^{2} \tan \left (d x +c \right )^{7}}{7 d}+\frac {2 a^{2} \left (\frac {\sin \left (d x +c \right )^{7}}{6 \cos \left (d x +c \right )^{6}}-\frac {\sin \left (d x +c \right )^{7}}{24 \cos \left (d x +c \right )^{4}}+\frac {\sin \left (d x +c \right )^{7}}{16 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )^{5}}{16}+\frac {5 \sin \left (d x +c \right )^{3}}{48}+\frac {5 \sin \left (d x +c \right )}{16}-\frac {5 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{16}\right )}{d}\) \(168\)
derivativedivides \(\frac {\frac {a^{2} \sin \left (d x +c \right )^{7}}{7 \cos \left (d x +c \right )^{7}}+2 a^{2} \left (\frac {\sin \left (d x +c \right )^{7}}{6 \cos \left (d x +c \right )^{6}}-\frac {\sin \left (d x +c \right )^{7}}{24 \cos \left (d x +c \right )^{4}}+\frac {\sin \left (d x +c \right )^{7}}{16 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )^{5}}{16}+\frac {5 \sin \left (d x +c \right )^{3}}{48}+\frac {5 \sin \left (d x +c \right )}{16}-\frac {5 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{16}\right )+a^{2} \left (\frac {\tan \left (d x +c \right )^{5}}{5}-\frac {\tan \left (d x +c \right )^{3}}{3}+\tan \left (d x +c \right )-d x -c \right )}{d}\) \(169\)
default \(\frac {\frac {a^{2} \sin \left (d x +c \right )^{7}}{7 \cos \left (d x +c \right )^{7}}+2 a^{2} \left (\frac {\sin \left (d x +c \right )^{7}}{6 \cos \left (d x +c \right )^{6}}-\frac {\sin \left (d x +c \right )^{7}}{24 \cos \left (d x +c \right )^{4}}+\frac {\sin \left (d x +c \right )^{7}}{16 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )^{5}}{16}+\frac {5 \sin \left (d x +c \right )^{3}}{48}+\frac {5 \sin \left (d x +c \right )}{16}-\frac {5 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{16}\right )+a^{2} \left (\frac {\tan \left (d x +c \right )^{5}}{5}-\frac {\tan \left (d x +c \right )^{3}}{3}+\tan \left (d x +c \right )-d x -c \right )}{d}\) \(169\)
risch \(-a^{2} x -\frac {i a^{2} \left (1155 \,{\mathrm e}^{13 i \left (d x +c \right )}-1680 \,{\mathrm e}^{12 i \left (d x +c \right )}+980 \,{\mathrm e}^{11 i \left (d x +c \right )}-10080 \,{\mathrm e}^{10 i \left (d x +c \right )}+2975 \,{\mathrm e}^{9 i \left (d x +c \right )}-16240 \,{\mathrm e}^{8 i \left (d x +c \right )}-24640 \,{\mathrm e}^{6 i \left (d x +c \right )}-2975 \,{\mathrm e}^{5 i \left (d x +c \right )}-14448 \,{\mathrm e}^{4 i \left (d x +c \right )}-980 \,{\mathrm e}^{3 i \left (d x +c \right )}-6496 \,{\mathrm e}^{2 i \left (d x +c \right )}-1155 \,{\mathrm e}^{i \left (d x +c \right )}-1168\right )}{420 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{7}}+\frac {5 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{8 d}-\frac {5 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{8 d}\) \(206\)

Input:

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

Output:

a^2/d*(1/5*tan(d*x+c)^5-1/3*tan(d*x+c)^3+tan(d*x+c)-arctan(tan(d*x+c)))+1/ 
7*a^2*tan(d*x+c)^7/d+2*a^2/d*(1/6*sin(d*x+c)^7/cos(d*x+c)^6-1/24*sin(d*x+c 
)^7/cos(d*x+c)^4+1/16*sin(d*x+c)^7/cos(d*x+c)^2+1/16*sin(d*x+c)^5+5/48*sin 
(d*x+c)^3+5/16*sin(d*x+c)-5/16*ln(sec(d*x+c)+tan(d*x+c)))
 

Fricas [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 165, normalized size of antiderivative = 1.02 \[ \int (a+a \sec (c+d x))^2 \tan ^6(c+d x) \, dx=-\frac {1680 \, a^{2} d x \cos \left (d x + c\right )^{7} + 525 \, a^{2} \cos \left (d x + c\right )^{7} \log \left (\sin \left (d x + c\right ) + 1\right ) - 525 \, a^{2} \cos \left (d x + c\right )^{7} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (1168 \, a^{2} \cos \left (d x + c\right )^{6} + 1155 \, a^{2} \cos \left (d x + c\right )^{5} - 256 \, a^{2} \cos \left (d x + c\right )^{4} - 910 \, a^{2} \cos \left (d x + c\right )^{3} - 192 \, a^{2} \cos \left (d x + c\right )^{2} + 280 \, a^{2} \cos \left (d x + c\right ) + 120 \, a^{2}\right )} \sin \left (d x + c\right )}{1680 \, d \cos \left (d x + c\right )^{7}} \] Input:

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

Output:

-1/1680*(1680*a^2*d*x*cos(d*x + c)^7 + 525*a^2*cos(d*x + c)^7*log(sin(d*x 
+ c) + 1) - 525*a^2*cos(d*x + c)^7*log(-sin(d*x + c) + 1) - 2*(1168*a^2*co 
s(d*x + c)^6 + 1155*a^2*cos(d*x + c)^5 - 256*a^2*cos(d*x + c)^4 - 910*a^2* 
cos(d*x + c)^3 - 192*a^2*cos(d*x + c)^2 + 280*a^2*cos(d*x + c) + 120*a^2)* 
sin(d*x + c))/(d*cos(d*x + c)^7)
 

Sympy [F]

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

integrate((a+a*sec(d*x+c))**2*tan(d*x+c)**6,x)
 

Output:

a**2*(Integral(2*tan(c + d*x)**6*sec(c + d*x), x) + Integral(tan(c + d*x)* 
*6*sec(c + d*x)**2, x) + Integral(tan(c + d*x)**6, x))
 

Maxima [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 151, normalized size of antiderivative = 0.94 \[ \int (a+a \sec (c+d x))^2 \tan ^6(c+d x) \, dx=\frac {240 \, a^{2} \tan \left (d x + c\right )^{7} + 112 \, {\left (3 \, \tan \left (d x + c\right )^{5} - 5 \, \tan \left (d x + c\right )^{3} - 15 \, d x - 15 \, c + 15 \, \tan \left (d x + c\right )\right )} a^{2} - 35 \, a^{2} {\left (\frac {2 \, {\left (33 \, \sin \left (d x + c\right )^{5} - 40 \, \sin \left (d x + c\right )^{3} + 15 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{6} - 3 \, \sin \left (d x + c\right )^{4} + 3 \, \sin \left (d x + c\right )^{2} - 1} + 15 \, \log \left (\sin \left (d x + c\right ) + 1\right ) - 15 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )}}{1680 \, d} \] Input:

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

Output:

1/1680*(240*a^2*tan(d*x + c)^7 + 112*(3*tan(d*x + c)^5 - 5*tan(d*x + c)^3 
- 15*d*x - 15*c + 15*tan(d*x + c))*a^2 - 35*a^2*(2*(33*sin(d*x + c)^5 - 40 
*sin(d*x + c)^3 + 15*sin(d*x + c))/(sin(d*x + c)^6 - 3*sin(d*x + c)^4 + 3* 
sin(d*x + c)^2 - 1) + 15*log(sin(d*x + c) + 1) - 15*log(sin(d*x + c) - 1)) 
)/d
 

Giac [A] (verification not implemented)

Time = 0.55 (sec) , antiderivative size = 180, normalized size of antiderivative = 1.12 \[ \int (a+a \sec (c+d x))^2 \tan ^6(c+d x) \, dx=-\frac {840 \, {\left (d x + c\right )} a^{2} + 525 \, a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 525 \, a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + \frac {2 \, {\left (315 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{13} - 2660 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} + 9863 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 21216 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 29673 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 9660 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 1365 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{7}}}{840 \, d} \] Input:

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

Output:

-1/840*(840*(d*x + c)*a^2 + 525*a^2*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 5 
25*a^2*log(abs(tan(1/2*d*x + 1/2*c) - 1)) + 2*(315*a^2*tan(1/2*d*x + 1/2*c 
)^13 - 2660*a^2*tan(1/2*d*x + 1/2*c)^11 + 9863*a^2*tan(1/2*d*x + 1/2*c)^9 
- 21216*a^2*tan(1/2*d*x + 1/2*c)^7 + 29673*a^2*tan(1/2*d*x + 1/2*c)^5 - 96 
60*a^2*tan(1/2*d*x + 1/2*c)^3 + 1365*a^2*tan(1/2*d*x + 1/2*c))/(tan(1/2*d* 
x + 1/2*c)^2 - 1)^7)/d
 

Mupad [B] (verification not implemented)

Time = 14.03 (sec) , antiderivative size = 234, normalized size of antiderivative = 1.45 \[ \int (a+a \sec (c+d x))^2 \tan ^6(c+d x) \, dx=-a^2\,x-\frac {5\,a^2\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{4\,d}-\frac {\frac {3\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{13}}{4}-\frac {19\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}}{3}+\frac {1409\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{60}-\frac {1768\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{35}+\frac {1413\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{20}-23\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\frac {13\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{14}-7\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}+21\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-35\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+35\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-21\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+7\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \] Input:

int(tan(c + d*x)^6*(a + a/cos(c + d*x))^2,x)
 

Output:

- a^2*x - (5*a^2*atanh(tan(c/2 + (d*x)/2)))/(4*d) - ((1413*a^2*tan(c/2 + ( 
d*x)/2)^5)/20 - 23*a^2*tan(c/2 + (d*x)/2)^3 - (1768*a^2*tan(c/2 + (d*x)/2) 
^7)/35 + (1409*a^2*tan(c/2 + (d*x)/2)^9)/60 - (19*a^2*tan(c/2 + (d*x)/2)^1 
1)/3 + (3*a^2*tan(c/2 + (d*x)/2)^13)/4 + (13*a^2*tan(c/2 + (d*x)/2))/4)/(d 
*(7*tan(c/2 + (d*x)/2)^2 - 21*tan(c/2 + (d*x)/2)^4 + 35*tan(c/2 + (d*x)/2) 
^6 - 35*tan(c/2 + (d*x)/2)^8 + 21*tan(c/2 + (d*x)/2)^10 - 7*tan(c/2 + (d*x 
)/2)^12 + tan(c/2 + (d*x)/2)^14 - 1))
 

Reduce [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 633, normalized size of antiderivative = 3.93 \[ \int (a+a \sec (c+d x))^2 \tan ^6(c+d x) \, dx =\text {Too large to display} \] Input:

int((a+a*sec(d*x+c))^2*tan(d*x+c)^6,x)
 

Output:

(a**2*(525*cos(c + d*x)*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**6 - 1575*c 
os(c + d*x)*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**4 + 1575*cos(c + d*x)* 
log(tan((c + d*x)/2) - 1)*sin(c + d*x)**2 - 525*cos(c + d*x)*log(tan((c + 
d*x)/2) - 1) - 525*cos(c + d*x)*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**6 
+ 1575*cos(c + d*x)*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**4 - 1575*cos(c 
 + d*x)*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**2 + 525*cos(c + d*x)*log(t 
an((c + d*x)/2) + 1) + 168*cos(c + d*x)*sin(c + d*x)**6*tan(c + d*x)**5 - 
280*cos(c + d*x)*sin(c + d*x)**6*tan(c + d*x)**3 + 840*cos(c + d*x)*sin(c 
+ d*x)**6*tan(c + d*x) - 840*cos(c + d*x)*sin(c + d*x)**6*d*x - 1155*cos(c 
 + d*x)*sin(c + d*x)**5 - 504*cos(c + d*x)*sin(c + d*x)**4*tan(c + d*x)**5 
 + 840*cos(c + d*x)*sin(c + d*x)**4*tan(c + d*x)**3 - 2520*cos(c + d*x)*si 
n(c + d*x)**4*tan(c + d*x) + 2520*cos(c + d*x)*sin(c + d*x)**4*d*x + 1400* 
cos(c + d*x)*sin(c + d*x)**3 + 504*cos(c + d*x)*sin(c + d*x)**2*tan(c + d* 
x)**5 - 840*cos(c + d*x)*sin(c + d*x)**2*tan(c + d*x)**3 + 2520*cos(c + d* 
x)*sin(c + d*x)**2*tan(c + d*x) - 2520*cos(c + d*x)*sin(c + d*x)**2*d*x - 
525*cos(c + d*x)*sin(c + d*x) - 168*cos(c + d*x)*tan(c + d*x)**5 + 280*cos 
(c + d*x)*tan(c + d*x)**3 - 840*cos(c + d*x)*tan(c + d*x) + 840*cos(c + d* 
x)*d*x - 120*sin(c + d*x)**7))/(840*cos(c + d*x)*d*(sin(c + d*x)**6 - 3*si 
n(c + d*x)**4 + 3*sin(c + d*x)**2 - 1))