\(\int \frac {\sec ^5(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^2} \, dx\) [90]

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

Optimal result

Integrand size = 31, antiderivative size = 179 \[ \int \frac {\sec ^5(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^2} \, dx=\frac {(7 A-10 B) \text {arctanh}(\sin (c+d x))}{2 a^2 d}-\frac {4 (2 A-3 B) \tan (c+d x)}{a^2 d}+\frac {(7 A-10 B) \sec (c+d x) \tan (c+d x)}{2 a^2 d}+\frac {(7 A-10 B) \sec ^3(c+d x) \tan (c+d x)}{3 a^2 d (1+\sec (c+d x))}+\frac {(A-B) \sec ^4(c+d x) \tan (c+d x)}{3 d (a+a \sec (c+d x))^2}-\frac {4 (2 A-3 B) \tan ^3(c+d x)}{3 a^2 d} \] Output:

1/2*(7*A-10*B)*arctanh(sin(d*x+c))/a^2/d-4*(2*A-3*B)*tan(d*x+c)/a^2/d+1/2* 
(7*A-10*B)*sec(d*x+c)*tan(d*x+c)/a^2/d+1/3*(7*A-10*B)*sec(d*x+c)^3*tan(d*x 
+c)/a^2/d/(1+sec(d*x+c))+1/3*(A-B)*sec(d*x+c)^4*tan(d*x+c)/d/(a+a*sec(d*x+ 
c))^2-4/3*(2*A-3*B)*tan(d*x+c)^3/a^2/d
 

Mathematica [A] (verified)

Time = 1.02 (sec) , antiderivative size = 155, normalized size of antiderivative = 0.87 \[ \int \frac {\sec ^5(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^2} \, dx=\frac {48 (7 A-10 B) \text {arctanh}(\sin (c+d x)) \cos ^4\left (\frac {1}{2} (c+d x)\right ) \sec ^2(c+d x)-(60 A-104 B+(117 A-190 B) \cos (c+d x)+4 (19 A-30 B) \cos (2 (c+d x))+43 A \cos (3 (c+d x))-66 B \cos (3 (c+d x))+16 A \cos (4 (c+d x))-24 B \cos (4 (c+d x))) \sec ^4(c+d x) \tan (c+d x)}{24 a^2 d (1+\sec (c+d x))^2} \] Input:

Integrate[(Sec[c + d*x]^5*(A + B*Sec[c + d*x]))/(a + a*Sec[c + d*x])^2,x]
 

Output:

(48*(7*A - 10*B)*ArcTanh[Sin[c + d*x]]*Cos[(c + d*x)/2]^4*Sec[c + d*x]^2 - 
 (60*A - 104*B + (117*A - 190*B)*Cos[c + d*x] + 4*(19*A - 30*B)*Cos[2*(c + 
 d*x)] + 43*A*Cos[3*(c + d*x)] - 66*B*Cos[3*(c + d*x)] + 16*A*Cos[4*(c + d 
*x)] - 24*B*Cos[4*(c + d*x)])*Sec[c + d*x]^4*Tan[c + d*x])/(24*a^2*d*(1 + 
Sec[c + d*x])^2)
 

Rubi [A] (verified)

Time = 1.02 (sec) , antiderivative size = 169, normalized size of antiderivative = 0.94, number of steps used = 14, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.419, Rules used = {3042, 4507, 3042, 4507, 27, 3042, 4274, 3042, 4254, 2009, 4255, 3042, 4257}

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 {\sec ^5(c+d x) (A+B \sec (c+d x))}{(a \sec (c+d x)+a)^2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )^5 \left (A+B \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^2}dx\)

\(\Big \downarrow \) 4507

\(\displaystyle \frac {\int \frac {\sec ^4(c+d x) (4 a (A-B)-3 a (A-2 B) \sec (c+d x))}{\sec (c+d x) a+a}dx}{3 a^2}+\frac {(A-B) \tan (c+d x) \sec ^4(c+d x)}{3 d (a \sec (c+d x)+a)^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )^4 \left (4 a (A-B)-3 a (A-2 B) \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\csc \left (c+d x+\frac {\pi }{2}\right ) a+a}dx}{3 a^2}+\frac {(A-B) \tan (c+d x) \sec ^4(c+d x)}{3 d (a \sec (c+d x)+a)^2}\)

\(\Big \downarrow \) 4507

\(\displaystyle \frac {\frac {\int 3 \sec ^3(c+d x) \left (a^2 (7 A-10 B)-4 a^2 (2 A-3 B) \sec (c+d x)\right )dx}{a^2}+\frac {(7 A-10 B) \tan (c+d x) \sec ^3(c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}+\frac {(A-B) \tan (c+d x) \sec ^4(c+d x)}{3 d (a \sec (c+d x)+a)^2}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\frac {3 \int \sec ^3(c+d x) \left (a^2 (7 A-10 B)-4 a^2 (2 A-3 B) \sec (c+d x)\right )dx}{a^2}+\frac {(7 A-10 B) \tan (c+d x) \sec ^3(c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}+\frac {(A-B) \tan (c+d x) \sec ^4(c+d x)}{3 d (a \sec (c+d x)+a)^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {3 \int \csc \left (c+d x+\frac {\pi }{2}\right )^3 \left (a^2 (7 A-10 B)-4 a^2 (2 A-3 B) \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx}{a^2}+\frac {(7 A-10 B) \tan (c+d x) \sec ^3(c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}+\frac {(A-B) \tan (c+d x) \sec ^4(c+d x)}{3 d (a \sec (c+d x)+a)^2}\)

\(\Big \downarrow \) 4274

\(\displaystyle \frac {\frac {3 \left (a^2 (7 A-10 B) \int \sec ^3(c+d x)dx-4 a^2 (2 A-3 B) \int \sec ^4(c+d x)dx\right )}{a^2}+\frac {(7 A-10 B) \tan (c+d x) \sec ^3(c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}+\frac {(A-B) \tan (c+d x) \sec ^4(c+d x)}{3 d (a \sec (c+d x)+a)^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {3 \left (a^2 (7 A-10 B) \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx-4 a^2 (2 A-3 B) \int \csc \left (c+d x+\frac {\pi }{2}\right )^4dx\right )}{a^2}+\frac {(7 A-10 B) \tan (c+d x) \sec ^3(c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}+\frac {(A-B) \tan (c+d x) \sec ^4(c+d x)}{3 d (a \sec (c+d x)+a)^2}\)

\(\Big \downarrow \) 4254

\(\displaystyle \frac {\frac {3 \left (\frac {4 a^2 (2 A-3 B) \int \left (\tan ^2(c+d x)+1\right )d(-\tan (c+d x))}{d}+a^2 (7 A-10 B) \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx\right )}{a^2}+\frac {(7 A-10 B) \tan (c+d x) \sec ^3(c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}+\frac {(A-B) \tan (c+d x) \sec ^4(c+d x)}{3 d (a \sec (c+d x)+a)^2}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\frac {3 \left (a^2 (7 A-10 B) \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx+\frac {4 a^2 (2 A-3 B) \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}\right )}{a^2}+\frac {(7 A-10 B) \tan (c+d x) \sec ^3(c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}+\frac {(A-B) \tan (c+d x) \sec ^4(c+d x)}{3 d (a \sec (c+d x)+a)^2}\)

\(\Big \downarrow \) 4255

\(\displaystyle \frac {\frac {3 \left (a^2 (7 A-10 B) \left (\frac {1}{2} \int \sec (c+d x)dx+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {4 a^2 (2 A-3 B) \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}\right )}{a^2}+\frac {(7 A-10 B) \tan (c+d x) \sec ^3(c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}+\frac {(A-B) \tan (c+d x) \sec ^4(c+d x)}{3 d (a \sec (c+d x)+a)^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {3 \left (a^2 (7 A-10 B) \left (\frac {1}{2} \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {4 a^2 (2 A-3 B) \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}\right )}{a^2}+\frac {(7 A-10 B) \tan (c+d x) \sec ^3(c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}+\frac {(A-B) \tan (c+d x) \sec ^4(c+d x)}{3 d (a \sec (c+d x)+a)^2}\)

\(\Big \downarrow \) 4257

\(\displaystyle \frac {\frac {3 \left (a^2 (7 A-10 B) \left (\frac {\text {arctanh}(\sin (c+d x))}{2 d}+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {4 a^2 (2 A-3 B) \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}\right )}{a^2}+\frac {(7 A-10 B) \tan (c+d x) \sec ^3(c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}+\frac {(A-B) \tan (c+d x) \sec ^4(c+d x)}{3 d (a \sec (c+d x)+a)^2}\)

Input:

Int[(Sec[c + d*x]^5*(A + B*Sec[c + d*x]))/(a + a*Sec[c + d*x])^2,x]
 

Output:

((A - B)*Sec[c + d*x]^4*Tan[c + d*x])/(3*d*(a + a*Sec[c + d*x])^2) + (((7* 
A - 10*B)*Sec[c + d*x]^3*Tan[c + d*x])/(d*(1 + Sec[c + d*x])) + (3*(a^2*(7 
*A - 10*B)*(ArcTanh[Sin[c + d*x]]/(2*d) + (Sec[c + d*x]*Tan[c + d*x])/(2*d 
)) + (4*a^2*(2*A - 3*B)*(-Tan[c + d*x] - Tan[c + d*x]^3/3))/d))/a^2)/(3*a^ 
2)
 

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

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 4254
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1)   Subst[Int[Exp 
andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, 
 d}, x] && IGtQ[n/2, 0]
 

rule 4255
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* 
x]*((b*Csc[c + d*x])^(n - 1)/(d*(n - 1))), x] + Simp[b^2*((n - 2)/(n - 1)) 
  Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] 
&& IntegerQ[2*n]
 

rule 4257
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] 
 /; FreeQ[{c, d}, x]
 

rule 4274
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + 
(a_)), x_Symbol] :> Simp[a   Int[(d*Csc[e + f*x])^n, x], x] + Simp[b/d   In 
t[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]
 

rule 4507
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( 
a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[d*(A*b 
- a*B)*Cot[e + f*x]*(a + b*Csc[e + f*x])^m*((d*Csc[e + f*x])^(n - 1)/(a*f*( 
2*m + 1))), x] - Simp[1/(a*b*(2*m + 1))   Int[(a + b*Csc[e + f*x])^(m + 1)* 
(d*Csc[e + f*x])^(n - 1)*Simp[A*(a*d*(n - 1)) - B*(b*d*(n - 1)) - d*(a*B*(m 
 - n + 1) + A*b*(m + n))*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f, 
A, B}, x] && NeQ[A*b - a*B, 0] && EqQ[a^2 - b^2, 0] && LtQ[m, -2^(-1)] && G 
tQ[n, 0]
 
Maple [A] (verified)

Time = 0.57 (sec) , antiderivative size = 196, normalized size of antiderivative = 1.09

method result size
parallelrisch \(\frac {-126 \left (\frac {\cos \left (3 d x +3 c \right )}{3}+\cos \left (d x +c \right )\right ) \left (A -\frac {10 B}{7}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+126 \left (\frac {\cos \left (3 d x +3 c \right )}{3}+\cos \left (d x +c \right )\right ) \left (A -\frac {10 B}{7}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-16 \sec \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\left (\frac {43 A}{16}-\frac {33 B}{8}\right ) \cos \left (3 d x +3 c \right )+\left (\frac {19 A}{4}-\frac {15 B}{2}\right ) \cos \left (2 d x +2 c \right )+\left (-\frac {3 B}{2}+A \right ) \cos \left (4 d x +4 c \right )+\left (\frac {117 A}{16}-\frac {95 B}{8}\right ) \cos \left (d x +c \right )+\frac {15 A}{4}-\frac {13 B}{2}\right )}{12 d \,a^{2} \left (\cos \left (3 d x +3 c \right )+3 \cos \left (d x +c \right )\right )}\) \(196\)
derivativedivides \(\frac {-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} A}{3}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} B}{3}-7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) A +9 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B +\left (7 A -10 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\frac {-6 B +2 A}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {10 B -5 A}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}-\frac {2 B}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {6 B -2 A}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\left (10 B -7 A \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\frac {10 B -5 A}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}-\frac {2 B}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}}{2 d \,a^{2}}\) \(222\)
default \(\frac {-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} A}{3}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} B}{3}-7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) A +9 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B +\left (7 A -10 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\frac {-6 B +2 A}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {10 B -5 A}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}-\frac {2 B}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {6 B -2 A}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\left (10 B -7 A \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\frac {10 B -5 A}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}-\frac {2 B}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}}{2 d \,a^{2}}\) \(222\)
norman \(\frac {-\frac {\left (A -B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{13}}{6 a d}-\frac {\left (8 A -11 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{3 a d}+\frac {\left (13 A -21 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a d}+\frac {5 \left (25 A -37 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{6 a d}-\frac {2 \left (77 A -115 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{3 a d}-\frac {\left (94 A -143 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 a d}+\frac {\left (349 A -521 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{6 a d}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{5} a}-\frac {\left (7 A -10 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 a^{2} d}+\frac {\left (7 A -10 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 a^{2} d}\) \(254\)
risch \(-\frac {i \left (21 A \,{\mathrm e}^{8 i \left (d x +c \right )}-30 B \,{\mathrm e}^{8 i \left (d x +c \right )}+63 A \,{\mathrm e}^{7 i \left (d x +c \right )}-90 B \,{\mathrm e}^{7 i \left (d x +c \right )}+119 A \,{\mathrm e}^{6 i \left (d x +c \right )}-170 B \,{\mathrm e}^{6 i \left (d x +c \right )}+189 A \,{\mathrm e}^{5 i \left (d x +c \right )}-270 B \,{\mathrm e}^{5 i \left (d x +c \right )}+195 A \,{\mathrm e}^{4 i \left (d x +c \right )}-306 B \,{\mathrm e}^{4 i \left (d x +c \right )}+201 A \,{\mathrm e}^{3 i \left (d x +c \right )}-310 B \,{\mathrm e}^{3 i \left (d x +c \right )}+129 A \,{\mathrm e}^{2 i \left (d x +c \right )}-198 B \,{\mathrm e}^{2 i \left (d x +c \right )}+75 \,{\mathrm e}^{i \left (d x +c \right )} A -114 B \,{\mathrm e}^{i \left (d x +c \right )}+32 A -48 B \right )}{3 a^{2} d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{3} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{3}}+\frac {7 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) A}{2 a^{2} d}-\frac {5 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B}{a^{2} d}-\frac {7 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) A}{2 a^{2} d}+\frac {5 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B}{a^{2} d}\) \(324\)

Input:

int(sec(d*x+c)^5*(A+B*sec(d*x+c))/(a+a*sec(d*x+c))^2,x,method=_RETURNVERBO 
SE)
 

Output:

1/12*(-126*(1/3*cos(3*d*x+3*c)+cos(d*x+c))*(A-10/7*B)*ln(tan(1/2*d*x+1/2*c 
)-1)+126*(1/3*cos(3*d*x+3*c)+cos(d*x+c))*(A-10/7*B)*ln(tan(1/2*d*x+1/2*c)+ 
1)-16*sec(1/2*d*x+1/2*c)^2*tan(1/2*d*x+1/2*c)*((43/16*A-33/8*B)*cos(3*d*x+ 
3*c)+(19/4*A-15/2*B)*cos(2*d*x+2*c)+(-3/2*B+A)*cos(4*d*x+4*c)+(117/16*A-95 
/8*B)*cos(d*x+c)+15/4*A-13/2*B))/d/a^2/(cos(3*d*x+3*c)+3*cos(d*x+c))
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 245, normalized size of antiderivative = 1.37 \[ \int \frac {\sec ^5(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^2} \, dx=\frac {3 \, {\left ({\left (7 \, A - 10 \, B\right )} \cos \left (d x + c\right )^{5} + 2 \, {\left (7 \, A - 10 \, B\right )} \cos \left (d x + c\right )^{4} + {\left (7 \, A - 10 \, B\right )} \cos \left (d x + c\right )^{3}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left ({\left (7 \, A - 10 \, B\right )} \cos \left (d x + c\right )^{5} + 2 \, {\left (7 \, A - 10 \, B\right )} \cos \left (d x + c\right )^{4} + {\left (7 \, A - 10 \, B\right )} \cos \left (d x + c\right )^{3}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (16 \, {\left (2 \, A - 3 \, B\right )} \cos \left (d x + c\right )^{4} + {\left (43 \, A - 66 \, B\right )} \cos \left (d x + c\right )^{3} + 6 \, {\left (A - 2 \, B\right )} \cos \left (d x + c\right )^{2} - {\left (3 \, A - 2 \, B\right )} \cos \left (d x + c\right ) - 2 \, B\right )} \sin \left (d x + c\right )}{12 \, {\left (a^{2} d \cos \left (d x + c\right )^{5} + 2 \, a^{2} d \cos \left (d x + c\right )^{4} + a^{2} d \cos \left (d x + c\right )^{3}\right )}} \] Input:

integrate(sec(d*x+c)^5*(A+B*sec(d*x+c))/(a+a*sec(d*x+c))^2,x, algorithm="f 
ricas")
 

Output:

1/12*(3*((7*A - 10*B)*cos(d*x + c)^5 + 2*(7*A - 10*B)*cos(d*x + c)^4 + (7* 
A - 10*B)*cos(d*x + c)^3)*log(sin(d*x + c) + 1) - 3*((7*A - 10*B)*cos(d*x 
+ c)^5 + 2*(7*A - 10*B)*cos(d*x + c)^4 + (7*A - 10*B)*cos(d*x + c)^3)*log( 
-sin(d*x + c) + 1) - 2*(16*(2*A - 3*B)*cos(d*x + c)^4 + (43*A - 66*B)*cos( 
d*x + c)^3 + 6*(A - 2*B)*cos(d*x + c)^2 - (3*A - 2*B)*cos(d*x + c) - 2*B)* 
sin(d*x + c))/(a^2*d*cos(d*x + c)^5 + 2*a^2*d*cos(d*x + c)^4 + a^2*d*cos(d 
*x + c)^3)
 

Sympy [F]

\[ \int \frac {\sec ^5(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^2} \, dx=\frac {\int \frac {A \sec ^{5}{\left (c + d x \right )}}{\sec ^{2}{\left (c + d x \right )} + 2 \sec {\left (c + d x \right )} + 1}\, dx + \int \frac {B \sec ^{6}{\left (c + d x \right )}}{\sec ^{2}{\left (c + d x \right )} + 2 \sec {\left (c + d x \right )} + 1}\, dx}{a^{2}} \] Input:

integrate(sec(d*x+c)**5*(A+B*sec(d*x+c))/(a+a*sec(d*x+c))**2,x)
 

Output:

(Integral(A*sec(c + d*x)**5/(sec(c + d*x)**2 + 2*sec(c + d*x) + 1), x) + I 
ntegral(B*sec(c + d*x)**6/(sec(c + d*x)**2 + 2*sec(c + d*x) + 1), x))/a**2
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 425 vs. \(2 (169) = 338\).

Time = 0.04 (sec) , antiderivative size = 425, normalized size of antiderivative = 2.37 \[ \int \frac {\sec ^5(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^2} \, dx=\frac {B {\left (\frac {4 \, {\left (\frac {9 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {20 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {15 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}\right )}}{a^{2} - \frac {3 \, a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {3 \, a^{2} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {a^{2} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}}} + \frac {\frac {27 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a^{2}} - \frac {30 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{2}} + \frac {30 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{2}}\right )} - A {\left (\frac {6 \, {\left (\frac {3 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {5 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}\right )}}{a^{2} - \frac {2 \, a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {a^{2} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}} + \frac {\frac {21 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a^{2}} - \frac {21 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{2}} + \frac {21 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{2}}\right )}}{6 \, d} \] Input:

integrate(sec(d*x+c)^5*(A+B*sec(d*x+c))/(a+a*sec(d*x+c))^2,x, algorithm="m 
axima")
 

Output:

1/6*(B*(4*(9*sin(d*x + c)/(cos(d*x + c) + 1) - 20*sin(d*x + c)^3/(cos(d*x 
+ c) + 1)^3 + 15*sin(d*x + c)^5/(cos(d*x + c) + 1)^5)/(a^2 - 3*a^2*sin(d*x 
 + c)^2/(cos(d*x + c) + 1)^2 + 3*a^2*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 - 
 a^2*sin(d*x + c)^6/(cos(d*x + c) + 1)^6) + (27*sin(d*x + c)/(cos(d*x + c) 
 + 1) + sin(d*x + c)^3/(cos(d*x + c) + 1)^3)/a^2 - 30*log(sin(d*x + c)/(co 
s(d*x + c) + 1) + 1)/a^2 + 30*log(sin(d*x + c)/(cos(d*x + c) + 1) - 1)/a^2 
) - A*(6*(3*sin(d*x + c)/(cos(d*x + c) + 1) - 5*sin(d*x + c)^3/(cos(d*x + 
c) + 1)^3)/(a^2 - 2*a^2*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + a^2*sin(d*x 
+ c)^4/(cos(d*x + c) + 1)^4) + (21*sin(d*x + c)/(cos(d*x + c) + 1) + sin(d 
*x + c)^3/(cos(d*x + c) + 1)^3)/a^2 - 21*log(sin(d*x + c)/(cos(d*x + c) + 
1) + 1)/a^2 + 21*log(sin(d*x + c)/(cos(d*x + c) + 1) - 1)/a^2))/d
 

Giac [A] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 226, normalized size of antiderivative = 1.26 \[ \int \frac {\sec ^5(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^2} \, dx=\frac {\frac {3 \, {\left (7 \, A - 10 \, B\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a^{2}} - \frac {3 \, {\left (7 \, A - 10 \, B\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a^{2}} + \frac {2 \, {\left (15 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 30 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 24 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 40 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 9 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 18 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{3} a^{2}} - \frac {A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - B a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 21 \, A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 27 \, B a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{6}}}{6 \, d} \] Input:

integrate(sec(d*x+c)^5*(A+B*sec(d*x+c))/(a+a*sec(d*x+c))^2,x, algorithm="g 
iac")
 

Output:

1/6*(3*(7*A - 10*B)*log(abs(tan(1/2*d*x + 1/2*c) + 1))/a^2 - 3*(7*A - 10*B 
)*log(abs(tan(1/2*d*x + 1/2*c) - 1))/a^2 + 2*(15*A*tan(1/2*d*x + 1/2*c)^5 
- 30*B*tan(1/2*d*x + 1/2*c)^5 - 24*A*tan(1/2*d*x + 1/2*c)^3 + 40*B*tan(1/2 
*d*x + 1/2*c)^3 + 9*A*tan(1/2*d*x + 1/2*c) - 18*B*tan(1/2*d*x + 1/2*c))/(( 
tan(1/2*d*x + 1/2*c)^2 - 1)^3*a^2) - (A*a^4*tan(1/2*d*x + 1/2*c)^3 - B*a^4 
*tan(1/2*d*x + 1/2*c)^3 + 21*A*a^4*tan(1/2*d*x + 1/2*c) - 27*B*a^4*tan(1/2 
*d*x + 1/2*c))/a^6)/d
 

Mupad [B] (verification not implemented)

Time = 11.26 (sec) , antiderivative size = 202, normalized size of antiderivative = 1.13 \[ \int \frac {\sec ^5(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^2} \, dx=\frac {\left (5\,A-10\,B\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (\frac {40\,B}{3}-8\,A\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (3\,A-6\,B\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-3\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+3\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-a^2\right )}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {2\,\left (A-B\right )}{a^2}+\frac {3\,A-5\,B}{2\,a^2}\right )}{d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (A-B\right )}{6\,a^2\,d}+\frac {\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (7\,A-10\,B\right )}{a^2\,d} \] Input:

int((A + B/cos(c + d*x))/(cos(c + d*x)^5*(a + a/cos(c + d*x))^2),x)
 

Output:

(tan(c/2 + (d*x)/2)^5*(5*A - 10*B) - tan(c/2 + (d*x)/2)^3*(8*A - (40*B)/3) 
 + tan(c/2 + (d*x)/2)*(3*A - 6*B))/(d*(3*a^2*tan(c/2 + (d*x)/2)^2 - 3*a^2* 
tan(c/2 + (d*x)/2)^4 + a^2*tan(c/2 + (d*x)/2)^6 - a^2)) - (tan(c/2 + (d*x) 
/2)*((2*(A - B))/a^2 + (3*A - 5*B)/(2*a^2)))/d - (tan(c/2 + (d*x)/2)^3*(A 
- B))/(6*a^2*d) + (atanh(tan(c/2 + (d*x)/2))*(7*A - 10*B))/(a^2*d)
 

Reduce [B] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 557, normalized size of antiderivative = 3.11 \[ \int \frac {\sec ^5(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^2} \, dx =\text {Too large to display} \] Input:

int(sec(d*x+c)^5*(A+B*sec(d*x+c))/(a+a*sec(d*x+c))^2,x)
 

Output:

( - 21*log(tan((c + d*x)/2) - 1)*tan((c + d*x)/2)**6*a + 30*log(tan((c + d 
*x)/2) - 1)*tan((c + d*x)/2)**6*b + 63*log(tan((c + d*x)/2) - 1)*tan((c + 
d*x)/2)**4*a - 90*log(tan((c + d*x)/2) - 1)*tan((c + d*x)/2)**4*b - 63*log 
(tan((c + d*x)/2) - 1)*tan((c + d*x)/2)**2*a + 90*log(tan((c + d*x)/2) - 1 
)*tan((c + d*x)/2)**2*b + 21*log(tan((c + d*x)/2) - 1)*a - 30*log(tan((c + 
 d*x)/2) - 1)*b + 21*log(tan((c + d*x)/2) + 1)*tan((c + d*x)/2)**6*a - 30* 
log(tan((c + d*x)/2) + 1)*tan((c + d*x)/2)**6*b - 63*log(tan((c + d*x)/2) 
+ 1)*tan((c + d*x)/2)**4*a + 90*log(tan((c + d*x)/2) + 1)*tan((c + d*x)/2) 
**4*b + 63*log(tan((c + d*x)/2) + 1)*tan((c + d*x)/2)**2*a - 90*log(tan((c 
 + d*x)/2) + 1)*tan((c + d*x)/2)**2*b - 21*log(tan((c + d*x)/2) + 1)*a + 3 
0*log(tan((c + d*x)/2) + 1)*b - tan((c + d*x)/2)**9*a + tan((c + d*x)/2)** 
9*b - 18*tan((c + d*x)/2)**7*a + 24*tan((c + d*x)/2)**7*b + 90*tan((c + d* 
x)/2)**5*a - 138*tan((c + d*x)/2)**5*b - 110*tan((c + d*x)/2)**3*a + 160*t 
an((c + d*x)/2)**3*b + 39*tan((c + d*x)/2)*a - 63*tan((c + d*x)/2)*b)/(6*a 
**2*d*(tan((c + d*x)/2)**6 - 3*tan((c + d*x)/2)**4 + 3*tan((c + d*x)/2)**2 
 - 1))