Integrand size = 21, antiderivative size = 51 \[ \int \frac {\csc ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\text {arctanh}(\cos (c+d x))}{a d}-\frac {2 \cot (c+d x)}{a d}+\frac {\cot (c+d x)}{d (a+a \sin (c+d x))} \] Output:
arctanh(cos(d*x+c))/a/d-2*cot(d*x+c)/a/d+cot(d*x+c)/d/(a+a*sin(d*x+c))
Time = 0.25 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.12 \[ \int \frac {\csc ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\sec (c+d x) \left (-1+\text {arctanh}\left (\sqrt {\cos ^2(c+d x)}\right ) \sqrt {\cos ^2(c+d x)}-\csc (c+d x)+2 \sin (c+d x)\right )}{a d} \] Input:
Integrate[Csc[c + d*x]^2/(a + a*Sin[c + d*x]),x]
Output:
(Sec[c + d*x]*(-1 + ArcTanh[Sqrt[Cos[c + d*x]^2]]*Sqrt[Cos[c + d*x]^2] - C sc[c + d*x] + 2*Sin[c + d*x]))/(a*d)
Time = 0.44 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.02, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {3042, 3247, 25, 3042, 3227, 3042, 4254, 24, 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 ^2(c+d x)}{a \sin (c+d x)+a} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\sin (c+d x)^2 (a \sin (c+d x)+a)}dx\) |
\(\Big \downarrow \) 3247 |
\(\displaystyle \frac {\cot (c+d x)}{d (a \sin (c+d x)+a)}-\frac {\int -\csc ^2(c+d x) (2 a-a \sin (c+d x))dx}{a^2}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \csc ^2(c+d x) (2 a-a \sin (c+d x))dx}{a^2}+\frac {\cot (c+d x)}{d (a \sin (c+d x)+a)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {2 a-a \sin (c+d x)}{\sin (c+d x)^2}dx}{a^2}+\frac {\cot (c+d x)}{d (a \sin (c+d x)+a)}\) |
\(\Big \downarrow \) 3227 |
\(\displaystyle \frac {2 a \int \csc ^2(c+d x)dx-a \int \csc (c+d x)dx}{a^2}+\frac {\cot (c+d x)}{d (a \sin (c+d x)+a)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {2 a \int \csc (c+d x)^2dx-a \int \csc (c+d x)dx}{a^2}+\frac {\cot (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}-a \int \csc (c+d x)dx}{a^2}+\frac {\cot (c+d x)}{d (a \sin (c+d x)+a)}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {-a \int \csc (c+d x)dx-\frac {2 a \cot (c+d x)}{d}}{a^2}+\frac {\cot (c+d x)}{d (a \sin (c+d x)+a)}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {\frac {a \text {arctanh}(\cos (c+d x))}{d}-\frac {2 a \cot (c+d x)}{d}}{a^2}+\frac {\cot (c+d x)}{d (a \sin (c+d x)+a)}\) |
Input:
Int[Csc[c + d*x]^2/(a + a*Sin[c + d*x]),x]
Output:
((a*ArcTanh[Cos[c + d*x]])/d - (2*a*Cot[c + d*x])/d)/a^2 + Cot[c + d*x]/(d *(a + a*Sin[c + d*x]))
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]
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])
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]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 0.71 (sec) , antiderivative size = 59, normalized size of antiderivative = 1.16
method | result | size |
derivativedivides | \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-2 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {4}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}}{2 d a}\) | \(59\) |
default | \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-2 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {4}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}}{2 d a}\) | \(59\) |
parallelrisch | \(\frac {\left (-2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-2\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-\cot \left (\frac {d x}{2}+\frac {c}{2}\right )+6 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) d}\) | \(80\) |
norman | \(\frac {\frac {3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{a d}-\frac {1}{2 a d}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{2 a d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}\) | \(92\) |
risch | \(-\frac {2 \left (i {\mathrm e}^{i \left (d x +c \right )}+{\mathrm e}^{2 i \left (d x +c \right )}-2\right )}{\left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{a d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{a d}\) | \(99\) |
Input:
int(csc(d*x+c)^2/(a+a*sin(d*x+c)),x,method=_RETURNVERBOSE)
Output:
1/2/d/a*(tan(1/2*d*x+1/2*c)-1/tan(1/2*d*x+1/2*c)-2*ln(tan(1/2*d*x+1/2*c))- 4/(tan(1/2*d*x+1/2*c)+1))
Leaf count of result is larger than twice the leaf count of optimal. 156 vs. \(2 (51) = 102\).
Time = 0.08 (sec) , antiderivative size = 156, normalized size of antiderivative = 3.06 \[ \int \frac {\csc ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {4 \, \cos \left (d x + c\right )^{2} + {\left (\cos \left (d x + c\right )^{2} - {\left (\cos \left (d x + c\right ) + 1\right )} \sin \left (d x + c\right ) - 1\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - {\left (\cos \left (d x + c\right )^{2} - {\left (\cos \left (d x + c\right ) + 1\right )} \sin \left (d x + c\right ) - 1\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 2 \, {\left (2 \, \cos \left (d x + c\right ) + 1\right )} \sin \left (d x + c\right ) + 2 \, \cos \left (d x + c\right ) - 2}{2 \, {\left (a d \cos \left (d x + c\right )^{2} - a d - {\left (a d \cos \left (d x + c\right ) + a d\right )} \sin \left (d x + c\right )\right )}} \] Input:
integrate(csc(d*x+c)^2/(a+a*sin(d*x+c)),x, algorithm="fricas")
Output:
1/2*(4*cos(d*x + c)^2 + (cos(d*x + c)^2 - (cos(d*x + c) + 1)*sin(d*x + c) - 1)*log(1/2*cos(d*x + c) + 1/2) - (cos(d*x + c)^2 - (cos(d*x + c) + 1)*si n(d*x + c) - 1)*log(-1/2*cos(d*x + c) + 1/2) + 2*(2*cos(d*x + c) + 1)*sin( d*x + c) + 2*cos(d*x + c) - 2)/(a*d*cos(d*x + c)^2 - a*d - (a*d*cos(d*x + c) + a*d)*sin(d*x + c))
\[ \int \frac {\csc ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\int \frac {\csc ^{2}{\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx}{a} \] Input:
integrate(csc(d*x+c)**2/(a+a*sin(d*x+c)),x)
Output:
Integral(csc(c + d*x)**2/(sin(c + d*x) + 1), x)/a
Leaf count of result is larger than twice the leaf count of optimal. 112 vs. \(2 (51) = 102\).
Time = 0.03 (sec) , antiderivative size = 112, normalized size of antiderivative = 2.20 \[ \int \frac {\csc ^2(c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {\frac {\frac {5 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1}{\frac {a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}} + \frac {2 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} - \frac {\sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}}{2 \, d} \] Input:
integrate(csc(d*x+c)^2/(a+a*sin(d*x+c)),x, algorithm="maxima")
Output:
-1/2*((5*sin(d*x + c)/(cos(d*x + c) + 1) + 1)/(a*sin(d*x + c)/(cos(d*x + c ) + 1) + a*sin(d*x + c)^2/(cos(d*x + c) + 1)^2) + 2*log(sin(d*x + c)/(cos( d*x + c) + 1))/a - sin(d*x + c)/(a*(cos(d*x + c) + 1)))/d
Time = 0.15 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.73 \[ \int \frac {\csc ^2(c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {\frac {2 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a} - \frac {\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a} - \frac {\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}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} a}}{2 \, d} \] Input:
integrate(csc(d*x+c)^2/(a+a*sin(d*x+c)),x, algorithm="giac")
Output:
-1/2*(2*log(abs(tan(1/2*d*x + 1/2*c)))/a - tan(1/2*d*x + 1/2*c)/a - (tan(1 /2*d*x + 1/2*c)^2 - 4*tan(1/2*d*x + 1/2*c) - 1)/((tan(1/2*d*x + 1/2*c)^2 + tan(1/2*d*x + 1/2*c))*a))/d
Time = 36.06 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.63 \[ \int \frac {\csc ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a\,d}-\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a\,d}-\frac {5\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1}{d\,\left (2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )} \] Input:
int(1/(sin(c + d*x)^2*(a + a*sin(c + d*x))),x)
Output:
tan(c/2 + (d*x)/2)/(2*a*d) - log(tan(c/2 + (d*x)/2))/(a*d) - (5*tan(c/2 + (d*x)/2) + 1)/(d*(2*a*tan(c/2 + (d*x)/2) + 2*a*tan(c/2 + (d*x)/2)^2))
Time = 0.25 (sec) , antiderivative size = 102, normalized size of antiderivative = 2.00 \[ \int \frac {\csc ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {-2 \,\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}-2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+6 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}{2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )} \] Input:
int(csc(d*x+c)^2/(a+a*sin(d*x+c)),x)
Output:
( - 2*log(tan((c + d*x)/2))*tan((c + d*x)/2)**2 - 2*log(tan((c + d*x)/2))* tan((c + d*x)/2) + tan((c + d*x)/2)**3 + 6*tan((c + d*x)/2)**2 - 1)/(2*tan ((c + d*x)/2)*a*d*(tan((c + d*x)/2) + 1))