\(\int \frac {1}{(a+b \cos (e+f x)) (c+d \sec (e+f x))^3} \, dx\) [15]

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

Optimal result

Integrand size = 25, antiderivative size = 458 \[ \int \frac {1}{(a+b \cos (e+f x)) (c+d \sec (e+f x))^3} \, dx=\frac {2 a^3 \arctan \left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {a+b}}\right )}{\sqrt {a-b} \sqrt {a+b} (a c-b d)^3 f}-\frac {2 d^3 (3 a c-2 b d) \text {arctanh}\left (\frac {\sqrt {c-d} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c+d}}\right )}{c^2 (c-d)^{3/2} (c+d)^{3/2} (a c-b d)^2 f}-\frac {d^3 \left (c^2+2 d^2\right ) \text {arctanh}\left (\frac {\sqrt {c-d} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c+d}}\right )}{c^2 (c-d)^{5/2} (c+d)^{5/2} (a c-b d) f}-\frac {2 d \left (3 a^2 c^2-3 a b c d+b^2 d^2\right ) \text {arctanh}\left (\frac {\sqrt {c-d} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c+d}}\right )}{c^2 \sqrt {c-d} \sqrt {c+d} (a c-b d)^3 f}-\frac {d^3 \sin (e+f x)}{2 c (a c-b d) \left (c^2-d^2\right ) f (d+c \cos (e+f x))^2}+\frac {3 d^4 \sin (e+f x)}{2 c (a c-b d) \left (c^2-d^2\right )^2 f (d+c \cos (e+f x))}+\frac {d^2 (3 a c-2 b d) \sin (e+f x)}{c (a c-b d)^2 \left (c^2-d^2\right ) f (d+c \cos (e+f x))} \] Output:

2*a^3*arctan((a-b)^(1/2)*tan(1/2*f*x+1/2*e)/(a+b)^(1/2))/(a-b)^(1/2)/(a+b) 
^(1/2)/(a*c-b*d)^3/f-2*d^3*(3*a*c-2*b*d)*arctanh((c-d)^(1/2)*tan(1/2*f*x+1 
/2*e)/(c+d)^(1/2))/c^2/(c-d)^(3/2)/(c+d)^(3/2)/(a*c-b*d)^2/f-d^3*(c^2+2*d^ 
2)*arctanh((c-d)^(1/2)*tan(1/2*f*x+1/2*e)/(c+d)^(1/2))/c^2/(c-d)^(5/2)/(c+ 
d)^(5/2)/(a*c-b*d)/f-2*d*(3*a^2*c^2-3*a*b*c*d+b^2*d^2)*arctanh((c-d)^(1/2) 
*tan(1/2*f*x+1/2*e)/(c+d)^(1/2))/c^2/(c-d)^(1/2)/(c+d)^(1/2)/(a*c-b*d)^3/f 
-1/2*d^3*sin(f*x+e)/c/(a*c-b*d)/(c^2-d^2)/f/(d+c*cos(f*x+e))^2+3/2*d^4*sin 
(f*x+e)/c/(a*c-b*d)/(c^2-d^2)^2/f/(d+c*cos(f*x+e))+d^2*(3*a*c-2*b*d)*sin(f 
*x+e)/c/(a*c-b*d)^2/(c^2-d^2)/f/(d+c*cos(f*x+e))
 

Mathematica [A] (verified)

Time = 4.57 (sec) , antiderivative size = 319, normalized size of antiderivative = 0.70 \[ \int \frac {1}{(a+b \cos (e+f x)) (c+d \sec (e+f x))^3} \, dx=\frac {(d+c \cos (e+f x)) \sec ^3(e+f x) \left (-\frac {4 a^3 \text {arctanh}\left (\frac {(a-b) \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {-a^2+b^2}}\right ) (d+c \cos (e+f x))^2}{\sqrt {-a^2+b^2}}+\frac {2 d \left (-6 a b c^3 d+b^2 d^2 \left (2 c^2+d^2\right )+a^2 \left (6 c^4-5 c^2 d^2+2 d^4\right )\right ) \text {arctanh}\left (\frac {(-c+d) \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c^2-d^2}}\right ) (d+c \cos (e+f x))^2}{\left (c^2-d^2\right )^{5/2}}-\frac {d^3 (a c-b d)^2 \sin (e+f x)}{c (c-d) (c+d)}+\frac {d^2 (a c-b d) \left (6 a c^3-4 b c^2 d-3 a c d^2+b d^3\right ) (d+c \cos (e+f x)) \sin (e+f x)}{c (c-d)^2 (c+d)^2}\right )}{2 (a c-b d)^3 f (c+d \sec (e+f x))^3} \] Input:

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

Output:

((d + c*Cos[e + f*x])*Sec[e + f*x]^3*((-4*a^3*ArcTanh[((a - b)*Tan[(e + f* 
x)/2])/Sqrt[-a^2 + b^2]]*(d + c*Cos[e + f*x])^2)/Sqrt[-a^2 + b^2] + (2*d*( 
-6*a*b*c^3*d + b^2*d^2*(2*c^2 + d^2) + a^2*(6*c^4 - 5*c^2*d^2 + 2*d^4))*Ar 
cTanh[((-c + d)*Tan[(e + f*x)/2])/Sqrt[c^2 - d^2]]*(d + c*Cos[e + f*x])^2) 
/(c^2 - d^2)^(5/2) - (d^3*(a*c - b*d)^2*Sin[e + f*x])/(c*(c - d)*(c + d)) 
+ (d^2*(a*c - b*d)*(6*a*c^3 - 4*b*c^2*d - 3*a*c*d^2 + b*d^3)*(d + c*Cos[e 
+ f*x])*Sin[e + f*x])/(c*(c - d)^2*(c + d)^2)))/(2*(a*c - b*d)^3*f*(c + d* 
Sec[e + f*x])^3)
 

Rubi [A] (verified)

Time = 1.22 (sec) , antiderivative size = 458, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3042, 3307, 3042, 3431, 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 {1}{(a+b \cos (e+f x)) (c+d \sec (e+f x))^3} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3307

\(\displaystyle \int \frac {\cos ^3(e+f x)}{(a+b \cos (e+f x)) (c \cos (e+f x)+d)^3}dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3431

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

\(\Big \downarrow \) 2009

\(\displaystyle \frac {2 a^3 \arctan \left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {a+b}}\right )}{f \sqrt {a-b} \sqrt {a+b} (a c-b d)^3}-\frac {2 d \left (3 a^2 c^2-3 a b c d+b^2 d^2\right ) \text {arctanh}\left (\frac {\sqrt {c-d} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c+d}}\right )}{c^2 f \sqrt {c-d} \sqrt {c+d} (a c-b d)^3}-\frac {2 d^3 (3 a c-2 b d) \text {arctanh}\left (\frac {\sqrt {c-d} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c+d}}\right )}{c^2 f (c-d)^{3/2} (c+d)^{3/2} (a c-b d)^2}-\frac {d^3 \left (c^2+2 d^2\right ) \text {arctanh}\left (\frac {\sqrt {c-d} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c+d}}\right )}{c^2 f (c-d)^{5/2} (c+d)^{5/2} (a c-b d)}+\frac {d^2 (3 a c-2 b d) \sin (e+f x)}{c f \left (c^2-d^2\right ) (a c-b d)^2 (c \cos (e+f x)+d)}+\frac {3 d^4 \sin (e+f x)}{2 c f \left (c^2-d^2\right )^2 (a c-b d) (c \cos (e+f x)+d)}-\frac {d^3 \sin (e+f x)}{2 c f \left (c^2-d^2\right ) (a c-b d) (c \cos (e+f x)+d)^2}\)

Input:

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

Output:

(2*a^3*ArcTan[(Sqrt[a - b]*Tan[(e + f*x)/2])/Sqrt[a + b]])/(Sqrt[a - b]*Sq 
rt[a + b]*(a*c - b*d)^3*f) - (2*d^3*(3*a*c - 2*b*d)*ArcTanh[(Sqrt[c - d]*T 
an[(e + f*x)/2])/Sqrt[c + d]])/(c^2*(c - d)^(3/2)*(c + d)^(3/2)*(a*c - b*d 
)^2*f) - (d^3*(c^2 + 2*d^2)*ArcTanh[(Sqrt[c - d]*Tan[(e + f*x)/2])/Sqrt[c 
+ d]])/(c^2*(c - d)^(5/2)*(c + d)^(5/2)*(a*c - b*d)*f) - (2*d*(3*a^2*c^2 - 
 3*a*b*c*d + b^2*d^2)*ArcTanh[(Sqrt[c - d]*Tan[(e + f*x)/2])/Sqrt[c + d]]) 
/(c^2*Sqrt[c - d]*Sqrt[c + d]*(a*c - b*d)^3*f) - (d^3*Sin[e + f*x])/(2*c*( 
a*c - b*d)*(c^2 - d^2)*f*(d + c*Cos[e + f*x])^2) + (3*d^4*Sin[e + f*x])/(2 
*c*(a*c - b*d)*(c^2 - d^2)^2*f*(d + c*Cos[e + f*x])) + (d^2*(3*a*c - 2*b*d 
)*Sin[e + f*x])/(c*(a*c - b*d)^2*(c^2 - d^2)*f*(d + c*Cos[e + f*x]))
 

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

rule 3431
Int[((g_.)*sin[(e_.) + (f_.)*(x_)])^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x 
_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Int[Exp 
andTrig[(g*sin[e + f*x])^p*(a + b*sin[e + f*x])^m*(c + d*sin[e + f*x])^n, x 
], x] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && NeQ[b*c - a*d, 0] && (Int 
egersQ[m, n] || IntegersQ[m, p] || IntegersQ[n, p]) && NeQ[p, 2]
 
Maple [A] (verified)

Time = 4.63 (sec) , antiderivative size = 412, normalized size of antiderivative = 0.90

method result size
derivativedivides \(\frac {\frac {2 a^{3} \arctan \left (\frac {\left (a -b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{\left (a c -b d \right )^{3} \sqrt {\left (a -b \right ) \left (a +b \right )}}+\frac {2 d \left (\frac {-\frac {\left (6 a^{2} c^{3}+a^{2} c^{2} d -2 a^{2} c \,d^{2}-10 a b \,c^{2} d -2 a b c \,d^{2}+2 a b \,d^{3}+4 b^{2} c \,d^{2}+b^{2} d^{3}\right ) d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{2 \left (c -d \right ) \left (c^{2}+2 c d +d^{2}\right )}+\frac {d \left (6 a^{2} c^{3}-a^{2} c^{2} d -2 a^{2} c \,d^{2}-10 a b \,c^{2} d +2 a b c \,d^{2}+2 a b \,d^{3}+4 b^{2} c \,d^{2}-b^{2} d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 \left (c +d \right ) \left (c -d \right )^{2}}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} c -\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} d -c -d \right )^{2}}-\frac {\left (6 a^{2} c^{4}-5 a^{2} c^{2} d^{2}+2 a^{2} d^{4}-6 a b \,c^{3} d +2 b^{2} c^{2} d^{2}+b^{2} d^{4}\right ) \operatorname {arctanh}\left (\frac {\left (c -d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{2 \left (c^{4}-2 c^{2} d^{2}+d^{4}\right ) \sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{\left (a c -b d \right )^{3}}}{f}\) \(412\)
default \(\frac {\frac {2 a^{3} \arctan \left (\frac {\left (a -b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{\left (a c -b d \right )^{3} \sqrt {\left (a -b \right ) \left (a +b \right )}}+\frac {2 d \left (\frac {-\frac {\left (6 a^{2} c^{3}+a^{2} c^{2} d -2 a^{2} c \,d^{2}-10 a b \,c^{2} d -2 a b c \,d^{2}+2 a b \,d^{3}+4 b^{2} c \,d^{2}+b^{2} d^{3}\right ) d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{2 \left (c -d \right ) \left (c^{2}+2 c d +d^{2}\right )}+\frac {d \left (6 a^{2} c^{3}-a^{2} c^{2} d -2 a^{2} c \,d^{2}-10 a b \,c^{2} d +2 a b c \,d^{2}+2 a b \,d^{3}+4 b^{2} c \,d^{2}-b^{2} d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 \left (c +d \right ) \left (c -d \right )^{2}}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} c -\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} d -c -d \right )^{2}}-\frac {\left (6 a^{2} c^{4}-5 a^{2} c^{2} d^{2}+2 a^{2} d^{4}-6 a b \,c^{3} d +2 b^{2} c^{2} d^{2}+b^{2} d^{4}\right ) \operatorname {arctanh}\left (\frac {\left (c -d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{2 \left (c^{4}-2 c^{2} d^{2}+d^{4}\right ) \sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{\left (a c -b d \right )^{3}}}{f}\) \(412\)
risch \(\text {Expression too large to display}\) \(1670\)

Input:

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

Output:

1/f*(2*a^3/(a*c-b*d)^3/((a-b)*(a+b))^(1/2)*arctan((a-b)*tan(1/2*f*x+1/2*e) 
/((a-b)*(a+b))^(1/2))+2*d/(a*c-b*d)^3*((-1/2*(6*a^2*c^3+a^2*c^2*d-2*a^2*c* 
d^2-10*a*b*c^2*d-2*a*b*c*d^2+2*a*b*d^3+4*b^2*c*d^2+b^2*d^3)*d/(c-d)/(c^2+2 
*c*d+d^2)*tan(1/2*f*x+1/2*e)^3+1/2*d*(6*a^2*c^3-a^2*c^2*d-2*a^2*c*d^2-10*a 
*b*c^2*d+2*a*b*c*d^2+2*a*b*d^3+4*b^2*c*d^2-b^2*d^3)/(c+d)/(c-d)^2*tan(1/2* 
f*x+1/2*e))/(tan(1/2*f*x+1/2*e)^2*c-tan(1/2*f*x+1/2*e)^2*d-c-d)^2-1/2*(6*a 
^2*c^4-5*a^2*c^2*d^2+2*a^2*d^4-6*a*b*c^3*d+2*b^2*c^2*d^2+b^2*d^4)/(c^4-2*c 
^2*d^2+d^4)/((c+d)*(c-d))^(1/2)*arctanh((c-d)*tan(1/2*f*x+1/2*e)/((c+d)*(c 
-d))^(1/2))))
 

Fricas [F(-1)]

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

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

Output:

Timed out
 

Sympy [F]

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

integrate(1/(a+b*cos(f*x+e))/(c+d*sec(f*x+e))**3,x)
 

Output:

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

Maxima [F(-2)]

Exception generated. \[ \int \frac {1}{(a+b \cos (e+f x)) (c+d \sec (e+f x))^3} \, dx=\text {Exception raised: ValueError} \] Input:

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

Output:

Exception raised: ValueError >> Computation failed since Maxima requested 
additional constraints; using the 'assume' command before evaluation *may* 
 help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?` f 
or more de
 

Giac [A] (verification not implemented)

Time = 0.30 (sec) , antiderivative size = 748, normalized size of antiderivative = 1.63 \[ \int \frac {1}{(a+b \cos (e+f x)) (c+d \sec (e+f x))^3} \, dx =\text {Too large to display} \] Input:

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

Output:

(2*(pi*floor(1/2*(f*x + e)/pi + 1/2)*sgn(2*a - 2*b) + arctan((a*tan(1/2*f* 
x + 1/2*e) - b*tan(1/2*f*x + 1/2*e))/sqrt(a^2 - b^2)))*a^3/((a^3*c^3 - 3*a 
^2*b*c^2*d + 3*a*b^2*c*d^2 - b^3*d^3)*sqrt(a^2 - b^2)) + (6*a^2*c^4*d - 6* 
a*b*c^3*d^2 - 5*a^2*c^2*d^3 + 2*b^2*c^2*d^3 + 2*a^2*d^5 + b^2*d^5)*(pi*flo 
or(1/2*(f*x + e)/pi + 1/2)*sgn(2*c - 2*d) + arctan((c*tan(1/2*f*x + 1/2*e) 
 - d*tan(1/2*f*x + 1/2*e))/sqrt(-c^2 + d^2)))/((a^3*c^7 - 3*a^2*b*c^6*d - 
2*a^3*c^5*d^2 + 3*a*b^2*c^5*d^2 + 6*a^2*b*c^4*d^3 - b^3*c^4*d^3 + a^3*c^3* 
d^4 - 6*a*b^2*c^3*d^4 - 3*a^2*b*c^2*d^5 + 2*b^3*c^2*d^5 + 3*a*b^2*c*d^6 - 
b^3*d^7)*sqrt(-c^2 + d^2)) - (6*a*c^3*d^2*tan(1/2*f*x + 1/2*e)^3 - 5*a*c^2 
*d^3*tan(1/2*f*x + 1/2*e)^3 - 4*b*c^2*d^3*tan(1/2*f*x + 1/2*e)^3 - 3*a*c*d 
^4*tan(1/2*f*x + 1/2*e)^3 + 3*b*c*d^4*tan(1/2*f*x + 1/2*e)^3 + 2*a*d^5*tan 
(1/2*f*x + 1/2*e)^3 + b*d^5*tan(1/2*f*x + 1/2*e)^3 - 6*a*c^3*d^2*tan(1/2*f 
*x + 1/2*e) - 5*a*c^2*d^3*tan(1/2*f*x + 1/2*e) + 4*b*c^2*d^3*tan(1/2*f*x + 
 1/2*e) + 3*a*c*d^4*tan(1/2*f*x + 1/2*e) + 3*b*c*d^4*tan(1/2*f*x + 1/2*e) 
+ 2*a*d^5*tan(1/2*f*x + 1/2*e) - b*d^5*tan(1/2*f*x + 1/2*e))/((a^2*c^6 - 2 
*a*b*c^5*d - 2*a^2*c^4*d^2 + b^2*c^4*d^2 + 4*a*b*c^3*d^3 + a^2*c^2*d^4 - 2 
*b^2*c^2*d^4 - 2*a*b*c*d^5 + b^2*d^6)*(c*tan(1/2*f*x + 1/2*e)^2 - d*tan(1/ 
2*f*x + 1/2*e)^2 - c - d)^2))/f
 

Mupad [B] (verification not implemented)

Time = 11.95 (sec) , antiderivative size = 52103, normalized size of antiderivative = 113.76 \[ \int \frac {1}{(a+b \cos (e+f x)) (c+d \sec (e+f x))^3} \, dx=\text {Too large to display} \] Input:

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

Output:

((tan(e/2 + (f*x)/2)^3*(2*a*d^4 + b*d^4 - 6*a*c^2*d^2 - a*c*d^3 + 4*b*c*d^ 
3))/((c + d)^2*(a^2*c^3 - b^2*d^3 - a^2*c^2*d + b^2*c*d^2 + 2*a*b*c*d^2 - 
2*a*b*c^2*d)) - (tan(e/2 + (f*x)/2)*(2*a*d^4 - b*d^4 - 6*a*c^2*d^2 + a*c*d 
^3 + 4*b*c*d^3))/((c + d)*(a^2*c^4 + b^2*d^4 - 2*a^2*c^3*d - 2*b^2*c*d^3 + 
 a^2*c^2*d^2 + b^2*c^2*d^2 - 2*a*b*c*d^3 - 2*a*b*c^3*d + 4*a*b*c^2*d^2)))/ 
(f*(2*c*d - tan(e/2 + (f*x)/2)^2*(2*c^2 - 2*d^2) + tan(e/2 + (f*x)/2)^4*(c 
^2 - 2*c*d + d^2) + c^2 + d^2)) + (a^3*atan(((a^3*(b^2 - a^2)^(1/2)*((8*ta 
n(e/2 + (f*x)/2)*(b^7*d^10 - 8*a^7*d^10 - 4*a^7*c^10 + 4*a^6*b*c^10 - 3*a* 
b^6*d^10 + 16*a^6*b*d^10 + 8*a^7*c*d^9 + 8*a^7*c^9*d + 7*a^2*b^5*d^10 - 13 
*a^3*b^4*d^10 + 16*a^4*b^3*d^10 - 16*a^5*b^2*d^10 + 32*a^7*c^2*d^8 - 32*a^ 
7*c^3*d^7 - 57*a^7*c^4*d^6 + 48*a^7*c^5*d^5 + 52*a^7*c^6*d^4 - 32*a^7*c^7* 
d^3 - 24*a^7*c^8*d^2 + 4*b^7*c^2*d^8 + 4*b^7*c^4*d^6 - 12*a*b^6*c^2*d^8 - 
12*a*b^6*c^3*d^7 - 12*a*b^6*c^4*d^6 - 24*a*b^6*c^5*d^5 - 72*a^6*b*c^2*d^8 
+ 56*a^6*b*c^3*d^7 + 155*a^6*b*c^4*d^6 - 108*a^6*b*c^5*d^5 - 172*a^6*b*c^6 
*d^4 + 104*a^6*b*c^7*d^3 + 96*a^6*b*c^8*d^2 + 10*a^2*b^5*c^2*d^8 + 36*a^2* 
b^5*c^3*d^7 + 4*a^2*b^5*c^4*d^6 + 72*a^2*b^5*c^5*d^5 + 60*a^2*b^5*c^6*d^4 
+ 2*a^3*b^4*c^2*d^8 - 60*a^3*b^4*c^3*d^7 + 20*a^3*b^4*c^4*d^6 - 12*a^3*b^4 
*c^5*d^5 - 180*a^3*b^4*c^6*d^4 - 72*a^3*b^4*c^7*d^3 - 26*a^4*b^3*c^2*d^8 + 
 84*a^4*b^3*c^3*d^7 + 25*a^4*b^3*c^4*d^6 - 156*a^4*b^3*c^5*d^5 + 120*a^4*b 
^3*c^6*d^4 + 216*a^4*b^3*c^7*d^3 + 36*a^4*b^3*c^8*d^2 + 62*a^5*b^2*c^2*...
 

Reduce [B] (verification not implemented)

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

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

Output:

(8*sqrt(a**2 - b**2)*atan((tan((e + f*x)/2)*a - tan((e + f*x)/2)*b)/sqrt(a 
**2 - b**2))*cos(e + f*x)*a**3*c**7*d - 24*sqrt(a**2 - b**2)*atan((tan((e 
+ f*x)/2)*a - tan((e + f*x)/2)*b)/sqrt(a**2 - b**2))*cos(e + f*x)*a**3*c** 
5*d**3 + 24*sqrt(a**2 - b**2)*atan((tan((e + f*x)/2)*a - tan((e + f*x)/2)* 
b)/sqrt(a**2 - b**2))*cos(e + f*x)*a**3*c**3*d**5 - 8*sqrt(a**2 - b**2)*at 
an((tan((e + f*x)/2)*a - tan((e + f*x)/2)*b)/sqrt(a**2 - b**2))*cos(e + f* 
x)*a**3*c*d**7 - 4*sqrt(a**2 - b**2)*atan((tan((e + f*x)/2)*a - tan((e + f 
*x)/2)*b)/sqrt(a**2 - b**2))*sin(e + f*x)**2*a**3*c**8 + 12*sqrt(a**2 - b* 
*2)*atan((tan((e + f*x)/2)*a - tan((e + f*x)/2)*b)/sqrt(a**2 - b**2))*sin( 
e + f*x)**2*a**3*c**6*d**2 - 12*sqrt(a**2 - b**2)*atan((tan((e + f*x)/2)*a 
 - tan((e + f*x)/2)*b)/sqrt(a**2 - b**2))*sin(e + f*x)**2*a**3*c**4*d**4 + 
 4*sqrt(a**2 - b**2)*atan((tan((e + f*x)/2)*a - tan((e + f*x)/2)*b)/sqrt(a 
**2 - b**2))*sin(e + f*x)**2*a**3*c**2*d**6 + 4*sqrt(a**2 - b**2)*atan((ta 
n((e + f*x)/2)*a - tan((e + f*x)/2)*b)/sqrt(a**2 - b**2))*a**3*c**8 - 8*sq 
rt(a**2 - b**2)*atan((tan((e + f*x)/2)*a - tan((e + f*x)/2)*b)/sqrt(a**2 - 
 b**2))*a**3*c**6*d**2 + 8*sqrt(a**2 - b**2)*atan((tan((e + f*x)/2)*a - ta 
n((e + f*x)/2)*b)/sqrt(a**2 - b**2))*a**3*c**2*d**6 - 4*sqrt(a**2 - b**2)* 
atan((tan((e + f*x)/2)*a - tan((e + f*x)/2)*b)/sqrt(a**2 - b**2))*a**3*d** 
8 - 24*sqrt( - c**2 + d**2)*atan((tan((e + f*x)/2)*c - tan((e + f*x)/2)*d) 
/sqrt( - c**2 + d**2))*cos(e + f*x)*a**4*c**5*d**2 + 20*sqrt( - c**2 + ...