\(\int \sec ^3(c+d x) (a+b \sin (c+d x)) (A+B \sin (c+d x)) \, dx\) [1529]

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 = 29, antiderivative size = 75 \[ \int \sec ^3(c+d x) (a+b \sin (c+d x)) (A+B \sin (c+d x)) \, dx=\frac {(a A-b B) \text {arctanh}(\sin (c+d x))}{2 d}+\frac {(a+b) (A+B)}{4 d (1-\sin (c+d x))}-\frac {(a-b) (A-B)}{4 d (1+\sin (c+d x))} \] Output:

1/2*(A*a-B*b)*arctanh(sin(d*x+c))/d+1/4*(a+b)*(A+B)/d/(1-sin(d*x+c))-1/4*( 
a-b)*(A-B)/d/(1+sin(d*x+c))
 

Mathematica [A] (verified)

Time = 0.24 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.72 \[ \int \sec ^3(c+d x) (a+b \sin (c+d x)) (A+B \sin (c+d x)) \, dx=\frac {(a A-b B) \text {arctanh}(\sin (c+d x))+\sec ^2(c+d x) (A b+a B+(a A+b B) \sin (c+d x))}{2 d} \] Input:

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

Output:

((a*A - b*B)*ArcTanh[Sin[c + d*x]] + Sec[c + d*x]^2*(A*b + a*B + (a*A + b* 
B)*Sin[c + d*x]))/(2*d)
 

Rubi [A] (verified)

Time = 0.34 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.13, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {3042, 3316, 27, 663, 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 \sec ^3(c+d x) (a+b \sin (c+d x)) (A+B \sin (c+d x)) \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {(a+b \sin (c+d x)) (A+B \sin (c+d x))}{\cos (c+d x)^3}dx\)

\(\Big \downarrow \) 3316

\(\displaystyle \frac {b^3 \int \frac {(a+b \sin (c+d x)) (A b+B \sin (c+d x) b)}{b \left (b^2-b^2 \sin ^2(c+d x)\right )^2}d(b \sin (c+d x))}{d}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {b^2 \int \frac {(a+b \sin (c+d x)) (A b+B \sin (c+d x) b)}{\left (b^2-b^2 \sin ^2(c+d x)\right )^2}d(b \sin (c+d x))}{d}\)

\(\Big \downarrow \) 663

\(\displaystyle \frac {b^2 \int \left (\frac {(a-b) (A-B)}{4 b (\sin (c+d x) b+b)^2}+\frac {a A-b B}{2 b \left (b^2-b^2 \sin ^2(c+d x)\right )}+\frac {(a+b) (A+B)}{4 b (b-b \sin (c+d x))^2}\right )d(b \sin (c+d x))}{d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {b^2 \left (\frac {(a A-b B) \text {arctanh}(\sin (c+d x))}{2 b^2}-\frac {(a-b) (A-B)}{4 b (b \sin (c+d x)+b)}+\frac {(a+b) (A+B)}{4 b (b-b \sin (c+d x))}\right )}{d}\)

Input:

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

Output:

(b^2*(((a*A - b*B)*ArcTanh[Sin[c + d*x]])/(2*b^2) + ((a + b)*(A + B))/(4*b 
*(b - b*Sin[c + d*x])) - ((a - b)*(A - B))/(4*b*(b + b*Sin[c + d*x]))))/d
 

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 663
Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))^(n_.)*((a_) + (c_.)*(x_ 
)^2)^(p_.), x_Symbol] :> With[{q = Rt[(-a)*c, 2]}, Simp[1/c^p   Int[ExpandI 
ntegrand[(d + e*x)^m*(f + g*x)^n*(-q + c*x)^p*(q + c*x)^p, x], x], x] /;  ! 
FractionalPowerFactorQ[q]] /; FreeQ[{a, c, d, e, f, g}, x] && ILtQ[p, -1] & 
& IntegersQ[m, n] && NiceSqrtQ[(-a)*c]
 

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 3316
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_ 
.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Simp[1/(b^p* 
f)   Subst[Int[(a + x)^m*(c + (d/b)*x)^n*(b^2 - x^2)^((p - 1)/2), x], x, b* 
Sin[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IntegerQ[(p - 1) 
/2] && NeQ[a^2 - b^2, 0]
 
Maple [A] (verified)

Time = 1.37 (sec) , antiderivative size = 110, normalized size of antiderivative = 1.47

method result size
derivativedivides \(\frac {a A \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+\frac {B a}{2 \cos \left (d x +c \right )^{2}}+\frac {A b}{2 \cos \left (d x +c \right )^{2}}+B b \left (\frac {\sin \left (d x +c \right )^{3}}{2 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )}{2}-\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) \(110\)
default \(\frac {a A \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+\frac {B a}{2 \cos \left (d x +c \right )^{2}}+\frac {A b}{2 \cos \left (d x +c \right )^{2}}+B b \left (\frac {\sin \left (d x +c \right )^{3}}{2 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )}{2}-\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) \(110\)
parallelrisch \(\frac {-\left (1+\cos \left (2 d x +2 c \right )\right ) \left (a A -B b \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+\left (1+\cos \left (2 d x +2 c \right )\right ) \left (a A -B b \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+\left (-A b -B a \right ) \cos \left (2 d x +2 c \right )+\left (2 a A +2 B b \right ) \sin \left (d x +c \right )+A b +B a}{2 d \left (1+\cos \left (2 d x +2 c \right )\right )}\) \(126\)
risch \(-\frac {i {\mathrm e}^{i \left (d x +c \right )} \left (A a \,{\mathrm e}^{2 i \left (d x +c \right )}+B b \,{\mathrm e}^{2 i \left (d x +c \right )}-a A +2 i A b \,{\mathrm e}^{i \left (d x +c \right )}-B b +2 i B a \,{\mathrm e}^{i \left (d x +c \right )}\right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a A}{2 d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B b}{2 d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) a A}{2 d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B b}{2 d}\) \(177\)
norman \(\frac {\frac {\left (a A +B b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {\left (a A +B b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{d}+\frac {2 \left (A b +B a \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{d}+\frac {2 \left (A b +B a \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{d}+\frac {3 \left (a A +B b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{d}+\frac {3 \left (a A +B b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{d}+\frac {2 \left (2 A b +2 B a \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{d}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{2} \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2}}-\frac {\left (a A -B b \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 d}+\frac {\left (a A -B b \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 d}\) \(243\)

Input:

int(sec(d*x+c)^3*(a+b*sin(d*x+c))*(A+B*sin(d*x+c)),x,method=_RETURNVERBOSE 
)
 

Output:

1/d*(a*A*(1/2*sec(d*x+c)*tan(d*x+c)+1/2*ln(sec(d*x+c)+tan(d*x+c)))+1/2*B*a 
/cos(d*x+c)^2+1/2*A*b/cos(d*x+c)^2+B*b*(1/2*sin(d*x+c)^3/cos(d*x+c)^2+1/2* 
sin(d*x+c)-1/2*ln(sec(d*x+c)+tan(d*x+c))))
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.23 \[ \int \sec ^3(c+d x) (a+b \sin (c+d x)) (A+B \sin (c+d x)) \, dx=\frac {{\left (A a - B b\right )} \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (A a - B b\right )} \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, B a + 2 \, A b + 2 \, {\left (A a + B b\right )} \sin \left (d x + c\right )}{4 \, d \cos \left (d x + c\right )^{2}} \] Input:

integrate(sec(d*x+c)^3*(a+b*sin(d*x+c))*(A+B*sin(d*x+c)),x, algorithm="fri 
cas")
 

Output:

1/4*((A*a - B*b)*cos(d*x + c)^2*log(sin(d*x + c) + 1) - (A*a - B*b)*cos(d* 
x + c)^2*log(-sin(d*x + c) + 1) + 2*B*a + 2*A*b + 2*(A*a + B*b)*sin(d*x + 
c))/(d*cos(d*x + c)^2)
 

Sympy [F]

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

integrate(sec(d*x+c)**3*(a+b*sin(d*x+c))*(A+B*sin(d*x+c)),x)
 

Output:

Integral((A + B*sin(c + d*x))*(a + b*sin(c + d*x))*sec(c + d*x)**3, x)
 

Maxima [A] (verification not implemented)

Time = 0.03 (sec) , antiderivative size = 78, normalized size of antiderivative = 1.04 \[ \int \sec ^3(c+d x) (a+b \sin (c+d x)) (A+B \sin (c+d x)) \, dx=\frac {{\left (A a - B b\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (A a - B b\right )} \log \left (\sin \left (d x + c\right ) - 1\right ) - \frac {2 \, {\left (B a + A b + {\left (A a + B b\right )} \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{2} - 1}}{4 \, d} \] Input:

integrate(sec(d*x+c)^3*(a+b*sin(d*x+c))*(A+B*sin(d*x+c)),x, algorithm="max 
ima")
 

Output:

1/4*((A*a - B*b)*log(sin(d*x + c) + 1) - (A*a - B*b)*log(sin(d*x + c) - 1) 
 - 2*(B*a + A*b + (A*a + B*b)*sin(d*x + c))/(sin(d*x + c)^2 - 1))/d
 

Giac [A] (verification not implemented)

Time = 0.38 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.19 \[ \int \sec ^3(c+d x) (a+b \sin (c+d x)) (A+B \sin (c+d x)) \, dx=\frac {{\left (A a - B b\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right )}{4 \, d} - \frac {{\left (A a - B b\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{4 \, d} - \frac {A a \sin \left (d x + c\right ) + B b \sin \left (d x + c\right ) + B a + A b}{2 \, {\left (\sin \left (d x + c\right )^{2} - 1\right )} d} \] Input:

integrate(sec(d*x+c)^3*(a+b*sin(d*x+c))*(A+B*sin(d*x+c)),x, algorithm="gia 
c")
 

Output:

1/4*(A*a - B*b)*log(abs(sin(d*x + c) + 1))/d - 1/4*(A*a - B*b)*log(abs(sin 
(d*x + c) - 1))/d - 1/2*(A*a*sin(d*x + c) + B*b*sin(d*x + c) + B*a + A*b)/ 
((sin(d*x + c)^2 - 1)*d)
 

Mupad [B] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.84 \[ \int \sec ^3(c+d x) (a+b \sin (c+d x)) (A+B \sin (c+d x)) \, dx=\frac {\mathrm {atanh}\left (\sin \left (c+d\,x\right )\right )\,\left (\frac {A\,a}{2}-\frac {B\,b}{2}\right )}{d}-\frac {\frac {A\,b}{2}+\frac {B\,a}{2}+\sin \left (c+d\,x\right )\,\left (\frac {A\,a}{2}+\frac {B\,b}{2}\right )}{d\,\left ({\sin \left (c+d\,x\right )}^2-1\right )} \] Input:

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

Output:

(atanh(sin(c + d*x))*((A*a)/2 - (B*b)/2))/d - ((A*b)/2 + (B*a)/2 + sin(c + 
 d*x)*((A*a)/2 + (B*b)/2))/(d*(sin(c + d*x)^2 - 1))
 

Reduce [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 216, normalized size of antiderivative = 2.88 \[ \int \sec ^3(c+d x) (a+b \sin (c+d x)) (A+B \sin (c+d x)) \, dx=\frac {-\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{2} a^{2}+\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{2} b^{2}+\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) a^{2}-\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) b^{2}+\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{2} a^{2}-\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{2} b^{2}-\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) a^{2}+\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) b^{2}-2 \sin \left (d x +c \right )^{2} a b -\sin \left (d x +c \right ) a^{2}-\sin \left (d x +c \right ) b^{2}}{2 d \left (\sin \left (d x +c \right )^{2}-1\right )} \] Input:

int(sec(d*x+c)^3*(a+b*sin(d*x+c))*(A+B*sin(d*x+c)),x)
 

Output:

( - log(tan((c + d*x)/2) - 1)*sin(c + d*x)**2*a**2 + log(tan((c + d*x)/2) 
- 1)*sin(c + d*x)**2*b**2 + log(tan((c + d*x)/2) - 1)*a**2 - log(tan((c + 
d*x)/2) - 1)*b**2 + log(tan((c + d*x)/2) + 1)*sin(c + d*x)**2*a**2 - log(t 
an((c + d*x)/2) + 1)*sin(c + d*x)**2*b**2 - log(tan((c + d*x)/2) + 1)*a**2 
 + log(tan((c + d*x)/2) + 1)*b**2 - 2*sin(c + d*x)**2*a*b - sin(c + d*x)*a 
**2 - sin(c + d*x)*b**2)/(2*d*(sin(c + d*x)**2 - 1))