\(\int \frac {(c+d x)^3}{(a+a \sec (e+f x))^2} \, dx\) [16]

Optimal result
Mathematica [B] (warning: unable to verify)
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 = 288 \[ \int \frac {(c+d x)^3}{(a+a \sec (e+f x))^2} \, dx=\frac {5 i (c+d x)^3}{3 a^2 f}+\frac {(c+d x)^4}{4 a^2 d}-\frac {10 d (c+d x)^2 \log \left (1+e^{i (e+f x)}\right )}{a^2 f^2}+\frac {4 d^3 \log \left (\cos \left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{a^2 f^4}+\frac {20 i d^2 (c+d x) \operatorname {PolyLog}\left (2,-e^{i (e+f x)}\right )}{a^2 f^3}-\frac {20 d^3 \operatorname {PolyLog}\left (3,-e^{i (e+f x)}\right )}{a^2 f^4}-\frac {d (c+d x)^2 \sec ^2\left (\frac {e}{2}+\frac {f x}{2}\right )}{2 a^2 f^2}+\frac {2 d^2 (c+d x) \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{a^2 f^3}-\frac {5 (c+d x)^3 \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{3 a^2 f}+\frac {(c+d x)^3 \sec ^2\left (\frac {e}{2}+\frac {f x}{2}\right ) \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{6 a^2 f} \] Output:

5/3*I*(d*x+c)^3/a^2/f+1/4*(d*x+c)^4/a^2/d-10*d*(d*x+c)^2*ln(1+exp(I*(f*x+e 
)))/a^2/f^2+4*d^3*ln(cos(1/2*f*x+1/2*e))/a^2/f^4+20*I*d^2*(d*x+c)*polylog( 
2,-exp(I*(f*x+e)))/a^2/f^3-20*d^3*polylog(3,-exp(I*(f*x+e)))/a^2/f^4-1/2*d 
*(d*x+c)^2*sec(1/2*f*x+1/2*e)^2/a^2/f^2+2*d^2*(d*x+c)*tan(1/2*f*x+1/2*e)/a 
^2/f^3-5/3*(d*x+c)^3*tan(1/2*f*x+1/2*e)/a^2/f+1/6*(d*x+c)^3*sec(1/2*f*x+1/ 
2*e)^2*tan(1/2*f*x+1/2*e)/a^2/f
 

Mathematica [B] (warning: unable to verify)

Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(1447\) vs. \(2(288)=576\).

Time = 7.29 (sec) , antiderivative size = 1447, normalized size of antiderivative = 5.02 \[ \int \frac {(c+d x)^3}{(a+a \sec (e+f x))^2} \, dx =\text {Too large to display} \] Input:

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

Output:

(((-20*I)/3)*d^3*Cos[e/2 + (f*x)/2]^4*(f^2*x^2*(f*x - (3*I)*(1 + E^(I*e))* 
Log[1 + E^((-I)*(e + f*x))]) + 6*(1 + E^(I*e))*f*x*PolyLog[2, -E^((-I)*(e 
+ f*x))] - (6*I)*(1 + E^(I*e))*PolyLog[3, -E^((-I)*(e + f*x))])*Sec[e/2]*S 
ec[e + f*x]^2)/(E^((I/2)*e)*f^4*(a + a*Sec[e + f*x])^2) + (16*d^3*Cos[e/2 
+ (f*x)/2]^4*Sec[e/2]*Sec[e + f*x]^2*(Cos[e/2]*Log[Cos[e/2]*Cos[(f*x)/2] - 
 Sin[e/2]*Sin[(f*x)/2]] + (f*x*Sin[e/2])/2))/(f^4*(a + a*Sec[e + f*x])^2*( 
Cos[e/2]^2 + Sin[e/2]^2)) - (40*c^2*d*Cos[e/2 + (f*x)/2]^4*Sec[e/2]*Sec[e 
+ f*x]^2*(Cos[e/2]*Log[Cos[e/2]*Cos[(f*x)/2] - Sin[e/2]*Sin[(f*x)/2]] + (f 
*x*Sin[e/2])/2))/(f^2*(a + a*Sec[e + f*x])^2*(Cos[e/2]^2 + Sin[e/2]^2)) - 
(80*c*d^2*Cos[e/2 + (f*x)/2]^4*Csc[e/2]*((f^2*x^2)/(4*E^(I*ArcTan[Cot[e/2] 
])) - (Cot[e/2]*((I/2)*f*x*(-Pi - 2*ArcTan[Cot[e/2]]) - Pi*Log[1 + E^((-I) 
*f*x)] - 2*((f*x)/2 - ArcTan[Cot[e/2]])*Log[1 - E^((2*I)*((f*x)/2 - ArcTan 
[Cot[e/2]]))] + Pi*Log[Cos[(f*x)/2]] - 2*ArcTan[Cot[e/2]]*Log[Sin[(f*x)/2 
- ArcTan[Cot[e/2]]]] + I*PolyLog[2, E^((2*I)*((f*x)/2 - ArcTan[Cot[e/2]])) 
]))/Sqrt[1 + Cot[e/2]^2])*Sec[e/2]*Sec[e + f*x]^2)/(f^3*(a + a*Sec[e + f*x 
])^2*Sqrt[Csc[e/2]^2*(Cos[e/2]^2 + Sin[e/2]^2)]) + (Cos[e/2 + (f*x)/2]*Sec 
[e/2]*Sec[e + f*x]^2*(-24*c^2*d*f*Cos[(f*x)/2] - 48*c*d^2*f*x*Cos[(f*x)/2] 
 + 36*c^3*f^3*x*Cos[(f*x)/2] - 24*d^3*f*x^2*Cos[(f*x)/2] + 54*c^2*d*f^3*x^ 
2*Cos[(f*x)/2] + 36*c*d^2*f^3*x^3*Cos[(f*x)/2] + 9*d^3*f^3*x^4*Cos[(f*x)/2 
] - 24*c^2*d*f*Cos[e + (f*x)/2] - 48*c*d^2*f*x*Cos[e + (f*x)/2] + 36*c^...
 

Rubi [A] (verified)

Time = 0.93 (sec) , antiderivative size = 288, 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, 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 {(c+d x)^3}{(a \sec (e+f x)+a)^2} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4679

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

\(\Big \downarrow \) 2009

\(\displaystyle \frac {20 i d^2 (c+d x) \operatorname {PolyLog}\left (2,-e^{i (e+f x)}\right )}{a^2 f^3}+\frac {2 d^2 (c+d x) \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{a^2 f^3}-\frac {10 d (c+d x)^2 \log \left (1+e^{i (e+f x)}\right )}{a^2 f^2}-\frac {d (c+d x)^2 \sec ^2\left (\frac {e}{2}+\frac {f x}{2}\right )}{2 a^2 f^2}-\frac {5 (c+d x)^3 \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{3 a^2 f}+\frac {(c+d x)^3 \tan \left (\frac {e}{2}+\frac {f x}{2}\right ) \sec ^2\left (\frac {e}{2}+\frac {f x}{2}\right )}{6 a^2 f}+\frac {5 i (c+d x)^3}{3 a^2 f}+\frac {(c+d x)^4}{4 a^2 d}-\frac {20 d^3 \operatorname {PolyLog}\left (3,-e^{i (e+f x)}\right )}{a^2 f^4}+\frac {4 d^3 \log \left (\cos \left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{a^2 f^4}\)

Input:

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

Output:

(((5*I)/3)*(c + d*x)^3)/(a^2*f) + (c + d*x)^4/(4*a^2*d) - (10*d*(c + d*x)^ 
2*Log[1 + E^(I*(e + f*x))])/(a^2*f^2) + (4*d^3*Log[Cos[e/2 + (f*x)/2]])/(a 
^2*f^4) + ((20*I)*d^2*(c + d*x)*PolyLog[2, -E^(I*(e + f*x))])/(a^2*f^3) - 
(20*d^3*PolyLog[3, -E^(I*(e + f*x))])/(a^2*f^4) - (d*(c + d*x)^2*Sec[e/2 + 
 (f*x)/2]^2)/(2*a^2*f^2) + (2*d^2*(c + d*x)*Tan[e/2 + (f*x)/2])/(a^2*f^3) 
- (5*(c + d*x)^3*Tan[e/2 + (f*x)/2])/(3*a^2*f) + ((c + d*x)^3*Sec[e/2 + (f 
*x)/2]^2*Tan[e/2 + (f*x)/2])/(6*a^2*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 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]
 
Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 809 vs. \(2 (246 ) = 492\).

Time = 0.25 (sec) , antiderivative size = 810, normalized size of antiderivative = 2.81

method result size
risch \(\frac {d^{3} x^{4}}{4 a^{2}}+\frac {d^{2} c \,x^{3}}{a^{2}}+\frac {3 d \,c^{2} x^{2}}{2 a^{2}}+\frac {c^{3} x}{a^{2}}+\frac {c^{4}}{4 a^{2} d}-\frac {20 i d^{3} e^{3}}{3 a^{2} f^{4}}-\frac {10 d \,c^{2} \ln \left (1+{\mathrm e}^{i \left (f x +e \right )}\right )}{a^{2} f^{2}}+\frac {10 d \,c^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{a^{2} f^{2}}+\frac {10 d^{3} e^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{a^{2} f^{4}}+\frac {10 i d^{2} c \,e^{2}}{a^{2} f^{3}}+\frac {10 i d^{2} c \,x^{2}}{a^{2} f}+\frac {20 i d^{2} c e x}{a^{2} f^{2}}-\frac {2 i \left (6 d^{3} f^{2} x^{3} {\mathrm e}^{2 i \left (f x +e \right )}-6 i c \,d^{2} f x \,{\mathrm e}^{2 i \left (f x +e \right )}+18 c \,d^{2} f^{2} x^{2} {\mathrm e}^{2 i \left (f x +e \right )}+9 d^{3} f^{2} x^{3} {\mathrm e}^{i \left (f x +e \right )}-3 i d^{3} f \,x^{2} {\mathrm e}^{i \left (f x +e \right )}-3 i c^{2} d f \,{\mathrm e}^{2 i \left (f x +e \right )}+18 c^{2} d \,f^{2} x \,{\mathrm e}^{2 i \left (f x +e \right )}+27 c \,d^{2} f^{2} x^{2} {\mathrm e}^{i \left (f x +e \right )}+5 d^{3} f^{2} x^{3}-6 i c \,d^{2} f x \,{\mathrm e}^{i \left (f x +e \right )}-3 i c^{2} d f \,{\mathrm e}^{i \left (f x +e \right )}+6 c^{3} f^{2} {\mathrm e}^{2 i \left (f x +e \right )}+27 c^{2} d \,f^{2} x \,{\mathrm e}^{i \left (f x +e \right )}+15 c \,d^{2} f^{2} x^{2}-3 i d^{3} f \,x^{2} {\mathrm e}^{2 i \left (f x +e \right )}+9 c^{3} f^{2} {\mathrm e}^{i \left (f x +e \right )}+15 c^{2} d \,f^{2} x -6 d^{3} x \,{\mathrm e}^{2 i \left (f x +e \right )}+5 c^{3} f^{2}-6 c \,d^{2} {\mathrm e}^{2 i \left (f x +e \right )}-12 d^{3} x \,{\mathrm e}^{i \left (f x +e \right )}-12 c \,d^{2} {\mathrm e}^{i \left (f x +e \right )}-6 d^{3} x -6 c \,d^{2}\right )}{3 f^{3} a^{2} \left (1+{\mathrm e}^{i \left (f x +e \right )}\right )^{3}}+\frac {20 i d^{2} c \operatorname {polylog}\left (2, -{\mathrm e}^{i \left (f x +e \right )}\right )}{a^{2} f^{3}}-\frac {10 d^{3} \ln \left (1+{\mathrm e}^{i \left (f x +e \right )}\right ) x^{2}}{a^{2} f^{2}}+\frac {10 i d^{3} x^{3}}{3 a^{2} f}-\frac {20 d^{2} c e \ln \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{a^{2} f^{3}}-\frac {10 i d^{3} e^{2} x}{a^{2} f^{3}}-\frac {20 d^{2} c \ln \left (1+{\mathrm e}^{i \left (f x +e \right )}\right ) x}{a^{2} f^{2}}+\frac {20 i d^{3} \operatorname {polylog}\left (2, -{\mathrm e}^{i \left (f x +e \right )}\right ) x}{a^{2} f^{3}}+\frac {4 d^{3} \ln \left (1+{\mathrm e}^{i \left (f x +e \right )}\right )}{a^{2} f^{4}}-\frac {4 d^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{a^{2} f^{4}}-\frac {20 d^{3} \operatorname {polylog}\left (3, -{\mathrm e}^{i \left (f x +e \right )}\right )}{a^{2} f^{4}}\) \(810\)

Input:

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

Output:

1/4/a^2*d^3*x^4+1/a^2*d^2*c*x^3+3/2/a^2*d*c^2*x^2+1/a^2*c^3*x+1/4/a^2/d*c^ 
4-20/3*I/a^2/f^4*d^3*e^3-10/a^2/f^2*d*c^2*ln(1+exp(I*(f*x+e)))+10/a^2/f^2* 
d*c^2*ln(exp(I*(f*x+e)))+10/a^2/f^4*d^3*e^2*ln(exp(I*(f*x+e)))+10*I/a^2/f^ 
3*d^2*c*e^2+10*I/a^2/f*d^2*c*x^2+20*I/a^2/f^2*d^2*c*e*x-2/3*I*(6*d^3*f^2*x 
^3*exp(2*I*(f*x+e))-6*I*c*d^2*f*x*exp(2*I*(f*x+e))+18*c*d^2*f^2*x^2*exp(2* 
I*(f*x+e))+9*d^3*f^2*x^3*exp(I*(f*x+e))-3*I*d^3*f*x^2*exp(I*(f*x+e))-3*I*c 
^2*d*f*exp(2*I*(f*x+e))+18*c^2*d*f^2*x*exp(2*I*(f*x+e))+27*c*d^2*f^2*x^2*e 
xp(I*(f*x+e))+5*d^3*f^2*x^3-6*I*c*d^2*f*x*exp(I*(f*x+e))-3*I*c^2*d*f*exp(I 
*(f*x+e))+6*c^3*f^2*exp(2*I*(f*x+e))+27*c^2*d*f^2*x*exp(I*(f*x+e))+15*c*d^ 
2*f^2*x^2-3*I*d^3*f*x^2*exp(2*I*(f*x+e))+9*c^3*f^2*exp(I*(f*x+e))+15*c^2*d 
*f^2*x-6*d^3*x*exp(2*I*(f*x+e))+5*c^3*f^2-6*c*d^2*exp(2*I*(f*x+e))-12*d^3* 
x*exp(I*(f*x+e))-12*c*d^2*exp(I*(f*x+e))-6*d^3*x-6*c*d^2)/f^3/a^2/(1+exp(I 
*(f*x+e)))^3+20*I/a^2/f^3*d^2*c*polylog(2,-exp(I*(f*x+e)))-10/a^2/f^2*d^3* 
ln(1+exp(I*(f*x+e)))*x^2+10/3*I/a^2/f*d^3*x^3-20/a^2/f^3*d^2*c*e*ln(exp(I* 
(f*x+e)))-10*I/a^2/f^3*d^3*e^2*x-20/a^2/f^2*d^2*c*ln(1+exp(I*(f*x+e)))*x+2 
0*I/a^2/f^3*d^3*polylog(2,-exp(I*(f*x+e)))*x+4/a^2/f^4*d^3*ln(1+exp(I*(f*x 
+e)))-4/a^2/f^4*d^3*ln(exp(I*(f*x+e)))-20*d^3*polylog(3,-exp(I*(f*x+e)))/a 
^2/f^4
 

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. 933 vs. \(2 (243) = 486\).

Time = 0.11 (sec) , antiderivative size = 933, normalized size of antiderivative = 3.24 \[ \int \frac {(c+d x)^3}{(a+a \sec (e+f x))^2} \, dx =\text {Too large to display} \] Input:

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

Output:

1/12*(3*d^3*f^4*x^4 + 12*c*d^2*f^4*x^3 - 12*c^2*d*f^2 + 6*(3*c^2*d*f^4 - 2 
*d^3*f^2)*x^2 + 3*(d^3*f^4*x^4 + 4*c*d^2*f^4*x^3 + 6*c^2*d*f^4*x^2 + 4*c^3 
*f^4*x)*cos(f*x + e)^2 + 12*(c^3*f^4 - 2*c*d^2*f^2)*x + 6*(d^3*f^4*x^4 + 4 
*c*d^2*f^4*x^3 - 2*c^2*d*f^2 + 2*(3*c^2*d*f^4 - d^3*f^2)*x^2 + 4*(c^3*f^4 
- c*d^2*f^2)*x)*cos(f*x + e) - 120*(I*d^3*f*x + I*c*d^2*f + (I*d^3*f*x + I 
*c*d^2*f)*cos(f*x + e)^2 + 2*(I*d^3*f*x + I*c*d^2*f)*cos(f*x + e))*dilog(- 
cos(f*x + e) + I*sin(f*x + e)) - 120*(-I*d^3*f*x - I*c*d^2*f + (-I*d^3*f*x 
 - I*c*d^2*f)*cos(f*x + e)^2 + 2*(-I*d^3*f*x - I*c*d^2*f)*cos(f*x + e))*di 
log(-cos(f*x + e) - I*sin(f*x + e)) - 12*(5*d^3*f^2*x^2 + 10*c*d^2*f^2*x + 
 5*c^2*d*f^2 - 2*d^3 + (5*d^3*f^2*x^2 + 10*c*d^2*f^2*x + 5*c^2*d*f^2 - 2*d 
^3)*cos(f*x + e)^2 + 2*(5*d^3*f^2*x^2 + 10*c*d^2*f^2*x + 5*c^2*d*f^2 - 2*d 
^3)*cos(f*x + e))*log(cos(f*x + e) + I*sin(f*x + e) + 1) - 12*(5*d^3*f^2*x 
^2 + 10*c*d^2*f^2*x + 5*c^2*d*f^2 - 2*d^3 + (5*d^3*f^2*x^2 + 10*c*d^2*f^2* 
x + 5*c^2*d*f^2 - 2*d^3)*cos(f*x + e)^2 + 2*(5*d^3*f^2*x^2 + 10*c*d^2*f^2* 
x + 5*c^2*d*f^2 - 2*d^3)*cos(f*x + e))*log(cos(f*x + e) - I*sin(f*x + e) + 
 1) - 120*(d^3*cos(f*x + e)^2 + 2*d^3*cos(f*x + e) + d^3)*polylog(3, -cos( 
f*x + e) + I*sin(f*x + e)) - 120*(d^3*cos(f*x + e)^2 + 2*d^3*cos(f*x + e) 
+ d^3)*polylog(3, -cos(f*x + e) - I*sin(f*x + e)) - 4*(4*d^3*f^3*x^3 + 12* 
c*d^2*f^3*x^2 + 4*c^3*f^3 - 6*c*d^2*f + 6*(2*c^2*d*f^3 - d^3*f)*x + (5*d^3 
*f^3*x^3 + 15*c*d^2*f^3*x^2 + 5*c^3*f^3 - 6*c*d^2*f + 3*(5*c^2*d*f^3 - ...
 

Sympy [F]

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

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

Output:

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

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. 4283 vs. \(2 (243) = 486\).

Time = 1.09 (sec) , antiderivative size = 4283, normalized size of antiderivative = 14.87 \[ \int \frac {(c+d x)^3}{(a+a \sec (e+f x))^2} \, dx=\text {Too large to display} \] Input:

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

Output:

-1/6*(3*c*d^2*e^2*((9*sin(f*x + e)/(cos(f*x + e) + 1) - sin(f*x + e)^3/(co 
s(f*x + e) + 1)^3)/(a^2*f^2) - 12*arctan(sin(f*x + e)/(cos(f*x + e) + 1))/ 
(a^2*f^2)) - 3*c^2*d*e*((9*sin(f*x + e)/(cos(f*x + e) + 1) - sin(f*x + e)^ 
3/(cos(f*x + e) + 1)^3)/(a^2*f) - 12*arctan(sin(f*x + e)/(cos(f*x + e) + 1 
))/(a^2*f)) + 6*(3*(f*x + e)^2*cos(3*f*x + 3*e)^2 + 3*(f*x + e)^2*sin(3*f* 
x + 3*e)^2 + 3*(9*(f*x + e)^2 - 4)*cos(2*f*x + 2*e)^2 + 3*(9*(f*x + e)^2 - 
 4)*cos(f*x + e)^2 + 3*(9*(f*x + e)^2 - 4)*sin(2*f*x + 2*e)^2 + 3*(9*(f*x 
+ e)^2 - 4)*sin(f*x + e)^2 + 3*(f*x + e)^2 + 2*(3*(f*x + e)^2 + (9*(f*x + 
e)^2 - 2)*cos(2*f*x + 2*e) + (9*(f*x + e)^2 - 2)*cos(f*x + e) + 12*(f*x + 
e)*sin(2*f*x + 2*e) + 18*(f*x + e)*sin(f*x + e))*cos(3*f*x + 3*e) + 2*(9*( 
f*x + e)^2 + 3*(9*(f*x + e)^2 - 4)*cos(f*x + e) + 18*(f*x + e)*sin(f*x + e 
) - 2)*cos(2*f*x + 2*e) + 2*(9*(f*x + e)^2 - 2)*cos(f*x + e) - 10*(2*(3*co 
s(2*f*x + 2*e) + 3*cos(f*x + e) + 1)*cos(3*f*x + 3*e) + cos(3*f*x + 3*e)^2 
 + 6*(3*cos(f*x + e) + 1)*cos(2*f*x + 2*e) + 9*cos(2*f*x + 2*e)^2 + 9*cos( 
f*x + e)^2 + 6*(sin(2*f*x + 2*e) + sin(f*x + e))*sin(3*f*x + 3*e) + sin(3* 
f*x + 3*e)^2 + 9*sin(2*f*x + 2*e)^2 + 18*sin(2*f*x + 2*e)*sin(f*x + e) + 9 
*sin(f*x + e)^2 + 6*cos(f*x + e) + 1)*log(cos(f*x + e)^2 + sin(f*x + e)^2 
+ 2*cos(f*x + e) + 1) - 2*(10*f*x + 12*(f*x + e)*cos(2*f*x + 2*e) + 18*(f* 
x + e)*cos(f*x + e) - (9*(f*x + e)^2 - 2)*sin(2*f*x + 2*e) - (9*(f*x + e)^ 
2 - 2)*sin(f*x + e) + 10*e)*sin(3*f*x + 3*e) - 6*(6*f*x + 6*(f*x + e)*c...
 

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

Timed out. \[ \int \frac {(c+d x)^3}{(a+a \sec (e+f x))^2} \, dx=\text {Hanged} \] Input:

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

Output:

\text{Hanged}
 

Reduce [F]

\[ \int \frac {(c+d x)^3}{(a+a \sec (e+f x))^2} \, dx=\frac {60 \left (\int \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) x^{2}d x \right ) d^{3} f^{3}+120 \left (\int \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) x d x \right ) c \,d^{2} f^{3}+60 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}+1\right ) c^{2} d \,f^{2}-24 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}+1\right ) d^{3}+2 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} c^{3} f^{3}+6 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} c^{2} d \,f^{3} x +6 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} c \,d^{2} f^{3} x^{2}+2 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} d^{3} f^{3} x^{3}-6 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} c^{2} d \,f^{2}-12 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} c \,d^{2} f^{2} x -6 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} d^{3} f^{2} x^{2}-18 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c^{3} f^{3}-54 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c^{2} d \,f^{3} x -54 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c \,d^{2} f^{3} x^{2}+24 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c \,d^{2} f -18 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) d^{3} f^{3} x^{3}+24 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) d^{3} f x +12 c^{3} f^{4} x +18 c^{2} d \,f^{4} x^{2}+12 c \,d^{2} f^{4} x^{3}-12 c \,d^{2} f^{2} x +3 d^{3} f^{4} x^{4}-6 d^{3} f^{2} x^{2}}{12 a^{2} f^{4}} \] Input:

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

Output:

(60*int(tan((e + f*x)/2)*x**2,x)*d**3*f**3 + 120*int(tan((e + f*x)/2)*x,x) 
*c*d**2*f**3 + 60*log(tan((e + f*x)/2)**2 + 1)*c**2*d*f**2 - 24*log(tan((e 
 + f*x)/2)**2 + 1)*d**3 + 2*tan((e + f*x)/2)**3*c**3*f**3 + 6*tan((e + f*x 
)/2)**3*c**2*d*f**3*x + 6*tan((e + f*x)/2)**3*c*d**2*f**3*x**2 + 2*tan((e 
+ f*x)/2)**3*d**3*f**3*x**3 - 6*tan((e + f*x)/2)**2*c**2*d*f**2 - 12*tan(( 
e + f*x)/2)**2*c*d**2*f**2*x - 6*tan((e + f*x)/2)**2*d**3*f**2*x**2 - 18*t 
an((e + f*x)/2)*c**3*f**3 - 54*tan((e + f*x)/2)*c**2*d*f**3*x - 54*tan((e 
+ f*x)/2)*c*d**2*f**3*x**2 + 24*tan((e + f*x)/2)*c*d**2*f - 18*tan((e + f* 
x)/2)*d**3*f**3*x**3 + 24*tan((e + f*x)/2)*d**3*f*x + 12*c**3*f**4*x + 18* 
c**2*d*f**4*x**2 + 12*c*d**2*f**4*x**3 - 12*c*d**2*f**2*x + 3*d**3*f**4*x* 
*4 - 6*d**3*f**2*x**2)/(12*a**2*f**4)