\(\int (c+d x)^3 (a+a \sec (e+f x)) \, dx\) [1]

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 = 18, antiderivative size = 227 \[ \int (c+d x)^3 (a+a \sec (e+f x)) \, dx=\frac {a (c+d x)^4}{4 d}-\frac {2 i a (c+d x)^3 \arctan \left (e^{i (e+f x)}\right )}{f}+\frac {3 i a d (c+d x)^2 \operatorname {PolyLog}\left (2,-i e^{i (e+f x)}\right )}{f^2}-\frac {3 i a d (c+d x)^2 \operatorname {PolyLog}\left (2,i e^{i (e+f x)}\right )}{f^2}-\frac {6 a d^2 (c+d x) \operatorname {PolyLog}\left (3,-i e^{i (e+f x)}\right )}{f^3}+\frac {6 a d^2 (c+d x) \operatorname {PolyLog}\left (3,i e^{i (e+f x)}\right )}{f^3}-\frac {6 i a d^3 \operatorname {PolyLog}\left (4,-i e^{i (e+f x)}\right )}{f^4}+\frac {6 i a d^3 \operatorname {PolyLog}\left (4,i e^{i (e+f x)}\right )}{f^4} \] Output:

1/4*a*(d*x+c)^4/d-2*I*a*(d*x+c)^3*arctan(exp(I*(f*x+e)))/f+3*I*a*d*(d*x+c) 
^2*polylog(2,-I*exp(I*(f*x+e)))/f^2-3*I*a*d*(d*x+c)^2*polylog(2,I*exp(I*(f 
*x+e)))/f^2-6*a*d^2*(d*x+c)*polylog(3,-I*exp(I*(f*x+e)))/f^3+6*a*d^2*(d*x+ 
c)*polylog(3,I*exp(I*(f*x+e)))/f^3-6*I*a*d^3*polylog(4,-I*exp(I*(f*x+e)))/ 
f^4+6*I*a*d^3*polylog(4,I*exp(I*(f*x+e)))/f^4
 

Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 218, normalized size of antiderivative = 0.96 \[ \int (c+d x)^3 (a+a \sec (e+f x)) \, dx=a \left (\frac {(c+d x)^4}{4 d}-\frac {2 i (c+d x)^3 \arctan \left (e^{i (e+f x)}\right )}{f}+\frac {3 i d \left (f^2 (c+d x)^2 \operatorname {PolyLog}\left (2,-i e^{i (e+f x)}\right )+2 i d f (c+d x) \operatorname {PolyLog}\left (3,-i e^{i (e+f x)}\right )-2 d^2 \operatorname {PolyLog}\left (4,-i e^{i (e+f x)}\right )\right )}{f^4}+\frac {3 d \left (-i f^2 (c+d x)^2 \operatorname {PolyLog}\left (2,i e^{i (e+f x)}\right )+2 d \left (f (c+d x) \operatorname {PolyLog}\left (3,i e^{i (e+f x)}\right )+i d \operatorname {PolyLog}\left (4,i e^{i (e+f x)}\right )\right )\right )}{f^4}\right ) \] Input:

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

Output:

a*((c + d*x)^4/(4*d) - ((2*I)*(c + d*x)^3*ArcTan[E^(I*(e + f*x))])/f + ((3 
*I)*d*(f^2*(c + d*x)^2*PolyLog[2, (-I)*E^(I*(e + f*x))] + (2*I)*d*f*(c + d 
*x)*PolyLog[3, (-I)*E^(I*(e + f*x))] - 2*d^2*PolyLog[4, (-I)*E^(I*(e + f*x 
))]))/f^4 + (3*d*((-I)*f^2*(c + d*x)^2*PolyLog[2, I*E^(I*(e + f*x))] + 2*d 
*(f*(c + d*x)*PolyLog[3, I*E^(I*(e + f*x))] + I*d*PolyLog[4, I*E^(I*(e + f 
*x))])))/f^4)
 

Rubi [A] (verified)

Time = 0.46 (sec) , antiderivative size = 227, 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.167, 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)^3 (a \sec (e+f x)+a) \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4678

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

(a*(c + d*x)^4)/(4*d) - ((2*I)*a*(c + d*x)^3*ArcTan[E^(I*(e + f*x))])/f + 
((3*I)*a*d*(c + d*x)^2*PolyLog[2, (-I)*E^(I*(e + f*x))])/f^2 - ((3*I)*a*d* 
(c + d*x)^2*PolyLog[2, I*E^(I*(e + f*x))])/f^2 - (6*a*d^2*(c + d*x)*PolyLo 
g[3, (-I)*E^(I*(e + f*x))])/f^3 + (6*a*d^2*(c + d*x)*PolyLog[3, I*E^(I*(e 
+ f*x))])/f^3 - ((6*I)*a*d^3*PolyLog[4, (-I)*E^(I*(e + f*x))])/f^4 + ((6*I 
)*a*d^3*PolyLog[4, I*E^(I*(e + f*x))])/f^4
 

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. 755 vs. \(2 (200 ) = 400\).

Time = 0.45 (sec) , antiderivative size = 756, normalized size of antiderivative = 3.33

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

Input:

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

Output:

1/4*a*d^3*x^4+1/4*a/d*c^4-1/f^4*a*e^3*d^3*ln(1+I*exp(I*(f*x+e)))-6/f^3*a*d 
^3*polylog(3,-I*exp(I*(f*x+e)))*x+6/f^3*a*d^3*polylog(3,I*exp(I*(f*x+e)))* 
x-6/f^3*a*d^2*c*polylog(3,-I*exp(I*(f*x+e)))+6/f^3*a*d^2*c*polylog(3,I*exp 
(I*(f*x+e)))+1/f^4*a*e^3*d^3*ln(1-I*exp(I*(f*x+e)))-1/f*a*d^3*ln(1+I*exp(I 
*(f*x+e)))*x^3+1/f*a*d^3*ln(1-I*exp(I*(f*x+e)))*x^3-2*I/f*a*c^3*arctan(exp 
(I*(f*x+e)))-3/f*a*d^2*c*ln(1+I*exp(I*(f*x+e)))*x^2+3/f*a*d^2*c*ln(1-I*exp 
(I*(f*x+e)))*x^2+3/f*a*c^2*d*ln(1-I*exp(I*(f*x+e)))*x+3/f^2*a*c^2*d*ln(1-I 
*exp(I*(f*x+e)))*e-3/f^3*a*e^2*c*d^2*ln(1-I*exp(I*(f*x+e)))-3/f*a*c^2*d*ln 
(1+I*exp(I*(f*x+e)))*x-3/f^2*a*c^2*d*ln(1+I*exp(I*(f*x+e)))*e+3/f^3*a*e^2* 
c*d^2*ln(1+I*exp(I*(f*x+e)))+2*I/f^4*a*d^3*e^3*arctan(exp(I*(f*x+e)))-3*I/ 
f^2*a*c^2*d*polylog(2,I*exp(I*(f*x+e)))+3*I/f^2*a*c^2*d*polylog(2,-I*exp(I 
*(f*x+e)))+3*I/f^2*a*d^3*polylog(2,-I*exp(I*(f*x+e)))*x^2-3*I/f^2*a*d^3*po 
lylog(2,I*exp(I*(f*x+e)))*x^2+a*d^2*c*x^3+3/2*a*d*c^2*x^2+a*c^3*x+6*I*a*d^ 
3*polylog(4,I*exp(I*(f*x+e)))/f^4-6*I*a*d^3*polylog(4,-I*exp(I*(f*x+e)))/f 
^4+6*I/f^2*a*d^2*c*polylog(2,-I*exp(I*(f*x+e)))*x-6*I/f^2*a*d^2*c*polylog( 
2,I*exp(I*(f*x+e)))*x-6*I/f^3*a*c*d^2*e^2*arctan(exp(I*(f*x+e)))+6*I/f^2*a 
*c^2*d*e*arctan(exp(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. 1085 vs. \(2 (187) = 374\).

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

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

Output:

1/4*(a*d^3*f^4*x^4 + 4*a*c*d^2*f^4*x^3 + 6*a*c^2*d*f^4*x^2 + 4*a*c^3*f^4*x 
 + 12*I*a*d^3*polylog(4, I*cos(f*x + e) + sin(f*x + e)) + 12*I*a*d^3*polyl 
og(4, I*cos(f*x + e) - sin(f*x + e)) - 12*I*a*d^3*polylog(4, -I*cos(f*x + 
e) + sin(f*x + e)) - 12*I*a*d^3*polylog(4, -I*cos(f*x + e) - sin(f*x + e)) 
 - 6*(I*a*d^3*f^2*x^2 + 2*I*a*c*d^2*f^2*x + I*a*c^2*d*f^2)*dilog(I*cos(f*x 
 + e) + sin(f*x + e)) - 6*(I*a*d^3*f^2*x^2 + 2*I*a*c*d^2*f^2*x + I*a*c^2*d 
*f^2)*dilog(I*cos(f*x + e) - sin(f*x + e)) - 6*(-I*a*d^3*f^2*x^2 - 2*I*a*c 
*d^2*f^2*x - I*a*c^2*d*f^2)*dilog(-I*cos(f*x + e) + sin(f*x + e)) - 6*(-I* 
a*d^3*f^2*x^2 - 2*I*a*c*d^2*f^2*x - I*a*c^2*d*f^2)*dilog(-I*cos(f*x + e) - 
 sin(f*x + e)) - 2*(a*d^3*e^3 - 3*a*c*d^2*e^2*f + 3*a*c^2*d*e*f^2 - a*c^3* 
f^3)*log(cos(f*x + e) + I*sin(f*x + e) + I) + 2*(a*d^3*e^3 - 3*a*c*d^2*e^2 
*f + 3*a*c^2*d*e*f^2 - a*c^3*f^3)*log(cos(f*x + e) - I*sin(f*x + e) + I) + 
 2*(a*d^3*f^3*x^3 + 3*a*c*d^2*f^3*x^2 + 3*a*c^2*d*f^3*x + a*d^3*e^3 - 3*a* 
c*d^2*e^2*f + 3*a*c^2*d*e*f^2)*log(I*cos(f*x + e) + sin(f*x + e) + 1) - 2* 
(a*d^3*f^3*x^3 + 3*a*c*d^2*f^3*x^2 + 3*a*c^2*d*f^3*x + a*d^3*e^3 - 3*a*c*d 
^2*e^2*f + 3*a*c^2*d*e*f^2)*log(I*cos(f*x + e) - sin(f*x + e) + 1) + 2*(a* 
d^3*f^3*x^3 + 3*a*c*d^2*f^3*x^2 + 3*a*c^2*d*f^3*x + a*d^3*e^3 - 3*a*c*d^2* 
e^2*f + 3*a*c^2*d*e*f^2)*log(-I*cos(f*x + e) + sin(f*x + e) + 1) - 2*(a*d^ 
3*f^3*x^3 + 3*a*c*d^2*f^3*x^2 + 3*a*c^2*d*f^3*x + a*d^3*e^3 - 3*a*c*d^2*e^ 
2*f + 3*a*c^2*d*e*f^2)*log(-I*cos(f*x + e) - sin(f*x + e) + 1) - 2*(a*d...
 

Sympy [F]

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

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

Output:

a*(Integral(c**3, x) + Integral(c**3*sec(e + f*x), x) + Integral(d**3*x**3 
, x) + Integral(3*c*d**2*x**2, x) + Integral(3*c**2*d*x, x) + Integral(d** 
3*x**3*sec(e + f*x), x) + Integral(3*c*d**2*x**2*sec(e + f*x), x) + Integr 
al(3*c**2*d*x*sec(e + f*x), 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. 936 vs. \(2 (187) = 374\).

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

(a*( - 4*int((tan((e + f*x)/2)**2*x**3)/(tan((e + f*x)/2)**2 - 1),x)*d**3* 
f - 12*int((tan((e + f*x)/2)**2*x**2)/(tan((e + f*x)/2)**2 - 1),x)*c*d**2* 
f - 12*int((tan((e + f*x)/2)**2*x)/(tan((e + f*x)/2)**2 - 1),x)*c**2*d*f - 
 2*log(tan((e + f*x)/2) - 1)*c**3 + 2*log(tan((e + f*x)/2) + 1)*c**3 + 2*c 
**3*f*x + 6*c**2*d*f*x**2 + 4*c*d**2*f*x**3 + d**3*f*x**4))/(2*f)