\(\int (c+d x)^2 (a+b \sec (e+f x))^2 \, dx\) [30]

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

Optimal result

Integrand size = 20, antiderivative size = 257 \[ \int (c+d x)^2 (a+b \sec (e+f x))^2 \, dx=-\frac {i b^2 (c+d x)^2}{f}+\frac {a^2 (c+d x)^3}{3 d}-\frac {4 i a b (c+d x)^2 \arctan \left (e^{i (e+f x)}\right )}{f}+\frac {2 b^2 d (c+d x) \log \left (1+e^{2 i (e+f x)}\right )}{f^2}+\frac {4 i a b d (c+d x) \operatorname {PolyLog}\left (2,-i e^{i (e+f x)}\right )}{f^2}-\frac {4 i a b d (c+d x) \operatorname {PolyLog}\left (2,i e^{i (e+f x)}\right )}{f^2}-\frac {i b^2 d^2 \operatorname {PolyLog}\left (2,-e^{2 i (e+f x)}\right )}{f^3}-\frac {4 a b d^2 \operatorname {PolyLog}\left (3,-i e^{i (e+f x)}\right )}{f^3}+\frac {4 a b d^2 \operatorname {PolyLog}\left (3,i e^{i (e+f x)}\right )}{f^3}+\frac {b^2 (c+d x)^2 \tan (e+f x)}{f} \] Output:

-I*b^2*(d*x+c)^2/f+1/3*a^2*(d*x+c)^3/d-4*I*a*b*(d*x+c)^2*arctan(exp(I*(f*x 
+e)))/f+2*b^2*d*(d*x+c)*ln(1+exp(2*I*(f*x+e)))/f^2+4*I*a*b*d*(d*x+c)*polyl 
og(2,-I*exp(I*(f*x+e)))/f^2-4*I*a*b*d*(d*x+c)*polylog(2,I*exp(I*(f*x+e)))/ 
f^2-I*b^2*d^2*polylog(2,-exp(2*I*(f*x+e)))/f^3-4*a*b*d^2*polylog(3,-I*exp( 
I*(f*x+e)))/f^3+4*a*b*d^2*polylog(3,I*exp(I*(f*x+e)))/f^3+b^2*(d*x+c)^2*ta 
n(f*x+e)/f
 

Mathematica [A] (verified)

Time = 1.01 (sec) , antiderivative size = 356, normalized size of antiderivative = 1.39 \[ \int (c+d x)^2 (a+b \sec (e+f x))^2 \, dx=\frac {3 a^2 c^2 f^3 x-3 i b^2 d^2 f^2 x^2+3 a^2 c d f^3 x^2+a^2 d^2 f^3 x^3+6 a b c^2 f^2 \coth ^{-1}(\sin (e+f x))-24 i a b c d f^2 x \arctan \left (e^{i (e+f x)}\right )-12 i a b d^2 f^2 x^2 \arctan \left (e^{i (e+f x)}\right )+6 b^2 d^2 f x \log \left (1+e^{2 i (e+f x)}\right )+6 b^2 c d f \log (\cos (e+f x))+12 i a b d f (c+d x) \operatorname {PolyLog}\left (2,-i e^{i (e+f x)}\right )-12 i a b d f (c+d x) \operatorname {PolyLog}\left (2,i e^{i (e+f x)}\right )-3 i b^2 d^2 \operatorname {PolyLog}\left (2,-e^{2 i (e+f x)}\right )-12 a b d^2 \operatorname {PolyLog}\left (3,-i e^{i (e+f x)}\right )+12 a b d^2 \operatorname {PolyLog}\left (3,i e^{i (e+f x)}\right )+3 b^2 c^2 f^2 \tan (e+f x)+6 b^2 c d f^2 x \tan (e+f x)+3 b^2 d^2 f^2 x^2 \tan (e+f x)}{3 f^3} \] Input:

Integrate[(c + d*x)^2*(a + b*Sec[e + f*x])^2,x]
 

Output:

(3*a^2*c^2*f^3*x - (3*I)*b^2*d^2*f^2*x^2 + 3*a^2*c*d*f^3*x^2 + a^2*d^2*f^3 
*x^3 + 6*a*b*c^2*f^2*ArcCoth[Sin[e + f*x]] - (24*I)*a*b*c*d*f^2*x*ArcTan[E 
^(I*(e + f*x))] - (12*I)*a*b*d^2*f^2*x^2*ArcTan[E^(I*(e + f*x))] + 6*b^2*d 
^2*f*x*Log[1 + E^((2*I)*(e + f*x))] + 6*b^2*c*d*f*Log[Cos[e + f*x]] + (12* 
I)*a*b*d*f*(c + d*x)*PolyLog[2, (-I)*E^(I*(e + f*x))] - (12*I)*a*b*d*f*(c 
+ d*x)*PolyLog[2, I*E^(I*(e + f*x))] - (3*I)*b^2*d^2*PolyLog[2, -E^((2*I)* 
(e + f*x))] - 12*a*b*d^2*PolyLog[3, (-I)*E^(I*(e + f*x))] + 12*a*b*d^2*Pol 
yLog[3, I*E^(I*(e + f*x))] + 3*b^2*c^2*f^2*Tan[e + f*x] + 6*b^2*c*d*f^2*x* 
Tan[e + f*x] + 3*b^2*d^2*f^2*x^2*Tan[e + f*x])/(3*f^3)
 

Rubi [A] (verified)

Time = 0.57 (sec) , antiderivative size = 257, 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.150, Rules used = {3042, 4678, 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 (c+d x)^2 (a+b \sec (e+f x))^2 \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4678

\(\displaystyle \int \left (a^2 (c+d x)^2+2 a b (c+d x)^2 \sec (e+f x)+b^2 (c+d x)^2 \sec ^2(e+f x)\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {a^2 (c+d x)^3}{3 d}-\frac {4 i a b (c+d x)^2 \arctan \left (e^{i (e+f x)}\right )}{f}+\frac {4 i a b d (c+d x) \operatorname {PolyLog}\left (2,-i e^{i (e+f x)}\right )}{f^2}-\frac {4 i a b d (c+d x) \operatorname {PolyLog}\left (2,i e^{i (e+f x)}\right )}{f^2}-\frac {4 a b d^2 \operatorname {PolyLog}\left (3,-i e^{i (e+f x)}\right )}{f^3}+\frac {4 a b d^2 \operatorname {PolyLog}\left (3,i e^{i (e+f x)}\right )}{f^3}+\frac {2 b^2 d (c+d x) \log \left (1+e^{2 i (e+f x)}\right )}{f^2}+\frac {b^2 (c+d x)^2 \tan (e+f x)}{f}-\frac {i b^2 (c+d x)^2}{f}-\frac {i b^2 d^2 \operatorname {PolyLog}\left (2,-e^{2 i (e+f x)}\right )}{f^3}\)

Input:

Int[(c + d*x)^2*(a + b*Sec[e + f*x])^2,x]
 

Output:

((-I)*b^2*(c + d*x)^2)/f + (a^2*(c + d*x)^3)/(3*d) - ((4*I)*a*b*(c + d*x)^ 
2*ArcTan[E^(I*(e + f*x))])/f + (2*b^2*d*(c + d*x)*Log[1 + E^((2*I)*(e + f* 
x))])/f^2 + ((4*I)*a*b*d*(c + d*x)*PolyLog[2, (-I)*E^(I*(e + f*x))])/f^2 - 
 ((4*I)*a*b*d*(c + d*x)*PolyLog[2, I*E^(I*(e + f*x))])/f^2 - (I*b^2*d^2*Po 
lyLog[2, -E^((2*I)*(e + f*x))])/f^3 - (4*a*b*d^2*PolyLog[3, (-I)*E^(I*(e + 
 f*x))])/f^3 + (4*a*b*d^2*PolyLog[3, I*E^(I*(e + f*x))])/f^3 + (b^2*(c + d 
*x)^2*Tan[e + f*x])/f
 

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

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 661 vs. \(2 (232 ) = 464\).

Time = 0.32 (sec) , antiderivative size = 662, normalized size of antiderivative = 2.58

method result size
risch \(\frac {2 b \,d^{2} a \ln \left (1-i {\mathrm e}^{i \left (f x +e \right )}\right ) x^{2}}{f}+\frac {2 b \,e^{2} a \,d^{2} \ln \left (1+i {\mathrm e}^{i \left (f x +e \right )}\right )}{f^{3}}-\frac {2 b \,e^{2} a \,d^{2} \ln \left (1-i {\mathrm e}^{i \left (f x +e \right )}\right )}{f^{3}}-\frac {2 b \,d^{2} a \ln \left (1+i {\mathrm e}^{i \left (f x +e \right )}\right ) x^{2}}{f}-\frac {4 i b^{2} d^{2} e x}{f^{2}}-\frac {4 i b a \,c^{2} \arctan \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{f}+\frac {4 a b \,d^{2} \operatorname {polylog}\left (3, i {\mathrm e}^{i \left (f x +e \right )}\right )}{f^{3}}-\frac {i b^{2} d^{2} \operatorname {polylog}\left (2, -{\mathrm e}^{2 i \left (f x +e \right )}\right )}{f^{3}}+\frac {2 b^{2} d^{2} \ln \left (1+{\mathrm e}^{2 i \left (f x +e \right )}\right ) x}{f^{2}}+\frac {4 b^{2} d^{2} e \ln \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{f^{3}}+\frac {2 b^{2} c d \ln \left (1+{\mathrm e}^{2 i \left (f x +e \right )}\right )}{f^{2}}-\frac {4 b^{2} c d \ln \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{f^{2}}-\frac {2 i b^{2} d^{2} x^{2}}{f}-\frac {2 i b^{2} d^{2} e^{2}}{f^{3}}+\frac {2 i b^{2} \left (d^{2} x^{2}+2 c d x +c^{2}\right )}{f \left (1+{\mathrm e}^{2 i \left (f x +e \right )}\right )}-\frac {4 a b \,d^{2} \operatorname {polylog}\left (3, -i {\mathrm e}^{i \left (f x +e \right )}\right )}{f^{3}}+\frac {a^{2} d^{2} x^{3}}{3}+\frac {a^{2} c^{3}}{3 d}-\frac {4 b c a d \ln \left (1+i {\mathrm e}^{i \left (f x +e \right )}\right ) x}{f}+\frac {4 b c a d \ln \left (1-i {\mathrm e}^{i \left (f x +e \right )}\right ) x}{f}-\frac {4 b c a d \ln \left (1+i {\mathrm e}^{i \left (f x +e \right )}\right ) e}{f^{2}}+\frac {4 b c a d \ln \left (1-i {\mathrm e}^{i \left (f x +e \right )}\right ) e}{f^{2}}-\frac {4 i b a \,d^{2} e^{2} \arctan \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{f^{3}}+\frac {4 i b \,d^{2} a \operatorname {polylog}\left (2, -i {\mathrm e}^{i \left (f x +e \right )}\right ) x}{f^{2}}-\frac {4 i b \,d^{2} a \operatorname {polylog}\left (2, i {\mathrm e}^{i \left (f x +e \right )}\right ) x}{f^{2}}+\frac {8 i b a c d e \arctan \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{f^{2}}+a^{2} d c \,x^{2}+a^{2} c^{2} x +\frac {4 i b c a d \operatorname {polylog}\left (2, -i {\mathrm e}^{i \left (f x +e \right )}\right )}{f^{2}}-\frac {4 i b c a d \operatorname {polylog}\left (2, i {\mathrm e}^{i \left (f x +e \right )}\right )}{f^{2}}\) \(662\)

Input:

int((d*x+c)^2*(a+b*sec(f*x+e))^2,x,method=_RETURNVERBOSE)
 

Output:

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

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. 1056 vs. \(2 (220) = 440\).

Time = 0.15 (sec) , antiderivative size = 1056, normalized size of antiderivative = 4.11 \[ \int (c+d x)^2 (a+b \sec (e+f x))^2 \, dx=\text {Too large to display} \] Input:

integrate((d*x+c)^2*(a+b*sec(f*x+e))^2,x, algorithm="fricas")
 

Output:

-1/3*(6*a*b*d^2*cos(f*x + e)*polylog(3, I*cos(f*x + e) + sin(f*x + e)) - 6 
*a*b*d^2*cos(f*x + e)*polylog(3, I*cos(f*x + e) - sin(f*x + e)) + 6*a*b*d^ 
2*cos(f*x + e)*polylog(3, -I*cos(f*x + e) + sin(f*x + e)) - 6*a*b*d^2*cos( 
f*x + e)*polylog(3, -I*cos(f*x + e) - sin(f*x + e)) + 3*(2*I*a*b*d^2*f*x + 
 2*I*a*b*c*d*f - I*b^2*d^2)*cos(f*x + e)*dilog(I*cos(f*x + e) + sin(f*x + 
e)) + 3*(2*I*a*b*d^2*f*x + 2*I*a*b*c*d*f + I*b^2*d^2)*cos(f*x + e)*dilog(I 
*cos(f*x + e) - sin(f*x + e)) + 3*(-2*I*a*b*d^2*f*x - 2*I*a*b*c*d*f + I*b^ 
2*d^2)*cos(f*x + e)*dilog(-I*cos(f*x + e) + sin(f*x + e)) + 3*(-2*I*a*b*d^ 
2*f*x - 2*I*a*b*c*d*f - I*b^2*d^2)*cos(f*x + e)*dilog(-I*cos(f*x + e) - si 
n(f*x + e)) - 3*(a*b*d^2*e^2 + a*b*c^2*f^2 - b^2*d^2*e - (2*a*b*c*d*e - b^ 
2*c*d)*f)*cos(f*x + e)*log(cos(f*x + e) + I*sin(f*x + e) + I) + 3*(a*b*d^2 
*e^2 + a*b*c^2*f^2 + b^2*d^2*e - (2*a*b*c*d*e + b^2*c*d)*f)*cos(f*x + e)*l 
og(cos(f*x + e) - I*sin(f*x + e) + I) - 3*(a*b*d^2*f^2*x^2 - a*b*d^2*e^2 + 
 2*a*b*c*d*e*f + b^2*d^2*e + (2*a*b*c*d*f^2 + b^2*d^2*f)*x)*cos(f*x + e)*l 
og(I*cos(f*x + e) + sin(f*x + e) + 1) + 3*(a*b*d^2*f^2*x^2 - a*b*d^2*e^2 + 
 2*a*b*c*d*e*f - b^2*d^2*e + (2*a*b*c*d*f^2 - b^2*d^2*f)*x)*cos(f*x + e)*l 
og(I*cos(f*x + e) - sin(f*x + e) + 1) - 3*(a*b*d^2*f^2*x^2 - a*b*d^2*e^2 + 
 2*a*b*c*d*e*f + b^2*d^2*e + (2*a*b*c*d*f^2 + b^2*d^2*f)*x)*cos(f*x + e)*l 
og(-I*cos(f*x + e) + sin(f*x + e) + 1) + 3*(a*b*d^2*f^2*x^2 - a*b*d^2*e^2 
+ 2*a*b*c*d*e*f - b^2*d^2*e + (2*a*b*c*d*f^2 - b^2*d^2*f)*x)*cos(f*x + ...
 

Sympy [F]

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

integrate((d*x+c)**2*(a+b*sec(f*x+e))**2,x)
 

Output:

Integral((a + b*sec(e + f*x))**2*(c + d*x)**2, x)
 

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. 1641 vs. \(2 (220) = 440\).

Time = 0.27 (sec) , antiderivative size = 1641, normalized size of antiderivative = 6.39 \[ \int (c+d x)^2 (a+b \sec (e+f x))^2 \, dx=\text {Too large to display} \] Input:

integrate((d*x+c)^2*(a+b*sec(f*x+e))^2,x, algorithm="maxima")
 

Output:

1/3*(3*(f*x + e)*a^2*c^2 + (f*x + e)^3*a^2*d^2/f^2 - 3*(f*x + e)^2*a^2*d^2 
*e/f^2 + 3*(f*x + e)*a^2*d^2*e^2/f^2 + 3*(f*x + e)^2*a^2*c*d/f - 6*(f*x + 
e)*a^2*c*d*e/f + 6*a*b*c^2*log(sec(f*x + e) + tan(f*x + e)) + 6*a*b*d^2*e^ 
2*log(sec(f*x + e) + tan(f*x + e))/f^2 - 12*a*b*c*d*e*log(sec(f*x + e) + t 
an(f*x + e))/f + 3*(2*b^2*d^2*e^2 - 4*b^2*c*d*e*f + 2*b^2*c^2*f^2 - 2*((f* 
x + e)^2*a*b*d^2 - 2*(a*b*d^2*e - a*b*c*d*f)*(f*x + e) + ((f*x + e)^2*a*b* 
d^2 - 2*(a*b*d^2*e - a*b*c*d*f)*(f*x + e))*cos(2*f*x + 2*e) + (I*(f*x + e) 
^2*a*b*d^2 + 2*(-I*a*b*d^2*e + I*a*b*c*d*f)*(f*x + e))*sin(2*f*x + 2*e))*a 
rctan2(cos(f*x + e), sin(f*x + e) + 1) - 2*((f*x + e)^2*a*b*d^2 - 2*(a*b*d 
^2*e - a*b*c*d*f)*(f*x + e) + ((f*x + e)^2*a*b*d^2 - 2*(a*b*d^2*e - a*b*c* 
d*f)*(f*x + e))*cos(2*f*x + 2*e) + (I*(f*x + e)^2*a*b*d^2 + 2*(-I*a*b*d^2* 
e + I*a*b*c*d*f)*(f*x + e))*sin(2*f*x + 2*e))*arctan2(cos(f*x + e), -sin(f 
*x + e) + 1) + 2*((f*x + e)*b^2*d^2 - b^2*d^2*e + b^2*c*d*f + ((f*x + e)*b 
^2*d^2 - b^2*d^2*e + b^2*c*d*f)*cos(2*f*x + 2*e) - (-I*(f*x + e)*b^2*d^2 + 
 I*b^2*d^2*e - I*b^2*c*d*f)*sin(2*f*x + 2*e))*arctan2(sin(2*f*x + 2*e), co 
s(2*f*x + 2*e) + 1) - 2*((f*x + e)^2*b^2*d^2 - 2*(b^2*d^2*e - b^2*c*d*f)*( 
f*x + e))*cos(2*f*x + 2*e) - (b^2*d^2*cos(2*f*x + 2*e) + I*b^2*d^2*sin(2*f 
*x + 2*e) + b^2*d^2)*dilog(-e^(2*I*f*x + 2*I*e)) - 4*((f*x + e)*a*b*d^2 - 
a*b*d^2*e + a*b*c*d*f + ((f*x + e)*a*b*d^2 - a*b*d^2*e + a*b*c*d*f)*cos(2* 
f*x + 2*e) + (I*(f*x + e)*a*b*d^2 - I*a*b*d^2*e + I*a*b*c*d*f)*sin(2*f*...
 

Giac [F]

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

integrate((d*x+c)^2*(a+b*sec(f*x+e))^2,x, algorithm="giac")
 

Output:

integrate((d*x + c)^2*(b*sec(f*x + e) + a)^2, x)
 

Mupad [F(-1)]

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

int((a + b/cos(e + f*x))^2*(c + d*x)^2,x)
 

Output:

int((a + b/cos(e + f*x))^2*(c + d*x)^2, x)
 

Reduce [F]

\[ \int (c+d x)^2 (a+b \sec (e+f x))^2 \, dx =\text {Too large to display} \] Input:

int((d*x+c)^2*(a+b*sec(f*x+e))^2,x)
 

Output:

(12*cos(e + f*x)*int(x**2/(tan((e + f*x)/2)**4 - 2*tan((e + f*x)/2)**2 + 1 
),x)*a*b*d**2*f**3 + 24*cos(e + f*x)*int((tan((e + f*x)/2)*x)/(tan((e + f* 
x)/2)**4 - 2*tan((e + f*x)/2)**2 + 1),x)*a*b*d**2*f**2 - 24*cos(e + f*x)*i 
nt((tan((e + f*x)/2)*x)/(tan((e + f*x)/2)**4 - 2*tan((e + f*x)/2)**2 + 1), 
x)*b**2*d**2*f**2 + 24*cos(e + f*x)*int(x/(tan((e + f*x)/2)**4 - 2*tan((e 
+ f*x)/2)**2 + 1),x)*a*b*c*d*f**3 + 6*cos(e + f*x)*log(tan((e + f*x)/2)**2 
 + 1)*a*b*c*d*f - 6*cos(e + f*x)*log(tan((e + f*x)/2)**2 + 1)*b**2*c*d*f - 
 6*cos(e + f*x)*log(tan((e + f*x)/2) - 1)*a*b*c**2*f**2 - 6*cos(e + f*x)*l 
og(tan((e + f*x)/2) - 1)*a*b*c*d*f - 6*cos(e + f*x)*log(tan((e + f*x)/2) - 
 1)*a*b*d**2 + 6*cos(e + f*x)*log(tan((e + f*x)/2) - 1)*b**2*c*d*f + 6*cos 
(e + f*x)*log(tan((e + f*x)/2) - 1)*b**2*d**2 + 6*cos(e + f*x)*log(tan((e 
+ f*x)/2) + 1)*a*b*c**2*f**2 - 6*cos(e + f*x)*log(tan((e + f*x)/2) + 1)*a* 
b*c*d*f + 6*cos(e + f*x)*log(tan((e + f*x)/2) + 1)*a*b*d**2 + 6*cos(e + f* 
x)*log(tan((e + f*x)/2) + 1)*b**2*c*d*f - 6*cos(e + f*x)*log(tan((e + f*x) 
/2) + 1)*b**2*d**2 + 3*cos(e + f*x)*a**2*c**2*f**3*x + 3*cos(e + f*x)*a**2 
*c*d*f**3*x**2 + cos(e + f*x)*a**2*d**2*f**3*x**3 - 3*cos(e + f*x)*a*b*c*d 
*f**3*x**2 - cos(e + f*x)*a*b*d**2*f**3*x**3 - 6*sin(e + f*x)*a*b*c*d*f**2 
*x - 3*sin(e + f*x)*a*b*d**2*f**2*x**2 + 3*sin(e + f*x)*b**2*c**2*f**2 + 6 
*sin(e + f*x)*b**2*c*d*f**2*x + 3*sin(e + f*x)*b**2*d**2*f**2*x**2 - 6*a*b 
*d**2*f*x + 6*b**2*d**2*f*x)/(3*cos(e + f*x)*f**3)