\(\int \frac {(e x)^{-1+3 n}}{(a+b \sec (c+d x^n))^2} \, dx\) [83]

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

Optimal result

Integrand size = 24, antiderivative size = 1384 \[ \int \frac {(e x)^{-1+3 n}}{\left (a+b \sec \left (c+d x^n\right )\right )^2} \, dx =\text {Too large to display} \] Output:

1/3*(e*x)^(3*n)/a^2/e/n+I*b^3*(e*x)^(3*n)*ln(1+a*exp(I*(c+d*x^n))/(b+(-a^2 
+b^2)^(1/2)))/a^2/(-a^2+b^2)^(3/2)/d/e/n/(x^n)+2*b^2*(e*x)^(3*n)*ln(1+a*ex 
p(I*(c+d*x^n))/(b-I*(a^2-b^2)^(1/2)))/a^2/(a^2-b^2)/d^2/e/n/(x^(2*n))+2*b^ 
2*(e*x)^(3*n)*ln(1+a*exp(I*(c+d*x^n))/(b+I*(a^2-b^2)^(1/2)))/a^2/(a^2-b^2) 
/d^2/e/n/(x^(2*n))+4*I*b*(e*x)^(3*n)*polylog(3,-a*exp(I*(c+d*x^n))/(b-(-a^ 
2+b^2)^(1/2)))/a^2/(-a^2+b^2)^(1/2)/d^3/e/n/(x^(3*n))-2*I*b^2*(e*x)^(3*n)* 
polylog(2,-a*exp(I*(c+d*x^n))/(b+I*(a^2-b^2)^(1/2)))/a^2/(a^2-b^2)/d^3/e/n 
/(x^(3*n))-2*I*b^2*(e*x)^(3*n)*polylog(2,-a*exp(I*(c+d*x^n))/(b-I*(a^2-b^2 
)^(1/2)))/a^2/(a^2-b^2)/d^3/e/n/(x^(3*n))-4*I*b*(e*x)^(3*n)*polylog(3,-a*e 
xp(I*(c+d*x^n))/(b+(-a^2+b^2)^(1/2)))/a^2/(-a^2+b^2)^(1/2)/d^3/e/n/(x^(3*n 
))+2*I*b*(e*x)^(3*n)*ln(1+a*exp(I*(c+d*x^n))/(b-(-a^2+b^2)^(1/2)))/a^2/(-a 
^2+b^2)^(1/2)/d/e/n/(x^n)-I*b^3*(e*x)^(3*n)*ln(1+a*exp(I*(c+d*x^n))/(b-(-a 
^2+b^2)^(1/2)))/a^2/(-a^2+b^2)^(3/2)/d/e/n/(x^n)-2*b^3*(e*x)^(3*n)*polylog 
(2,-a*exp(I*(c+d*x^n))/(b-(-a^2+b^2)^(1/2)))/a^2/(-a^2+b^2)^(3/2)/d^2/e/n/ 
(x^(2*n))+4*b*(e*x)^(3*n)*polylog(2,-a*exp(I*(c+d*x^n))/(b-(-a^2+b^2)^(1/2 
)))/a^2/(-a^2+b^2)^(1/2)/d^2/e/n/(x^(2*n))+2*b^3*(e*x)^(3*n)*polylog(2,-a* 
exp(I*(c+d*x^n))/(b+(-a^2+b^2)^(1/2)))/a^2/(-a^2+b^2)^(3/2)/d^2/e/n/(x^(2* 
n))-4*b*(e*x)^(3*n)*polylog(2,-a*exp(I*(c+d*x^n))/(b+(-a^2+b^2)^(1/2)))/a^ 
2/(-a^2+b^2)^(1/2)/d^2/e/n/(x^(2*n))-2*I*b^3*(e*x)^(3*n)*polylog(3,-a*exp( 
I*(c+d*x^n))/(b-(-a^2+b^2)^(1/2)))/a^2/(-a^2+b^2)^(3/2)/d^3/e/n/(x^(3*n...
 

Mathematica [F]

\[ \int \frac {(e x)^{-1+3 n}}{\left (a+b \sec \left (c+d x^n\right )\right )^2} \, dx=\int \frac {(e x)^{-1+3 n}}{\left (a+b \sec \left (c+d x^n\right )\right )^2} \, dx \] Input:

Integrate[(e*x)^(-1 + 3*n)/(a + b*Sec[c + d*x^n])^2,x]
 

Output:

Integrate[(e*x)^(-1 + 3*n)/(a + b*Sec[c + d*x^n])^2, x]
 

Rubi [A] (verified)

Time = 2.41 (sec) , antiderivative size = 1119, normalized size of antiderivative = 0.81, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.208, Rules used = {4696, 4692, 3042, 4679, 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 \frac {(e x)^{3 n-1}}{\left (a+b \sec \left (c+d x^n\right )\right )^2} \, dx\)

\(\Big \downarrow \) 4696

\(\displaystyle \frac {x^{-3 n} (e x)^{3 n} \int \frac {x^{3 n-1}}{\left (a+b \sec \left (d x^n+c\right )\right )^2}dx}{e}\)

\(\Big \downarrow \) 4692

\(\displaystyle \frac {x^{-3 n} (e x)^{3 n} \int \frac {x^{2 n}}{\left (a+b \sec \left (d x^n+c\right )\right )^2}dx^n}{e n}\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4679

\(\displaystyle \frac {x^{-3 n} (e x)^{3 n} \int \left (-\frac {2 b x^{2 n}}{a^2 \left (b+a \cos \left (d x^n+c\right )\right )}+\frac {x^{2 n}}{a^2}+\frac {b^2 x^{2 n}}{a^2 \left (b+a \cos \left (d x^n+c\right )\right )^2}\right )dx^n}{e n}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {x^{-3 n} (e x)^{3 n} \left (\frac {2 b^2 \log \left (\frac {e^{i \left (d x^n+c\right )} a}{b-i \sqrt {a^2-b^2}}+1\right ) x^n}{a^2 \left (a^2-b^2\right ) d^2}+\frac {2 b^2 \log \left (\frac {e^{i \left (d x^n+c\right )} a}{b+i \sqrt {a^2-b^2}}+1\right ) x^n}{a^2 \left (a^2-b^2\right ) d^2}+\frac {4 b \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (d x^n+c\right )}}{b-\sqrt {b^2-a^2}}\right ) x^n}{a^2 \sqrt {b^2-a^2} d^2}-\frac {2 b^3 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (d x^n+c\right )}}{b-\sqrt {b^2-a^2}}\right ) x^n}{a^2 \left (b^2-a^2\right )^{3/2} d^2}-\frac {4 b \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (d x^n+c\right )}}{b+\sqrt {b^2-a^2}}\right ) x^n}{a^2 \sqrt {b^2-a^2} d^2}+\frac {2 b^3 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (d x^n+c\right )}}{b+\sqrt {b^2-a^2}}\right ) x^n}{a^2 \left (b^2-a^2\right )^{3/2} d^2}+\frac {2 i b \log \left (\frac {e^{i \left (d x^n+c\right )} a}{b-\sqrt {b^2-a^2}}+1\right ) x^{2 n}}{a^2 \sqrt {b^2-a^2} d}-\frac {i b^3 \log \left (\frac {e^{i \left (d x^n+c\right )} a}{b-\sqrt {b^2-a^2}}+1\right ) x^{2 n}}{a^2 \left (b^2-a^2\right )^{3/2} d}-\frac {2 i b \log \left (\frac {e^{i \left (d x^n+c\right )} a}{b+\sqrt {b^2-a^2}}+1\right ) x^{2 n}}{a^2 \sqrt {b^2-a^2} d}+\frac {i b^3 \log \left (\frac {e^{i \left (d x^n+c\right )} a}{b+\sqrt {b^2-a^2}}+1\right ) x^{2 n}}{a^2 \left (b^2-a^2\right )^{3/2} d}+\frac {b^2 \sin \left (d x^n+c\right ) x^{2 n}}{a \left (a^2-b^2\right ) d \left (b+a \cos \left (d x^n+c\right )\right )}-\frac {i b^2 x^{2 n}}{a^2 \left (a^2-b^2\right ) d}+\frac {x^{3 n}}{3 a^2}-\frac {2 i b^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (d x^n+c\right )}}{b-i \sqrt {a^2-b^2}}\right )}{a^2 \left (a^2-b^2\right ) d^3}-\frac {2 i b^2 \operatorname {PolyLog}\left (2,-\frac {a e^{i \left (d x^n+c\right )}}{b+i \sqrt {a^2-b^2}}\right )}{a^2 \left (a^2-b^2\right ) d^3}+\frac {4 i b \operatorname {PolyLog}\left (3,-\frac {a e^{i \left (d x^n+c\right )}}{b-\sqrt {b^2-a^2}}\right )}{a^2 \sqrt {b^2-a^2} d^3}-\frac {2 i b^3 \operatorname {PolyLog}\left (3,-\frac {a e^{i \left (d x^n+c\right )}}{b-\sqrt {b^2-a^2}}\right )}{a^2 \left (b^2-a^2\right )^{3/2} d^3}-\frac {4 i b \operatorname {PolyLog}\left (3,-\frac {a e^{i \left (d x^n+c\right )}}{b+\sqrt {b^2-a^2}}\right )}{a^2 \sqrt {b^2-a^2} d^3}+\frac {2 i b^3 \operatorname {PolyLog}\left (3,-\frac {a e^{i \left (d x^n+c\right )}}{b+\sqrt {b^2-a^2}}\right )}{a^2 \left (b^2-a^2\right )^{3/2} d^3}\right )}{e n}\)

Input:

Int[(e*x)^(-1 + 3*n)/(a + b*Sec[c + d*x^n])^2,x]
 

Output:

((e*x)^(3*n)*(((-I)*b^2*x^(2*n))/(a^2*(a^2 - b^2)*d) + x^(3*n)/(3*a^2) + ( 
2*b^2*x^n*Log[1 + (a*E^(I*(c + d*x^n)))/(b - I*Sqrt[a^2 - b^2])])/(a^2*(a^ 
2 - b^2)*d^2) + (2*b^2*x^n*Log[1 + (a*E^(I*(c + d*x^n)))/(b + I*Sqrt[a^2 - 
 b^2])])/(a^2*(a^2 - b^2)*d^2) - (I*b^3*x^(2*n)*Log[1 + (a*E^(I*(c + d*x^n 
)))/(b - Sqrt[-a^2 + b^2])])/(a^2*(-a^2 + b^2)^(3/2)*d) + ((2*I)*b*x^(2*n) 
*Log[1 + (a*E^(I*(c + d*x^n)))/(b - Sqrt[-a^2 + b^2])])/(a^2*Sqrt[-a^2 + b 
^2]*d) + (I*b^3*x^(2*n)*Log[1 + (a*E^(I*(c + d*x^n)))/(b + Sqrt[-a^2 + b^2 
])])/(a^2*(-a^2 + b^2)^(3/2)*d) - ((2*I)*b*x^(2*n)*Log[1 + (a*E^(I*(c + d* 
x^n)))/(b + Sqrt[-a^2 + b^2])])/(a^2*Sqrt[-a^2 + b^2]*d) - ((2*I)*b^2*Poly 
Log[2, -((a*E^(I*(c + d*x^n)))/(b - I*Sqrt[a^2 - b^2]))])/(a^2*(a^2 - b^2) 
*d^3) - ((2*I)*b^2*PolyLog[2, -((a*E^(I*(c + d*x^n)))/(b + I*Sqrt[a^2 - b^ 
2]))])/(a^2*(a^2 - b^2)*d^3) - (2*b^3*x^n*PolyLog[2, -((a*E^(I*(c + d*x^n) 
))/(b - Sqrt[-a^2 + b^2]))])/(a^2*(-a^2 + b^2)^(3/2)*d^2) + (4*b*x^n*PolyL 
og[2, -((a*E^(I*(c + d*x^n)))/(b - Sqrt[-a^2 + b^2]))])/(a^2*Sqrt[-a^2 + b 
^2]*d^2) + (2*b^3*x^n*PolyLog[2, -((a*E^(I*(c + d*x^n)))/(b + Sqrt[-a^2 + 
b^2]))])/(a^2*(-a^2 + b^2)^(3/2)*d^2) - (4*b*x^n*PolyLog[2, -((a*E^(I*(c + 
 d*x^n)))/(b + Sqrt[-a^2 + b^2]))])/(a^2*Sqrt[-a^2 + b^2]*d^2) - ((2*I)*b^ 
3*PolyLog[3, -((a*E^(I*(c + d*x^n)))/(b - Sqrt[-a^2 + b^2]))])/(a^2*(-a^2 
+ b^2)^(3/2)*d^3) + ((4*I)*b*PolyLog[3, -((a*E^(I*(c + d*x^n)))/(b - Sqrt[ 
-a^2 + b^2]))])/(a^2*Sqrt[-a^2 + b^2]*d^3) + ((2*I)*b^3*PolyLog[3, -((a...
 

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 4679
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(n_.)*((c_.) + (d_.)*(x_))^(m_.) 
, x_Symbol] :> Int[ExpandIntegrand[(c + d*x)^m, 1/(Sin[e + f*x]^n/(b + a*Si 
n[e + f*x])^n), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && ILtQ[n, 0] && IGt 
Q[m, 0]
 

rule 4692
Int[(x_)^(m_.)*((a_.) + (b_.)*Sec[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol 
] :> Simp[1/n   Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a + b*Sec[c + d*x])^ 
p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplify[(m + 
 1)/n], 0] && IntegerQ[p]
 

rule 4696
Int[((e_)*(x_))^(m_.)*((a_.) + (b_.)*Sec[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x 
_Symbol] :> Simp[e^IntPart[m]*((e*x)^FracPart[m]/x^FracPart[m])   Int[x^m*( 
a + b*Sec[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m, n, p}, x]
 
Maple [F]

\[\int \frac {\left (e x \right )^{-1+3 n}}{{\left (a +b \sec \left (c +d \,x^{n}\right )\right )}^{2}}d x\]

Input:

int((e*x)^(-1+3*n)/(a+b*sec(c+d*x^n))^2,x)
 

Output:

int((e*x)^(-1+3*n)/(a+b*sec(c+d*x^n))^2,x)
 

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. 3831 vs. \(2 (1282) = 2564\).

Time = 0.45 (sec) , antiderivative size = 3831, normalized size of antiderivative = 2.77 \[ \int \frac {(e x)^{-1+3 n}}{\left (a+b \sec \left (c+d x^n\right )\right )^2} \, dx=\text {Too large to display} \] Input:

integrate((e*x)^(-1+3*n)/(a+b*sec(c+d*x^n))^2,x, algorithm="fricas")
 

Output:

Too large to include
 

Sympy [F]

\[ \int \frac {(e x)^{-1+3 n}}{\left (a+b \sec \left (c+d x^n\right )\right )^2} \, dx=\int \frac {\left (e x\right )^{3 n - 1}}{\left (a + b \sec {\left (c + d x^{n} \right )}\right )^{2}}\, dx \] Input:

integrate((e*x)**(-1+3*n)/(a+b*sec(c+d*x**n))**2,x)
 

Output:

Integral((e*x)**(3*n - 1)/(a + b*sec(c + d*x**n))**2, x)
 

Maxima [F]

\[ \int \frac {(e x)^{-1+3 n}}{\left (a+b \sec \left (c+d x^n\right )\right )^2} \, dx=\int { \frac {\left (e x\right )^{3 \, n - 1}}{{\left (b \sec \left (d x^{n} + c\right ) + a\right )}^{2}} \,d x } \] Input:

integrate((e*x)^(-1+3*n)/(a+b*sec(c+d*x^n))^2,x, algorithm="maxima")
 

Output:

1/3*(6*a*b^3*e^(3*n)*x^(2*n)*sin(d*x^n + c) + (a^4 - a^2*b^2)*d*e^(3*n)*x^ 
(3*n)*cos(2*d*x^n + 2*c)^2 + 4*(a^2*b^2 - b^4)*d*e^(3*n)*x^(3*n)*cos(d*x^n 
 + c)^2 + (a^4 - a^2*b^2)*d*e^(3*n)*x^(3*n)*sin(2*d*x^n + 2*c)^2 + 4*(a^2* 
b^2 - b^4)*d*e^(3*n)*x^(3*n)*sin(d*x^n + c)^2 + 4*(a^3*b - a*b^3)*d*e^(3*n 
)*x^(3*n)*cos(d*x^n + c) + (a^4 - a^2*b^2)*d*e^(3*n)*x^(3*n) - 2*(3*a*b^3* 
e^(3*n)*x^(2*n)*sin(d*x^n + c) - 2*(a^3*b - a*b^3)*d*e^(3*n)*x^(3*n)*cos(d 
*x^n + c) - (a^4 - a^2*b^2)*d*e^(3*n)*x^(3*n))*cos(2*d*x^n + 2*c) + 3*((a^ 
6 - a^4*b^2)*d*e*n*cos(2*d*x^n + 2*c)^2 + 4*(a^4*b^2 - a^2*b^4)*d*e*n*cos( 
d*x^n + c)^2 + (a^6 - a^4*b^2)*d*e*n*sin(2*d*x^n + 2*c)^2 + 4*(a^5*b - a^3 
*b^3)*d*e*n*sin(2*d*x^n + 2*c)*sin(d*x^n + c) + 4*(a^4*b^2 - a^2*b^4)*d*e* 
n*sin(d*x^n + c)^2 + 4*(a^5*b - a^3*b^3)*d*e*n*cos(d*x^n + c) + (a^6 - a^4 
*b^2)*d*e*n + 2*(2*(a^5*b - a^3*b^3)*d*e*n*cos(d*x^n + c) + (a^6 - a^4*b^2 
)*d*e*n)*cos(2*d*x^n + 2*c))*integrate(2*(2*a^2*b^4*e^(3*n)*x^(2*n)*cos(2* 
c)*sin(2*d*x^n) + 2*a^2*b^4*e^(3*n)*x^(2*n)*cos(2*d*x^n)*sin(2*c) - 4*(a^3 
*b^3 - a*b^5)*e^(3*n)*x^(2*n)*cos(c)*sin(d*x^n) - 4*(a^3*b^3 - a*b^5)*e^(3 
*n)*x^(2*n)*cos(d*x^n)*sin(c) + (2*a^3*b^3*e^(3*n)*x^(2*n)*sin(d*x^n + c) 
- (2*a^5*b - a^3*b^3)*d*e^(3*n)*x^(3*n)*cos(d*x^n + c))*cos(2*d*x^n + 2*c) 
 - ((2*a^5*b - 3*a^3*b^3 + a*b^5)*d*e^(3*n)*x^(3*n) - (2*a*b^5*e^(3*n)*x^( 
2*n)*sin(2*c) + (2*a^3*b^3 - a*b^5)*d*e^(3*n)*x^(3*n)*cos(2*c))*cos(2*d*x^ 
n) + 2*((2*a^4*b^2 - 3*a^2*b^4 + b^6)*d*e^(3*n)*x^(3*n)*cos(c) + 2*(a^2...
 

Giac [F]

\[ \int \frac {(e x)^{-1+3 n}}{\left (a+b \sec \left (c+d x^n\right )\right )^2} \, dx=\int { \frac {\left (e x\right )^{3 \, n - 1}}{{\left (b \sec \left (d x^{n} + c\right ) + a\right )}^{2}} \,d x } \] Input:

integrate((e*x)^(-1+3*n)/(a+b*sec(c+d*x^n))^2,x, algorithm="giac")
                                                                                    
                                                                                    
 

Output:

integrate((e*x)^(3*n - 1)/(b*sec(d*x^n + c) + a)^2, x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {(e x)^{-1+3 n}}{\left (a+b \sec \left (c+d x^n\right )\right )^2} \, dx=\int \frac {{\left (e\,x\right )}^{3\,n-1}}{{\left (a+\frac {b}{\cos \left (c+d\,x^n\right )}\right )}^2} \,d x \] Input:

int((e*x)^(3*n - 1)/(a + b/cos(c + d*x^n))^2,x)
 

Output:

int((e*x)^(3*n - 1)/(a + b/cos(c + d*x^n))^2, x)
 

Reduce [F]

\[ \int \frac {(e x)^{-1+3 n}}{\left (a+b \sec \left (c+d x^n\right )\right )^2} \, dx=\text {too large to display} \] Input:

int((e*x)^(-1+3*n)/(a+b*sec(c+d*x^n))^2,x)
 

Output:

(e**(3*n)*( - 24*sqrt( - a**2 + b**2)*atan((tan((x**n*d + c)/2)*a - tan((x 
**n*d + c)/2)*b)/sqrt( - a**2 + b**2))*cos(x**n*d + c)*a**2*b - 24*sqrt( - 
 a**2 + b**2)*atan((tan((x**n*d + c)/2)*a - tan((x**n*d + c)/2)*b)/sqrt( - 
 a**2 + b**2))*cos(x**n*d + c)*a*b**2 - 24*sqrt( - a**2 + b**2)*atan((tan( 
(x**n*d + c)/2)*a - tan((x**n*d + c)/2)*b)/sqrt( - a**2 + b**2))*a*b**2 - 
24*sqrt( - a**2 + b**2)*atan((tan((x**n*d + c)/2)*a - tan((x**n*d + c)/2)* 
b)/sqrt( - a**2 + b**2))*b**3 + 2*x**(3*n)*cos(x**n*d + c)*a**4*d**3 - 3*x 
**(3*n)*cos(x**n*d + c)*a**3*b*d**3 - 3*x**(3*n)*cos(x**n*d + c)*a**2*b**2 
*d**3 + 96*cos(x**n*d + c)*int((x**(3*n)*tan((x**n*d + c)/2)**4)/(4*tan((x 
**n*d + c)/2)**4*a**8*x - 4*tan((x**n*d + c)/2)**4*a**7*b*x - 11*tan((x**n 
*d + c)/2)**4*a**6*b**2*x + 10*tan((x**n*d + c)/2)**4*a**5*b**3*x + 11*tan 
((x**n*d + c)/2)**4*a**4*b**4*x - 8*tan((x**n*d + c)/2)**4*a**3*b**5*x - 5 
*tan((x**n*d + c)/2)**4*a**2*b**6*x + 2*tan((x**n*d + c)/2)**4*a*b**7*x + 
tan((x**n*d + c)/2)**4*b**8*x - 8*tan((x**n*d + c)/2)**2*a**8*x - 8*tan((x 
**n*d + c)/2)**2*a**7*b*x + 22*tan((x**n*d + c)/2)**2*a**6*b**2*x + 24*tan 
((x**n*d + c)/2)**2*a**5*b**3*x - 18*tan((x**n*d + c)/2)**2*a**4*b**4*x - 
24*tan((x**n*d + c)/2)**2*a**3*b**5*x + 2*tan((x**n*d + c)/2)**2*a**2*b**6 
*x + 8*tan((x**n*d + c)/2)**2*a*b**7*x + 2*tan((x**n*d + c)/2)**2*b**8*x + 
 4*a**8*x + 12*a**7*b*x + 5*a**6*b**2*x - 18*a**5*b**3*x - 21*a**4*b**4*x 
+ 11*a**2*b**6*x + 6*a*b**7*x + b**8*x),x)*a**11*b*d**3*n - 96*cos(x**n...