Integrand size = 21, antiderivative size = 58 \[ \int \frac {\cot ^4(c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {\text {arctanh}(\cos (c+d x))}{2 a d}-\frac {\cot ^3(c+d x)}{3 a d}+\frac {\cot (c+d x) \csc (c+d x)}{2 a d} \] Output:
-1/2*arctanh(cos(d*x+c))/a/d-1/3*cot(d*x+c)^3/a/d+1/2*cot(d*x+c)*csc(d*x+c )/a/d
Leaf count is larger than twice the leaf count of optimal. \(124\) vs. \(2(58)=116\).
Time = 1.21 (sec) , antiderivative size = 124, normalized size of antiderivative = 2.14 \[ \int \frac {\cot ^4(c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {\csc \left (\frac {1}{2} (c+d x)\right ) \sec \left (\frac {1}{2} (c+d x)\right ) \left (\csc \left (\frac {1}{2} (c+d x)\right )+\sec \left (\frac {1}{2} (c+d x)\right )\right )^2 \left (\cos (3 (c+d x))+\cos (c+d x) (3-6 \sin (c+d x))+6 \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right ) \sin ^3(c+d x)\right )}{96 a d (1+\sin (c+d x))} \] Input:
Integrate[Cot[c + d*x]^4/(a + a*Sin[c + d*x]),x]
Output:
-1/96*(Csc[(c + d*x)/2]*Sec[(c + d*x)/2]*(Csc[(c + d*x)/2] + Sec[(c + d*x) /2])^2*(Cos[3*(c + d*x)] + Cos[c + d*x]*(3 - 6*Sin[c + d*x]) + 6*(Log[Cos[ (c + d*x)/2]] - Log[Sin[(c + d*x)/2]])*Sin[c + d*x]^3))/(a*d*(1 + Sin[c + d*x]))
Time = 0.43 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.381, Rules used = {3042, 3185, 3042, 3087, 15, 3091, 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 {\cot ^4(c+d x)}{a \sin (c+d x)+a} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\tan (c+d x)^4 (a \sin (c+d x)+a)}dx\) |
\(\Big \downarrow \) 3185 |
\(\displaystyle \frac {\int \cot ^2(c+d x) \csc ^2(c+d x)dx}{a}-\frac {\int \cot ^2(c+d x) \csc (c+d x)dx}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \sec \left (c+d x-\frac {\pi }{2}\right )^2 \tan \left (c+d x-\frac {\pi }{2}\right )^2dx}{a}-\frac {\int \sec \left (c+d x-\frac {\pi }{2}\right ) \tan \left (c+d x-\frac {\pi }{2}\right )^2dx}{a}\) |
\(\Big \downarrow \) 3087 |
\(\displaystyle \frac {\int \cot ^2(c+d x)d(-\cot (c+d x))}{a d}-\frac {\int \sec \left (c+d x-\frac {\pi }{2}\right ) \tan \left (c+d x-\frac {\pi }{2}\right )^2dx}{a}\) |
\(\Big \downarrow \) 15 |
\(\displaystyle -\frac {\int \sec \left (c+d x-\frac {\pi }{2}\right ) \tan \left (c+d x-\frac {\pi }{2}\right )^2dx}{a}-\frac {\cot ^3(c+d x)}{3 a d}\) |
\(\Big \downarrow \) 3091 |
\(\displaystyle -\frac {-\frac {1}{2} \int \csc (c+d x)dx-\frac {\cot (c+d x) \csc (c+d x)}{2 d}}{a}-\frac {\cot ^3(c+d x)}{3 a d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {-\frac {1}{2} \int \csc (c+d x)dx-\frac {\cot (c+d x) \csc (c+d x)}{2 d}}{a}-\frac {\cot ^3(c+d x)}{3 a d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle -\frac {\frac {\text {arctanh}(\cos (c+d x))}{2 d}-\frac {\cot (c+d x) \csc (c+d x)}{2 d}}{a}-\frac {\cot ^3(c+d x)}{3 a d}\) |
Input:
Int[Cot[c + d*x]^4/(a + a*Sin[c + d*x]),x]
Output:
-1/3*Cot[c + d*x]^3/(a*d) - (ArcTanh[Cos[c + d*x]]/(2*d) - (Cot[c + d*x]*C sc[c + d*x])/(2*d))/a
Int[(a_.)*(x_)^(m_.), x_Symbol] :> Simp[a*(x^(m + 1)/(m + 1)), x] /; FreeQ[ {a, m}, x] && NeQ[m, -1]
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_S ymbol] :> Simp[1/f Subst[Int[(b*x)^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] && !(IntegerQ[(n - 1) /2] && LtQ[0, n, m - 1])
Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^( n_), x_Symbol] :> Simp[b*(a*Sec[e + f*x])^m*((b*Tan[e + f*x])^(n - 1)/(f*(m + n - 1))), x] - Simp[b^2*((n - 1)/(m + n - 1)) Int[(a*Sec[e + f*x])^m*( b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] & & NeQ[m + n - 1, 0] && IntegersQ[2*m, 2*n]
Int[((g_.)*tan[(e_.) + (f_.)*(x_)])^(p_.)/((a_) + (b_.)*sin[(e_.) + (f_.)*( x_)]), x_Symbol] :> Simp[1/a Int[Sec[e + f*x]^2*(g*Tan[e + f*x])^p, x], x ] - Simp[1/(b*g) Int[Sec[e + f*x]*(g*Tan[e + f*x])^(p + 1), x], x] /; Fre eQ[{a, b, e, f, g, p}, x] && EqQ[a^2 - b^2, 0] && NeQ[p, -1]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 0.77 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.62
method | result | size |
derivativedivides | \(\frac {\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3}-\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {1}{3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}+\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}+\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+4 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d a}\) | \(94\) |
default | \(\frac {\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3}-\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {1}{3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}+\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}+\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+4 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d a}\) | \(94\) |
risch | \(-\frac {-6 i {\mathrm e}^{4 i \left (d x +c \right )}+3 \,{\mathrm e}^{5 i \left (d x +c \right )}-2 i-3 \,{\mathrm e}^{i \left (d x +c \right )}}{3 d a \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{3}}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{2 a d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{2 a d}\) | \(100\) |
Input:
int(cot(d*x+c)^4/(a+a*sin(d*x+c)),x,method=_RETURNVERBOSE)
Output:
1/8/d/a*(1/3*tan(1/2*d*x+1/2*c)^3-tan(1/2*d*x+1/2*c)^2-tan(1/2*d*x+1/2*c)- 1/3/tan(1/2*d*x+1/2*c)^3+1/tan(1/2*d*x+1/2*c)+1/tan(1/2*d*x+1/2*c)^2+4*ln( tan(1/2*d*x+1/2*c)))
Leaf count of result is larger than twice the leaf count of optimal. 111 vs. \(2 (52) = 104\).
Time = 0.10 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.91 \[ \int \frac {\cot ^4(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {4 \, \cos \left (d x + c\right )^{3} - 3 \, {\left (\cos \left (d x + c\right )^{2} - 1\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) + 3 \, {\left (\cos \left (d x + c\right )^{2} - 1\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 6 \, \cos \left (d x + c\right ) \sin \left (d x + c\right )}{12 \, {\left (a d \cos \left (d x + c\right )^{2} - a d\right )} \sin \left (d x + c\right )} \] Input:
integrate(cot(d*x+c)^4/(a+a*sin(d*x+c)),x, algorithm="fricas")
Output:
1/12*(4*cos(d*x + c)^3 - 3*(cos(d*x + c)^2 - 1)*log(1/2*cos(d*x + c) + 1/2 )*sin(d*x + c) + 3*(cos(d*x + c)^2 - 1)*log(-1/2*cos(d*x + c) + 1/2)*sin(d *x + c) - 6*cos(d*x + c)*sin(d*x + c))/((a*d*cos(d*x + c)^2 - a*d)*sin(d*x + c))
\[ \int \frac {\cot ^4(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\int \frac {\cot ^{4}{\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx}{a} \] Input:
integrate(cot(d*x+c)**4/(a+a*sin(d*x+c)),x)
Output:
Integral(cot(c + d*x)**4/(sin(c + d*x) + 1), x)/a
Leaf count of result is larger than twice the leaf count of optimal. 155 vs. \(2 (52) = 104\).
Time = 0.04 (sec) , antiderivative size = 155, normalized size of antiderivative = 2.67 \[ \int \frac {\cot ^4(c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {\frac {\frac {3 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {3 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a} - \frac {12 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} - \frac {{\left (\frac {3 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {3 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - 1\right )} {\left (\cos \left (d x + c\right ) + 1\right )}^{3}}{a \sin \left (d x + c\right )^{3}}}{24 \, d} \] Input:
integrate(cot(d*x+c)^4/(a+a*sin(d*x+c)),x, algorithm="maxima")
Output:
-1/24*((3*sin(d*x + c)/(cos(d*x + c) + 1) + 3*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - sin(d*x + c)^3/(cos(d*x + c) + 1)^3)/a - 12*log(sin(d*x + c)/(co s(d*x + c) + 1))/a - (3*sin(d*x + c)/(cos(d*x + c) + 1) + 3*sin(d*x + c)^2 /(cos(d*x + c) + 1)^2 - 1)*(cos(d*x + c) + 1)^3/(a*sin(d*x + c)^3))/d
Leaf count of result is larger than twice the leaf count of optimal. 127 vs. \(2 (52) = 104\).
Time = 0.15 (sec) , antiderivative size = 127, normalized size of antiderivative = 2.19 \[ \int \frac {\cot ^4(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^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 3 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 3 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{3}} - \frac {22 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 3 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 3 \, \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 )^{3}}}{24 \, d} \] Input:
integrate(cot(d*x+c)^4/(a+a*sin(d*x+c)),x, algorithm="giac")
Output:
1/24*(12*log(abs(tan(1/2*d*x + 1/2*c)))/a + (a^2*tan(1/2*d*x + 1/2*c)^3 - 3*a^2*tan(1/2*d*x + 1/2*c)^2 - 3*a^2*tan(1/2*d*x + 1/2*c))/a^3 - (22*tan(1 /2*d*x + 1/2*c)^3 - 3*tan(1/2*d*x + 1/2*c)^2 - 3*tan(1/2*d*x + 1/2*c) + 1) /(a*tan(1/2*d*x + 1/2*c)^3))/d
Time = 17.50 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.98 \[ \int \frac {\cot ^4(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{24\,a\,d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,a\,d}+\frac {\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 )}{8\,a\,d}+\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-\frac {1}{3}\right )}{8\,a\,d} \] Input:
int(cot(c + d*x)^4/(a + a*sin(c + d*x)),x)
Output:
tan(c/2 + (d*x)/2)^3/(24*a*d) - tan(c/2 + (d*x)/2)^2/(8*a*d) + log(tan(c/2 + (d*x)/2))/(2*a*d) - tan(c/2 + (d*x)/2)/(8*a*d) + (cot(c/2 + (d*x)/2)^3* (tan(c/2 + (d*x)/2) + tan(c/2 + (d*x)/2)^2 - 1/3))/(8*a*d)
Time = 0.17 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.29 \[ \int \frac {\cot ^4(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {2 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2}+3 \cos \left (d x +c \right ) \sin \left (d x +c \right )-2 \cos \left (d x +c \right )+3 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{3}}{6 \sin \left (d x +c \right )^{3} a d} \] Input:
int(cot(d*x+c)^4/(a+a*sin(d*x+c)),x)
Output:
(2*cos(c + d*x)*sin(c + d*x)**2 + 3*cos(c + d*x)*sin(c + d*x) - 2*cos(c + d*x) + 3*log(tan((c + d*x)/2))*sin(c + d*x)**3)/(6*sin(c + d*x)**3*a*d)