\(\int \frac {\csc ^3(c+d x)}{a+a \sin (c+d x)} \, dx\) [212]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [B] (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 = 21, antiderivative size = 82 \[ \int \frac {\csc ^3(c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {3 \text {arctanh}(\cos (c+d x))}{2 a d}+\frac {2 \cot (c+d x)}{a d}-\frac {3 \cot (c+d x) \csc (c+d x)}{2 a d}+\frac {\cot (c+d x) \csc (c+d x)}{d (a+a \sin (c+d x))} \] Output:

-3/2*arctanh(cos(d*x+c))/a/d+2*cot(d*x+c)/a/d-3/2*cot(d*x+c)*csc(d*x+c)/a/ 
d+cot(d*x+c)*csc(d*x+c)/d/(a+a*sin(d*x+c))
 

Mathematica [A] (verified)

Time = 0.66 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.04 \[ \int \frac {\csc ^3(c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {-4 \csc (2 (c+d x))-3 \sec (c+d x)+3 \text {arctanh}\left (\sqrt {\cos ^2(c+d x)}\right ) \sqrt {\cos ^2(c+d x)} \sec (c+d x)+\csc ^2(c+d x) \sec (c+d x)+4 \tan (c+d x)}{2 a d} \] Input:

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

Output:

-1/2*(-4*Csc[2*(c + d*x)] - 3*Sec[c + d*x] + 3*ArcTanh[Sqrt[Cos[c + d*x]^2 
]]*Sqrt[Cos[c + d*x]^2]*Sec[c + d*x] + Csc[c + d*x]^2*Sec[c + d*x] + 4*Tan 
[c + d*x])/(a*d)
 

Rubi [A] (verified)

Time = 0.55 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.01, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.524, Rules used = {3042, 3247, 25, 3042, 3227, 3042, 4254, 24, 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 {\csc ^3(c+d x)}{a \sin (c+d x)+a} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {1}{\sin (c+d x)^3 (a \sin (c+d x)+a)}dx\)

\(\Big \downarrow \) 3247

\(\displaystyle \frac {\cot (c+d x) \csc (c+d x)}{d (a \sin (c+d x)+a)}-\frac {\int -\csc ^3(c+d x) (3 a-2 a \sin (c+d x))dx}{a^2}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\int \csc ^3(c+d x) (3 a-2 a \sin (c+d x))dx}{a^2}+\frac {\cot (c+d x) \csc (c+d x)}{d (a \sin (c+d x)+a)}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\int \frac {3 a-2 a \sin (c+d x)}{\sin (c+d x)^3}dx}{a^2}+\frac {\cot (c+d x) \csc (c+d x)}{d (a \sin (c+d x)+a)}\)

\(\Big \downarrow \) 3227

\(\displaystyle \frac {3 a \int \csc ^3(c+d x)dx-2 a \int \csc ^2(c+d x)dx}{a^2}+\frac {\cot (c+d x) \csc (c+d x)}{d (a \sin (c+d x)+a)}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {3 a \int \csc (c+d x)^3dx-2 a \int \csc (c+d x)^2dx}{a^2}+\frac {\cot (c+d x) \csc (c+d x)}{d (a \sin (c+d x)+a)}\)

\(\Big \downarrow \) 4254

\(\displaystyle \frac {\frac {2 a \int 1d\cot (c+d x)}{d}+3 a \int \csc (c+d x)^3dx}{a^2}+\frac {\cot (c+d x) \csc (c+d x)}{d (a \sin (c+d x)+a)}\)

\(\Big \downarrow \) 24

\(\displaystyle \frac {3 a \int \csc (c+d x)^3dx+\frac {2 a \cot (c+d x)}{d}}{a^2}+\frac {\cot (c+d x) \csc (c+d x)}{d (a \sin (c+d x)+a)}\)

\(\Big \downarrow \) 4255

\(\displaystyle \frac {3 a \left (\frac {1}{2} \int \csc (c+d x)dx-\frac {\cot (c+d x) \csc (c+d x)}{2 d}\right )+\frac {2 a \cot (c+d x)}{d}}{a^2}+\frac {\cot (c+d x) \csc (c+d x)}{d (a \sin (c+d x)+a)}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {3 a \left (\frac {1}{2} \int \csc (c+d x)dx-\frac {\cot (c+d x) \csc (c+d x)}{2 d}\right )+\frac {2 a \cot (c+d x)}{d}}{a^2}+\frac {\cot (c+d x) \csc (c+d x)}{d (a \sin (c+d x)+a)}\)

\(\Big \downarrow \) 4257

\(\displaystyle \frac {3 a \left (-\frac {\text {arctanh}(\cos (c+d x))}{2 d}-\frac {\cot (c+d x) \csc (c+d x)}{2 d}\right )+\frac {2 a \cot (c+d x)}{d}}{a^2}+\frac {\cot (c+d x) \csc (c+d x)}{d (a \sin (c+d x)+a)}\)

Input:

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

Output:

((2*a*Cot[c + d*x])/d + 3*a*(-1/2*ArcTanh[Cos[c + d*x]]/d - (Cot[c + d*x]* 
Csc[c + d*x])/(2*d)))/a^2 + (Cot[c + d*x]*Csc[c + d*x])/(d*(a + a*Sin[c + 
d*x]))
 

Defintions of rubi rules used

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

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 3227
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x 
_)]), x_Symbol] :> Simp[c   Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b   Int 
[(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
 

rule 3247
Int[((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)/((a_) + (b_.)*sin[(e_.) + 
(f_.)*(x_)]), x_Symbol] :> Simp[(-b^2)*Cos[e + f*x]*((c + d*Sin[e + f*x])^( 
n + 1)/(a*f*(b*c - a*d)*(a + b*Sin[e + f*x]))), x] + Simp[d/(a*(b*c - a*d)) 
   Int[(c + d*Sin[e + f*x])^n*(a*n - b*(n + 1)*Sin[e + f*x]), x], x] /; Fre 
eQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[ 
c^2 - d^2, 0] && LtQ[n, 0] && (IntegerQ[2*n] || EqQ[c, 0])
 

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]
 
Maple [A] (verified)

Time = 0.77 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.06

method result size
derivativedivides \(\frac {\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{2}-2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+\frac {8}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}-\frac {1}{2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+\frac {2}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}+6 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d a}\) \(87\)
default \(\frac {\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{2}-2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+\frac {8}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}-\frac {1}{2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+\frac {2}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}+6 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d a}\) \(87\)
parallelrisch \(\frac {12 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}-\cot \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+3 \cot \left (\frac {d x}{2}+\frac {c}{2}\right )-24 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) a d}\) \(105\)
risch \(\frac {-i {\mathrm e}^{i \left (d x +c \right )}+3 i {\mathrm e}^{3 i \left (d x +c \right )}-5 \,{\mathrm e}^{2 i \left (d x +c \right )}+3 \,{\mathrm e}^{4 i \left (d x +c \right )}+4}{\left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2} \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{2 a d}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{2 a d}\) \(124\)
norman \(\frac {-\frac {3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{a d}-\frac {1}{8 a d}+\frac {3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 a d}-\frac {3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{8 a d}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{8 a d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\frac {3 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a d}\) \(128\)

Input:

int(csc(d*x+c)^3/(a+a*sin(d*x+c)),x,method=_RETURNVERBOSE)
 

Output:

1/4/d/a*(1/2*tan(1/2*d*x+1/2*c)^2-2*tan(1/2*d*x+1/2*c)+8/(tan(1/2*d*x+1/2* 
c)+1)-1/2/tan(1/2*d*x+1/2*c)^2+2/tan(1/2*d*x+1/2*c)+6*ln(tan(1/2*d*x+1/2*c 
)))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 232 vs. \(2 (78) = 156\).

Time = 0.08 (sec) , antiderivative size = 232, normalized size of antiderivative = 2.83 \[ \int \frac {\csc ^3(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {8 \, \cos \left (d x + c\right )^{3} + 6 \, \cos \left (d x + c\right )^{2} - 3 \, {\left (\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2} + {\left (\cos \left (d x + c\right )^{2} - 1\right )} \sin \left (d x + c\right ) - \cos \left (d x + c\right ) - 1\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 3 \, {\left (\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2} + {\left (\cos \left (d x + c\right )^{2} - 1\right )} \sin \left (d x + c\right ) - \cos \left (d x + c\right ) - 1\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 2 \, {\left (4 \, \cos \left (d x + c\right )^{2} + \cos \left (d x + c\right ) - 2\right )} \sin \left (d x + c\right ) - 6 \, \cos \left (d x + c\right ) - 4}{4 \, {\left (a d \cos \left (d x + c\right )^{3} + a d \cos \left (d x + c\right )^{2} - a d \cos \left (d x + c\right ) - a d + {\left (a d \cos \left (d x + c\right )^{2} - a d\right )} \sin \left (d x + c\right )\right )}} \] Input:

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

Output:

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

Sympy [F]

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

integrate(csc(d*x+c)**3/(a+a*sin(d*x+c)),x)
 

Output:

Integral(csc(c + d*x)**3/(sin(c + d*x) + 1), x)/a
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 157 vs. \(2 (78) = 156\).

Time = 0.03 (sec) , antiderivative size = 157, normalized size of antiderivative = 1.91 \[ \int \frac {\csc ^3(c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {\frac {\frac {4 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {\sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}}{a} - \frac {\frac {3 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {20 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - 1}{\frac {a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {a \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}} - \frac {12 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a}}{8 \, d} \] Input:

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

Output:

-1/8*((4*sin(d*x + c)/(cos(d*x + c) + 1) - sin(d*x + c)^2/(cos(d*x + c) + 
1)^2)/a - (3*sin(d*x + c)/(cos(d*x + c) + 1) + 20*sin(d*x + c)^2/(cos(d*x 
+ c) + 1)^2 - 1)/(a*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + a*sin(d*x + c)^3 
/(cos(d*x + c) + 1)^3) - 12*log(sin(d*x + c)/(cos(d*x + c) + 1))/a)/d
 

Giac [A] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.37 \[ \int \frac {\csc ^3(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\frac {12 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a} + \frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 4 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{2}} + \frac {16}{a {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}} - \frac {18 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 4 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1}{a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}}{8 \, d} \] Input:

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

Output:

1/8*(12*log(abs(tan(1/2*d*x + 1/2*c)))/a + (a*tan(1/2*d*x + 1/2*c)^2 - 4*a 
*tan(1/2*d*x + 1/2*c))/a^2 + 16/(a*(tan(1/2*d*x + 1/2*c) + 1)) - (18*tan(1 
/2*d*x + 1/2*c)^2 - 4*tan(1/2*d*x + 1/2*c) + 1)/(a*tan(1/2*d*x + 1/2*c)^2) 
)/d
 

Mupad [B] (verification not implemented)

Time = 36.09 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.41 \[ \int \frac {\csc ^3(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,a\,d}+\frac {3\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{2\,a\,d}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a\,d}+\frac {10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\frac {3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2}-\frac {1}{2}}{d\,\left (4\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+4\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )} \] Input:

int(1/(sin(c + d*x)^3*(a + a*sin(c + d*x))),x)
 

Output:

tan(c/2 + (d*x)/2)^2/(8*a*d) + (3*log(tan(c/2 + (d*x)/2)))/(2*a*d) - tan(c 
/2 + (d*x)/2)/(2*a*d) + ((3*tan(c/2 + (d*x)/2))/2 + 10*tan(c/2 + (d*x)/2)^ 
2 - 1/2)/(d*(4*a*tan(c/2 + (d*x)/2)^2 + 4*a*tan(c/2 + (d*x)/2)^3))
 

Reduce [B] (verification not implemented)

Time = 0.22 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.56 \[ \int \frac {\csc ^3(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {12 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+12 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}-3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-24 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}{8 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )} \] Input:

int(csc(d*x+c)^3/(a+a*sin(d*x+c)),x)
 

Output:

(12*log(tan((c + d*x)/2))*tan((c + d*x)/2)**3 + 12*log(tan((c + d*x)/2))*t 
an((c + d*x)/2)**2 + tan((c + d*x)/2)**5 - 3*tan((c + d*x)/2)**4 - 24*tan( 
(c + d*x)/2)**3 + 3*tan((c + d*x)/2) - 1)/(8*tan((c + d*x)/2)**2*a*d*(tan( 
(c + d*x)/2) + 1))