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

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [F]
Maxima [A] (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 = 102 \[ \int \frac {\sec ^2(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^3} \, dx=-\frac {(A-B) \tan (c+d x)}{5 d (a+a \sec (c+d x))^3}+\frac {(3 A-8 B) \tan (c+d x)}{15 a d (a+a \sec (c+d x))^2}+\frac {(3 A+7 B) \tan (c+d x)}{15 d \left (a^3+a^3 \sec (c+d x)\right )} \] Output:

-1/5*(A-B)*tan(d*x+c)/d/(a+a*sec(d*x+c))^3+1/15*(3*A-8*B)*tan(d*x+c)/a/d/( 
a+a*sec(d*x+c))^2+1/15*(3*A+7*B)*tan(d*x+c)/d/(a^3+a^3*sec(d*x+c))
 

Mathematica [A] (verified)

Time = 1.13 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.62 \[ \int \frac {\sec ^2(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^3} \, dx=\frac {\left (3 A+7 B+(9 A+6 B) \cos (c+d x)+(3 A+2 B) \cos ^2(c+d x)\right ) \sin (c+d x)}{15 a^3 d (1+\cos (c+d x))^3} \] Input:

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

Output:

((3*A + 7*B + (9*A + 6*B)*Cos[c + d*x] + (3*A + 2*B)*Cos[c + d*x]^2)*Sin[c 
 + d*x])/(15*a^3*d*(1 + Cos[c + d*x])^3)
 

Rubi [A] (verified)

Time = 0.58 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.02, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.226, Rules used = {3042, 4496, 25, 3042, 4488, 3042, 4281}

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

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )^2 \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 )^3}dx\)

\(\Big \downarrow \) 4496

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4488

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 4281

\(\displaystyle \frac {\frac {(3 A+7 B) \tan (c+d x)}{3 d (a \sec (c+d x)+a)}+\frac {a (3 A-8 B) \tan (c+d x)}{3 d (a \sec (c+d x)+a)^2}}{5 a^2}-\frac {(A-B) \tan (c+d x)}{5 d (a \sec (c+d x)+a)^3}\)

Input:

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

Output:

-1/5*((A - B)*Tan[c + d*x])/(d*(a + a*Sec[c + d*x])^3) + ((a*(3*A - 8*B)*T 
an[c + d*x])/(3*d*(a + a*Sec[c + d*x])^2) + ((3*A + 7*B)*Tan[c + d*x])/(3* 
d*(a + a*Sec[c + d*x])))/(5*a^2)
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4281
Int[csc[(e_.) + (f_.)*(x_)]/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbo 
l] :> Simp[-Cot[e + f*x]/(f*(b + a*Csc[e + f*x])), x] /; FreeQ[{a, b, e, f} 
, x] && EqQ[a^2 - b^2, 0]
 

rule 4488
Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(cs 
c[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[(A*b - a*B)*Cot[e + 
f*x]*((a + b*Csc[e + f*x])^m/(a*f*(2*m + 1))), x] + Simp[(a*B*m + A*b*(m + 
1))/(a*b*(2*m + 1))   Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^(m + 1), x], x] 
 /; FreeQ[{a, b, A, B, e, f}, x] && NeQ[A*b - a*B, 0] && EqQ[a^2 - b^2, 0] 
&& NeQ[a*B*m + A*b*(m + 1), 0] && LtQ[m, -2^(-1)]
 

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

Time = 0.21 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.55

method result size
parallelrisch \(-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\left (A -B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-\frac {10 B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{3}-5 A -5 B \right )}{20 a^{3} d}\) \(56\)
derivativedivides \(\frac {\frac {\left (-A +B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{5}+\frac {2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} B}{3}+\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) A +\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B}{4 d \,a^{3}}\) \(64\)
default \(\frac {\frac {\left (-A +B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{5}+\frac {2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} B}{3}+\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) A +\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B}{4 d \,a^{3}}\) \(64\)
risch \(\frac {2 i \left (15 A \,{\mathrm e}^{3 i \left (d x +c \right )}+15 A \,{\mathrm e}^{2 i \left (d x +c \right )}+20 B \,{\mathrm e}^{2 i \left (d x +c \right )}+15 \,{\mathrm e}^{i \left (d x +c \right )} A +10 B \,{\mathrm e}^{i \left (d x +c \right )}+3 A +2 B \right )}{15 d \,a^{3} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{5}}\) \(90\)
norman \(\frac {-\frac {\left (A -B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{20 a d}+\frac {\left (A +B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 a d}-\frac {\left (3 A +2 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{6 a d}+\frac {\left (3 A +2 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{30 a d}+\frac {\left (6 A -B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{30 a d}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{2} a^{2}}\) \(143\)

Input:

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

Output:

-1/20*tan(1/2*d*x+1/2*c)*((A-B)*tan(1/2*d*x+1/2*c)^4-10/3*B*tan(1/2*d*x+1/ 
2*c)^2-5*A-5*B)/a^3/d
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 93, normalized size of antiderivative = 0.91 \[ \int \frac {\sec ^2(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^3} \, dx=\frac {{\left ({\left (3 \, A + 2 \, B\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left (3 \, A + 2 \, B\right )} \cos \left (d x + c\right ) + 3 \, A + 7 \, B\right )} \sin \left (d x + c\right )}{15 \, {\left (a^{3} d \cos \left (d x + c\right )^{3} + 3 \, a^{3} d \cos \left (d x + c\right )^{2} + 3 \, a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )}} \] Input:

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

Output:

1/15*((3*A + 2*B)*cos(d*x + c)^2 + 3*(3*A + 2*B)*cos(d*x + c) + 3*A + 7*B) 
*sin(d*x + c)/(a^3*d*cos(d*x + c)^3 + 3*a^3*d*cos(d*x + c)^2 + 3*a^3*d*cos 
(d*x + c) + a^3*d)
 

Sympy [F]

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

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

Output:

(Integral(A*sec(c + d*x)**2/(sec(c + d*x)**3 + 3*sec(c + d*x)**2 + 3*sec(c 
 + d*x) + 1), x) + Integral(B*sec(c + d*x)**3/(sec(c + d*x)**3 + 3*sec(c + 
 d*x)**2 + 3*sec(c + d*x) + 1), x))/a**3
 

Maxima [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.13 \[ \int \frac {\sec ^2(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^3} \, dx=\frac {\frac {B {\left (\frac {15 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {10 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}\right )}}{a^{3}} + \frac {3 \, A {\left (\frac {5 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {\sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}\right )}}{a^{3}}}{60 \, d} \] Input:

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

Output:

1/60*(B*(15*sin(d*x + c)/(cos(d*x + c) + 1) + 10*sin(d*x + c)^3/(cos(d*x + 
 c) + 1)^3 + 3*sin(d*x + c)^5/(cos(d*x + c) + 1)^5)/a^3 + 3*A*(5*sin(d*x + 
 c)/(cos(d*x + c) + 1) - sin(d*x + c)^5/(cos(d*x + c) + 1)^5)/a^3)/d
 

Giac [A] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.74 \[ \int \frac {\sec ^2(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^3} \, dx=-\frac {3 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 10 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 15 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 15 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{60 \, a^{3} d} \] Input:

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

Output:

-1/60*(3*A*tan(1/2*d*x + 1/2*c)^5 - 3*B*tan(1/2*d*x + 1/2*c)^5 - 10*B*tan( 
1/2*d*x + 1/2*c)^3 - 15*A*tan(1/2*d*x + 1/2*c) - 15*B*tan(1/2*d*x + 1/2*c) 
)/(a^3*d)
 

Mupad [B] (verification not implemented)

Time = 11.33 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.65 \[ \int \frac {\sec ^2(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^3} \, dx=\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (15\,A+15\,B-3\,A\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+10\,B\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+3\,B\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\right )}{60\,a^3\,d} \] Input:

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

Output:

(tan(c/2 + (d*x)/2)*(15*A + 15*B - 3*A*tan(c/2 + (d*x)/2)^4 + 10*B*tan(c/2 
 + (d*x)/2)^2 + 3*B*tan(c/2 + (d*x)/2)^4))/(60*a^3*d)
 

Reduce [B] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.65 \[ \int \frac {\sec ^2(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^3} \, dx=\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (-3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} a +3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} b +10 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b +15 a +15 b \right )}{60 a^{3} d} \] Input:

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

Output:

(tan((c + d*x)/2)*( - 3*tan((c + d*x)/2)**4*a + 3*tan((c + d*x)/2)**4*b + 
10*tan((c + d*x)/2)**2*b + 15*a + 15*b))/(60*a**3*d)