3.991 \(\int \sec ^3(c+d x) (a+a \sin (c+d x))^3 (A+B \sin (c+d x)) \, dx\)

Optimal. Leaf size=62 \[ \frac {2 a^4 (A+B)}{d (a-a \sin (c+d x))}+\frac {a^3 (A+3 B) \log (1-\sin (c+d x))}{d}+\frac {a^3 B \sin (c+d x)}{d} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.11, antiderivative size = 62, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.065, Rules used = {2836, 77} \[ \frac {2 a^4 (A+B)}{d (a-a \sin (c+d x))}+\frac {a^3 (A+3 B) \log (1-\sin (c+d x))}{d}+\frac {a^3 B \sin (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(a^3*(A + 3*B)*Log[1 - Sin[c + d*x]])/d + (a^3*B*Sin[c + d*x])/d + (2*a^4*(A + B))/(d*(a - a*Sin[c + d*x]))

Rule 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 2836

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)
*(x_)])^(n_.), x_Symbol] :> Dist[1/(b^p*f), Subst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2)*(c + (d*x)/b
)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, c, d, m, n}, x] && IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2,
 0]

Rubi steps

\begin {align*} \int \sec ^3(c+d x) (a+a \sin (c+d x))^3 (A+B \sin (c+d x)) \, dx &=\frac {a^3 \operatorname {Subst}\left (\int \frac {(a+x) \left (A+\frac {B x}{a}\right )}{(a-x)^2} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac {a^3 \operatorname {Subst}\left (\int \left (\frac {B}{a}+\frac {2 a (A+B)}{(a-x)^2}+\frac {-A-3 B}{a-x}\right ) \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac {a^3 (A+3 B) \log (1-\sin (c+d x))}{d}+\frac {a^3 B \sin (c+d x)}{d}+\frac {2 a^4 (A+B)}{d (a-a \sin (c+d x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.12, size = 48, normalized size = 0.77 \[ \frac {a^3 \left (-\frac {2 (A+B)}{\sin (c+d x)-1}+(A+3 B) \log (1-\sin (c+d x))+B \sin (c+d x)\right )}{d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(a^3*((A + 3*B)*Log[1 - Sin[c + d*x]] - (2*(A + B))/(-1 + Sin[c + d*x]) + B*Sin[c + d*x]))/d

________________________________________________________________________________________

fricas [A]  time = 0.54, size = 89, normalized size = 1.44 \[ -\frac {B a^{3} \cos \left (d x + c\right )^{2} + B a^{3} \sin \left (d x + c\right ) + {\left (2 \, A + B\right )} a^{3} - {\left ({\left (A + 3 \, B\right )} a^{3} \sin \left (d x + c\right ) - {\left (A + 3 \, B\right )} a^{3}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right )}{d \sin \left (d x + c\right ) - d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.26, size = 228, normalized size = 3.68 \[ -\frac {{\left (A a^{3} + 3 \, B a^{3}\right )} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right ) - 2 \, {\left (A a^{3} + 3 \, B a^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 3 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + A a^{3} + 3 \, B a^{3}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1} + \frac {3 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 9 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 10 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 22 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, A a^{3} + 9 \, B a^{3}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}^{2}}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-((A*a^3 + 3*B*a^3)*log(tan(1/2*d*x + 1/2*c)^2 + 1) - 2*(A*a^3 + 3*B*a^3)*log(abs(tan(1/2*d*x + 1/2*c) - 1)) -
 (A*a^3*tan(1/2*d*x + 1/2*c)^2 + 3*B*a^3*tan(1/2*d*x + 1/2*c)^2 + 2*B*a^3*tan(1/2*d*x + 1/2*c) + A*a^3 + 3*B*a
^3)/(tan(1/2*d*x + 1/2*c)^2 + 1) + (3*A*a^3*tan(1/2*d*x + 1/2*c)^2 + 9*B*a^3*tan(1/2*d*x + 1/2*c)^2 - 10*A*a^3
*tan(1/2*d*x + 1/2*c) - 22*B*a^3*tan(1/2*d*x + 1/2*c) + 3*A*a^3 + 9*B*a^3)/(tan(1/2*d*x + 1/2*c) - 1)^2)/d

________________________________________________________________________________________

maple [B]  time = 0.58, size = 290, normalized size = 4.68 \[ \frac {a^{3} A \left (\tan ^{2}\left (d x +c \right )\right )}{2 d}+\frac {a^{3} A \ln \left (\cos \left (d x +c \right )\right )}{d}+\frac {B \,a^{3} \left (\sin ^{5}\left (d x +c \right )\right )}{2 d \cos \left (d x +c \right )^{2}}+\frac {B \,a^{3} \left (\sin ^{3}\left (d x +c \right )\right )}{2 d}+\frac {3 a^{3} B \sin \left (d x +c \right )}{d}-\frac {3 B \,a^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {3 a^{3} A \left (\sin ^{3}\left (d x +c \right )\right )}{2 d \cos \left (d x +c \right )^{2}}+\frac {3 a^{3} A \sin \left (d x +c \right )}{2 d}-\frac {a^{3} A \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {3 B \,a^{3} \left (\tan ^{2}\left (d x +c \right )\right )}{2 d}+\frac {3 B \,a^{3} \ln \left (\cos \left (d x +c \right )\right )}{d}+\frac {3 a^{3} A}{2 d \cos \left (d x +c \right )^{2}}+\frac {3 B \,a^{3} \left (\sin ^{3}\left (d x +c \right )\right )}{2 d \cos \left (d x +c \right )^{2}}+\frac {a^{3} A \sec \left (d x +c \right ) \tan \left (d x +c \right )}{2 d}+\frac {B \,a^{3}}{2 d \cos \left (d x +c \right )^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.31, size = 52, normalized size = 0.84 \[ \frac {{\left (A + 3 \, B\right )} a^{3} \log \left (\sin \left (d x + c\right ) - 1\right ) + B a^{3} \sin \left (d x + c\right ) - \frac {2 \, {\left (A + B\right )} a^{3}}{\sin \left (d x + c\right ) - 1}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.08, size = 63, normalized size = 1.02 \[ \frac {\ln \left (\sin \left (c+d\,x\right )-1\right )\,\left (A\,a^3+3\,B\,a^3\right )-\frac {2\,A\,a^3+2\,B\,a^3}{\sin \left (c+d\,x\right )-1}+B\,a^3\,\sin \left (c+d\,x\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________