3.1460 \(\int \csc (c+d x) \sec ^2(c+d x) (a+b \sin (c+d x))^3 \, dx\)

Optimal. Leaf size=78 \[ \frac {a^3 \sec (c+d x)}{d}-\frac {a^3 \tanh ^{-1}(\cos (c+d x))}{d}+\frac {3 a^2 b \tan (c+d x)}{d}+\frac {3 a b^2 \sec (c+d x)}{d}+\frac {b^3 \tan (c+d x)}{d}-b^3 x \]

[Out]

-b^3*x-a^3*arctanh(cos(d*x+c))/d+a^3*sec(d*x+c)/d+3*a*b^2*sec(d*x+c)/d+3*a^2*b*tan(d*x+c)/d+b^3*tan(d*x+c)/d

________________________________________________________________________________________

Rubi [A]  time = 0.15, antiderivative size = 78, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 8, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.296, Rules used = {2912, 3767, 8, 2622, 321, 207, 2606, 3473} \[ \frac {3 a^2 b \tan (c+d x)}{d}+\frac {a^3 \sec (c+d x)}{d}-\frac {a^3 \tanh ^{-1}(\cos (c+d x))}{d}+\frac {3 a b^2 \sec (c+d x)}{d}+\frac {b^3 \tan (c+d x)}{d}-b^3 x \]

Antiderivative was successfully verified.

[In]

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

[Out]

-(b^3*x) - (a^3*ArcTanh[Cos[c + d*x]])/d + (a^3*Sec[c + d*x])/d + (3*a*b^2*Sec[c + d*x])/d + (3*a^2*b*Tan[c +
d*x])/d + (b^3*Tan[c + d*x])/d

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 321

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^n
)^(p + 1))/(b*(m + n*p + 1)), x] - Dist[(a*c^n*(m - n + 1))/(b*(m + n*p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 2606

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 2622

Int[csc[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Dist[1/(f*a^n), Subst[Int
[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/2), x], x, a*Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n
 + 1)/2] &&  !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])

Rule 2912

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*
(x_)])^(m_), x_Symbol] :> Int[ExpandTrig[(g*cos[e + f*x])^p, (d*sin[e + f*x])^n*(a + b*sin[e + f*x])^m, x], x]
 /; FreeQ[{a, b, d, e, f, g, n, p}, x] && NeQ[a^2 - b^2, 0] && IntegerQ[m] && (GtQ[m, 0] || IntegerQ[n])

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps

\begin {align*} \int \csc (c+d x) \sec ^2(c+d x) (a+b \sin (c+d x))^3 \, dx &=\int \left (3 a^2 b \sec ^2(c+d x)+a^3 \csc (c+d x) \sec ^2(c+d x)+3 a b^2 \sec (c+d x) \tan (c+d x)+b^3 \tan ^2(c+d x)\right ) \, dx\\ &=a^3 \int \csc (c+d x) \sec ^2(c+d x) \, dx+\left (3 a^2 b\right ) \int \sec ^2(c+d x) \, dx+\left (3 a b^2\right ) \int \sec (c+d x) \tan (c+d x) \, dx+b^3 \int \tan ^2(c+d x) \, dx\\ &=\frac {b^3 \tan (c+d x)}{d}-b^3 \int 1 \, dx+\frac {a^3 \operatorname {Subst}\left (\int \frac {x^2}{-1+x^2} \, dx,x,\sec (c+d x)\right )}{d}-\frac {\left (3 a^2 b\right ) \operatorname {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{d}+\frac {\left (3 a b^2\right ) \operatorname {Subst}(\int 1 \, dx,x,\sec (c+d x))}{d}\\ &=-b^3 x+\frac {a^3 \sec (c+d x)}{d}+\frac {3 a b^2 \sec (c+d x)}{d}+\frac {3 a^2 b \tan (c+d x)}{d}+\frac {b^3 \tan (c+d x)}{d}+\frac {a^3 \operatorname {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sec (c+d x)\right )}{d}\\ &=-b^3 x-\frac {a^3 \tanh ^{-1}(\cos (c+d x))}{d}+\frac {a^3 \sec (c+d x)}{d}+\frac {3 a b^2 \sec (c+d x)}{d}+\frac {3 a^2 b \tan (c+d x)}{d}+\frac {b^3 \tan (c+d x)}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.30, size = 83, normalized size = 1.06 \[ \frac {a^3 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+a^3 \left (-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )\right )+b \left (3 a^2+b^2\right ) \tan (c+d x)+a \left (a^2+3 b^2\right ) \sec (c+d x)-b^3 c-b^3 d x}{d} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(-(b^3*c) - b^3*d*x - a^3*Log[Cos[(c + d*x)/2]] + a^3*Log[Sin[(c + d*x)/2]] + a*(a^2 + 3*b^2)*Sec[c + d*x] + b
*(3*a^2 + b^2)*Tan[c + d*x])/d

________________________________________________________________________________________

fricas [A]  time = 0.44, size = 99, normalized size = 1.27 \[ -\frac {2 \, b^{3} d x \cos \left (d x + c\right ) + a^{3} \cos \left (d x + c\right ) \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - a^{3} \cos \left (d x + c\right ) \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 2 \, a^{3} - 6 \, a b^{2} - 2 \, {\left (3 \, a^{2} b + b^{3}\right )} \sin \left (d x + c\right )}{2 \, d \cos \left (d x + c\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)*sec(d*x+c)^2*(a+b*sin(d*x+c))^3,x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.21, size = 86, normalized size = 1.10 \[ -\frac {{\left (d x + c\right )} b^{3} - a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + \frac {2 \, {\left (3 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a^{3} + 3 \, a b^{2}\right )}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)*sec(d*x+c)^2*(a+b*sin(d*x+c))^3,x, algorithm="giac")

[Out]

-((d*x + c)*b^3 - a^3*log(abs(tan(1/2*d*x + 1/2*c))) + 2*(3*a^2*b*tan(1/2*d*x + 1/2*c) + b^3*tan(1/2*d*x + 1/2
*c) + a^3 + 3*a*b^2)/(tan(1/2*d*x + 1/2*c)^2 - 1))/d

________________________________________________________________________________________

maple [A]  time = 0.60, size = 100, normalized size = 1.28 \[ \frac {a^{3}}{d \cos \left (d x +c \right )}+\frac {a^{3} \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{d}+\frac {3 a^{2} b \tan \left (d x +c \right )}{d}+\frac {3 a \,b^{2}}{d \cos \left (d x +c \right )}-b^{3} x +\frac {b^{3} \tan \left (d x +c \right )}{d}-\frac {b^{3} c}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(d*x+c)*sec(d*x+c)^2*(a+b*sin(d*x+c))^3,x)

[Out]

1/d*a^3/cos(d*x+c)+1/d*a^3*ln(csc(d*x+c)-cot(d*x+c))+3*a^2*b*tan(d*x+c)/d+3/d*a*b^2/cos(d*x+c)-b^3*x+b^3*tan(d
*x+c)/d-1/d*b^3*c

________________________________________________________________________________________

maxima [A]  time = 0.41, size = 86, normalized size = 1.10 \[ -\frac {2 \, {\left (d x + c - \tan \left (d x + c\right )\right )} b^{3} - a^{3} {\left (\frac {2}{\cos \left (d x + c\right )} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - 6 \, a^{2} b \tan \left (d x + c\right ) - \frac {6 \, a b^{2}}{\cos \left (d x + c\right )}}{2 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)*sec(d*x+c)^2*(a+b*sin(d*x+c))^3,x, algorithm="maxima")

[Out]

-1/2*(2*(d*x + c - tan(d*x + c))*b^3 - a^3*(2/cos(d*x + c) - log(cos(d*x + c) + 1) + log(cos(d*x + c) - 1)) -
6*a^2*b*tan(d*x + c) - 6*a*b^2/cos(d*x + c))/d

________________________________________________________________________________________

mupad [B]  time = 11.93, size = 154, normalized size = 1.97 \[ \frac {a^3\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (6\,a^2\,b+2\,b^3\right )+6\,a\,b^2+2\,a^3}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )}+\frac {2\,b^3\,\mathrm {atan}\left (\frac {4\,b^6}{4\,a^3\,b^3+4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,b^6}-\frac {4\,a^3\,b^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4\,a^3\,b^3+4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,b^6}\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(a^3*log(tan(c/2 + (d*x)/2)))/d - (tan(c/2 + (d*x)/2)*(6*a^2*b + 2*b^3) + 6*a*b^2 + 2*a^3)/(d*(tan(c/2 + (d*x)
/2)^2 - 1)) + (2*b^3*atan((4*b^6)/(4*a^3*b^3 + 4*b^6*tan(c/2 + (d*x)/2)) - (4*a^3*b^3*tan(c/2 + (d*x)/2))/(4*a
^3*b^3 + 4*b^6*tan(c/2 + (d*x)/2))))/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(csc(d*x+c)*sec(d*x+c)**2*(a+b*sin(d*x+c))**3,x)

[Out]

Timed out

________________________________________________________________________________________