Integrand size = 21, antiderivative size = 113 \[ \int \csc ^4(c+d x) (a+b \tan (c+d x))^3 \, dx=-\frac {a \left (a^2+3 b^2\right ) \cot (c+d x)}{d}-\frac {3 a^2 b \cot ^2(c+d x)}{2 d}-\frac {a^3 \cot ^3(c+d x)}{3 d}+\frac {b \left (3 a^2+b^2\right ) \log (\tan (c+d x))}{d}+\frac {3 a b^2 \tan (c+d x)}{d}+\frac {b^3 \tan ^2(c+d x)}{2 d} \] Output:
-a*(a^2+3*b^2)*cot(d*x+c)/d-3/2*a^2*b*cot(d*x+c)^2/d-1/3*a^3*cot(d*x+c)^3/ d+b*(3*a^2+b^2)*ln(tan(d*x+c))/d+3*a*b^2*tan(d*x+c)/d+1/2*b^3*tan(d*x+c)^2 /d
Time = 2.61 (sec) , antiderivative size = 212, normalized size of antiderivative = 1.88 \[ \int \csc ^4(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {(b+a \cot (c+d x))^3 \sec ^2(c+d x) \left (-16 a^3 \cos (c+d x)-2 \sin (c+d x) \left (18 a^2 b-6 b^3+6 \left (3 a^2 b+b^3\right ) \cos (2 (c+d x))+9 a^2 b \log (\cos (c+d x))+3 b^3 \log (\cos (c+d x))-3 b \left (3 a^2+b^2\right ) \cos (4 (c+d x)) (\log (\cos (c+d x))-\log (\sin (c+d x)))-9 a^2 b \log (\sin (c+d x))-3 b^3 \log (\sin (c+d x))+2 a^3 \sin (4 (c+d x))+18 a b^2 \sin (4 (c+d x))\right )\right )}{48 d (a \cos (c+d x)+b \sin (c+d x))^3} \] Input:
Integrate[Csc[c + d*x]^4*(a + b*Tan[c + d*x])^3,x]
Output:
((b + a*Cot[c + d*x])^3*Sec[c + d*x]^2*(-16*a^3*Cos[c + d*x] - 2*Sin[c + d *x]*(18*a^2*b - 6*b^3 + 6*(3*a^2*b + b^3)*Cos[2*(c + d*x)] + 9*a^2*b*Log[C os[c + d*x]] + 3*b^3*Log[Cos[c + d*x]] - 3*b*(3*a^2 + b^2)*Cos[4*(c + d*x) ]*(Log[Cos[c + d*x]] - Log[Sin[c + d*x]]) - 9*a^2*b*Log[Sin[c + d*x]] - 3* b^3*Log[Sin[c + d*x]] + 2*a^3*Sin[4*(c + d*x)] + 18*a*b^2*Sin[4*(c + d*x)] )))/(48*d*(a*Cos[c + d*x] + b*Sin[c + d*x])^3)
Time = 0.30 (sec) , antiderivative size = 104, normalized size of antiderivative = 0.92, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3042, 3999, 522, 2009}
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 \csc ^4(c+d x) (a+b \tan (c+d x))^3 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a+b \tan (c+d x))^3}{\sin (c+d x)^4}dx\) |
\(\Big \downarrow \) 3999 |
\(\displaystyle \frac {b \int \frac {\cot ^4(c+d x) (a+b \tan (c+d x))^3 \left (\tan ^2(c+d x) b^2+b^2\right )}{b^4}d(b \tan (c+d x))}{d}\) |
\(\Big \downarrow \) 522 |
\(\displaystyle \frac {b \int \left (\frac {a^3 \cot ^4(c+d x)}{b^2}+\frac {3 a^2 \cot ^3(c+d x)}{b}+\frac {\left (a^3+3 b^2 a\right ) \cot ^2(c+d x)}{b^2}+\frac {\left (3 a^2+b^2\right ) \cot (c+d x)}{b}+3 a+b \tan (c+d x)\right )d(b \tan (c+d x))}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {b \left (-\frac {a^3 \cot ^3(c+d x)}{3 b}-\frac {a \left (a^2+3 b^2\right ) \cot (c+d x)}{b}+\left (3 a^2+b^2\right ) \log (b \tan (c+d x))-\frac {3}{2} a^2 \cot ^2(c+d x)+3 a b \tan (c+d x)+\frac {1}{2} b^2 \tan ^2(c+d x)\right )}{d}\) |
Input:
Int[Csc[c + d*x]^4*(a + b*Tan[c + d*x])^3,x]
Output:
(b*(-((a*(a^2 + 3*b^2)*Cot[c + d*x])/b) - (3*a^2*Cot[c + d*x]^2)/2 - (a^3* Cot[c + d*x]^3)/(3*b) + (3*a^2 + b^2)*Log[b*Tan[c + d*x]] + 3*a*b*Tan[c + d*x] + (b^2*Tan[c + d*x]^2)/2))/d
Int[((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_. ), x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(c + d*x)^n*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && IGtQ[p, 0]
Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_ ), x_Symbol] :> Simp[b/f Subst[Int[x^m*((a + x)^n/(b^2 + x^2)^(m/2 + 1)), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && IntegerQ[m/2]
Time = 10.04 (sec) , antiderivative size = 106, normalized size of antiderivative = 0.94
method | result | size |
derivativedivides | \(\frac {b^{3} \left (\frac {1}{2 \cos \left (d x +c \right )^{2}}+\ln \left (\tan \left (d x +c \right )\right )\right )+3 a \,b^{2} \left (\frac {1}{\sin \left (d x +c \right ) \cos \left (d x +c \right )}-2 \cot \left (d x +c \right )\right )+3 a^{2} b \left (-\frac {1}{2 \sin \left (d x +c \right )^{2}}+\ln \left (\tan \left (d x +c \right )\right )\right )+a^{3} \left (-\frac {2}{3}-\frac {\csc \left (d x +c \right )^{2}}{3}\right ) \cot \left (d x +c \right )}{d}\) | \(106\) |
default | \(\frac {b^{3} \left (\frac {1}{2 \cos \left (d x +c \right )^{2}}+\ln \left (\tan \left (d x +c \right )\right )\right )+3 a \,b^{2} \left (\frac {1}{\sin \left (d x +c \right ) \cos \left (d x +c \right )}-2 \cot \left (d x +c \right )\right )+3 a^{2} b \left (-\frac {1}{2 \sin \left (d x +c \right )^{2}}+\ln \left (\tan \left (d x +c \right )\right )\right )+a^{3} \left (-\frac {2}{3}-\frac {\csc \left (d x +c \right )^{2}}{3}\right ) \cot \left (d x +c \right )}{d}\) | \(106\) |
risch | \(\frac {6 a^{2} b \,{\mathrm e}^{8 i \left (d x +c \right )}+2 b^{3} {\mathrm e}^{8 i \left (d x +c \right )}+\frac {4 i a^{3} {\mathrm e}^{2 i \left (d x +c \right )}}{3}+4 i a^{3} {\mathrm e}^{6 i \left (d x +c \right )}+6 a^{2} b \,{\mathrm e}^{6 i \left (d x +c \right )}-6 b^{3} {\mathrm e}^{6 i \left (d x +c \right )}+\frac {20 i a^{3} {\mathrm e}^{4 i \left (d x +c \right )}}{3}-\frac {4 i a^{3}}{3}-6 a^{2} b \,{\mathrm e}^{4 i \left (d x +c \right )}+6 b^{3} {\mathrm e}^{4 i \left (d x +c \right )}+12 i a \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+12 i a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}-6 a^{2} b \,{\mathrm e}^{2 i \left (d x +c \right )}-2 b^{3} {\mathrm e}^{2 i \left (d x +c \right )}-12 i a \,b^{2}-12 i a \,b^{2} {\mathrm e}^{6 i \left (d x +c \right )}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2} \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{3}}+\frac {3 a^{2} b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d}+\frac {b^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d}-\frac {3 a^{2} b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}-\frac {b^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) | \(337\) |
Input:
int(csc(d*x+c)^4*(a+b*tan(d*x+c))^3,x,method=_RETURNVERBOSE)
Output:
1/d*(b^3*(1/2/cos(d*x+c)^2+ln(tan(d*x+c)))+3*a*b^2*(1/sin(d*x+c)/cos(d*x+c )-2*cot(d*x+c))+3*a^2*b*(-1/2/sin(d*x+c)^2+ln(tan(d*x+c)))+a^3*(-2/3-1/3*c sc(d*x+c)^2)*cot(d*x+c))
Leaf count of result is larger than twice the leaf count of optimal. 237 vs. \(2 (107) = 214\).
Time = 0.10 (sec) , antiderivative size = 237, normalized size of antiderivative = 2.10 \[ \int \csc ^4(c+d x) (a+b \tan (c+d x))^3 \, dx=-\frac {4 \, {\left (a^{3} + 9 \, a b^{2}\right )} \cos \left (d x + c\right )^{5} + 18 \, a b^{2} \cos \left (d x + c\right ) - 6 \, {\left (a^{3} + 9 \, a b^{2}\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left ({\left (3 \, a^{2} b + b^{3}\right )} \cos \left (d x + c\right )^{4} - {\left (3 \, a^{2} b + b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (\cos \left (d x + c\right )^{2}\right ) \sin \left (d x + c\right ) - 3 \, {\left ({\left (3 \, a^{2} b + b^{3}\right )} \cos \left (d x + c\right )^{4} - {\left (3 \, a^{2} b + b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (-\frac {1}{4} \, \cos \left (d x + c\right )^{2} + \frac {1}{4}\right ) \sin \left (d x + c\right ) + 3 \, {\left (b^{3} - {\left (3 \, a^{2} b + b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{6 \, {\left (d \cos \left (d x + c\right )^{4} - d \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )} \] Input:
integrate(csc(d*x+c)^4*(a+b*tan(d*x+c))^3,x, algorithm="fricas")
Output:
-1/6*(4*(a^3 + 9*a*b^2)*cos(d*x + c)^5 + 18*a*b^2*cos(d*x + c) - 6*(a^3 + 9*a*b^2)*cos(d*x + c)^3 + 3*((3*a^2*b + b^3)*cos(d*x + c)^4 - (3*a^2*b + b ^3)*cos(d*x + c)^2)*log(cos(d*x + c)^2)*sin(d*x + c) - 3*((3*a^2*b + b^3)* cos(d*x + c)^4 - (3*a^2*b + b^3)*cos(d*x + c)^2)*log(-1/4*cos(d*x + c)^2 + 1/4)*sin(d*x + c) + 3*(b^3 - (3*a^2*b + b^3)*cos(d*x + c)^2)*sin(d*x + c) )/((d*cos(d*x + c)^4 - d*cos(d*x + c)^2)*sin(d*x + c))
\[ \int \csc ^4(c+d x) (a+b \tan (c+d x))^3 \, dx=\int \left (a + b \tan {\left (c + d x \right )}\right )^{3} \csc ^{4}{\left (c + d x \right )}\, dx \] Input:
integrate(csc(d*x+c)**4*(a+b*tan(d*x+c))**3,x)
Output:
Integral((a + b*tan(c + d*x))**3*csc(c + d*x)**4, x)
Time = 0.05 (sec) , antiderivative size = 98, normalized size of antiderivative = 0.87 \[ \int \csc ^4(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {3 \, b^{3} \tan \left (d x + c\right )^{2} + 18 \, a b^{2} \tan \left (d x + c\right ) + 6 \, {\left (3 \, a^{2} b + b^{3}\right )} \log \left (\tan \left (d x + c\right )\right ) - \frac {9 \, a^{2} b \tan \left (d x + c\right ) + 2 \, a^{3} + 6 \, {\left (a^{3} + 3 \, a b^{2}\right )} \tan \left (d x + c\right )^{2}}{\tan \left (d x + c\right )^{3}}}{6 \, d} \] Input:
integrate(csc(d*x+c)^4*(a+b*tan(d*x+c))^3,x, algorithm="maxima")
Output:
1/6*(3*b^3*tan(d*x + c)^2 + 18*a*b^2*tan(d*x + c) + 6*(3*a^2*b + b^3)*log( tan(d*x + c)) - (9*a^2*b*tan(d*x + c) + 2*a^3 + 6*(a^3 + 3*a*b^2)*tan(d*x + c)^2)/tan(d*x + c)^3)/d
Time = 0.21 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.88 \[ \int \csc ^4(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {3 \, b^{3} \tan \left (d x + c\right )^{2} + 18 \, a b^{2} \tan \left (d x + c\right ) + 6 \, {\left (3 \, a^{2} b + b^{3}\right )} \log \left ({\left | \tan \left (d x + c\right ) \right |}\right ) - \frac {9 \, a^{2} b \tan \left (d x + c\right ) + 2 \, a^{3} + 6 \, {\left (a^{3} + 3 \, a b^{2}\right )} \tan \left (d x + c\right )^{2}}{\tan \left (d x + c\right )^{3}}}{6 \, d} \] Input:
integrate(csc(d*x+c)^4*(a+b*tan(d*x+c))^3,x, algorithm="giac")
Output:
1/6*(3*b^3*tan(d*x + c)^2 + 18*a*b^2*tan(d*x + c) + 6*(3*a^2*b + b^3)*log( abs(tan(d*x + c))) - (9*a^2*b*tan(d*x + c) + 2*a^3 + 6*(a^3 + 3*a*b^2)*tan (d*x + c)^2)/tan(d*x + c)^3)/d
Time = 0.79 (sec) , antiderivative size = 103, normalized size of antiderivative = 0.91 \[ \int \csc ^4(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )\right )\,\left (3\,a^2\,b+b^3\right )}{d}-\frac {{\mathrm {cot}\left (c+d\,x\right )}^3\,\left (\frac {a^3}{3}+{\mathrm {tan}\left (c+d\,x\right )}^2\,\left (a^3+3\,a\,b^2\right )+\frac {3\,a^2\,b\,\mathrm {tan}\left (c+d\,x\right )}{2}\right )}{d}+\frac {b^3\,{\mathrm {tan}\left (c+d\,x\right )}^2}{2\,d}+\frac {3\,a\,b^2\,\mathrm {tan}\left (c+d\,x\right )}{d} \] Input:
int((a + b*tan(c + d*x))^3/sin(c + d*x)^4,x)
Output:
(log(tan(c + d*x))*(3*a^2*b + b^3))/d - (cot(c + d*x)^3*(a^3/3 + tan(c + d *x)^2*(3*a*b^2 + a^3) + (3*a^2*b*tan(c + d*x))/2))/d + (b^3*tan(c + d*x)^2 )/(2*d) + (3*a*b^2*tan(c + d*x))/d
Time = 0.22 (sec) , antiderivative size = 452, normalized size of antiderivative = 4.00 \[ \int \csc ^4(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {-4 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4} a^{3}-36 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4} a \,b^{2}+2 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} a^{3}+18 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} a \,b^{2}+2 \cos \left (d x +c \right ) a^{3}-18 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{5} a^{2} b -6 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{5} b^{3}+18 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{3} a^{2} b +6 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{3} b^{3}-18 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{5} a^{2} b -6 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{5} b^{3}+18 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{3} a^{2} b +6 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{3} b^{3}+18 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{5} a^{2} b +6 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{5} b^{3}-18 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{3} a^{2} b -6 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right )^{3} b^{3}-3 \sin \left (d x +c \right )^{5} b^{3}-9 \sin \left (d x +c \right )^{3} a^{2} b +9 \sin \left (d x +c \right ) a^{2} b}{6 \sin \left (d x +c \right )^{3} d \left (\sin \left (d x +c \right )^{2}-1\right )} \] Input:
int(csc(d*x+c)^4*(a+b*tan(d*x+c))^3,x)
Output:
( - 4*cos(c + d*x)*sin(c + d*x)**4*a**3 - 36*cos(c + d*x)*sin(c + d*x)**4* a*b**2 + 2*cos(c + d*x)*sin(c + d*x)**2*a**3 + 18*cos(c + d*x)*sin(c + d*x )**2*a*b**2 + 2*cos(c + d*x)*a**3 - 18*log(tan((c + d*x)/2) - 1)*sin(c + d *x)**5*a**2*b - 6*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**5*b**3 + 18*log( tan((c + d*x)/2) - 1)*sin(c + d*x)**3*a**2*b + 6*log(tan((c + d*x)/2) - 1) *sin(c + d*x)**3*b**3 - 18*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**5*a**2* b - 6*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**5*b**3 + 18*log(tan((c + d*x )/2) + 1)*sin(c + d*x)**3*a**2*b + 6*log(tan((c + d*x)/2) + 1)*sin(c + d*x )**3*b**3 + 18*log(tan((c + d*x)/2))*sin(c + d*x)**5*a**2*b + 6*log(tan((c + d*x)/2))*sin(c + d*x)**5*b**3 - 18*log(tan((c + d*x)/2))*sin(c + d*x)** 3*a**2*b - 6*log(tan((c + d*x)/2))*sin(c + d*x)**3*b**3 - 3*sin(c + d*x)** 5*b**3 - 9*sin(c + d*x)**3*a**2*b + 9*sin(c + d*x)*a**2*b)/(6*sin(c + d*x) **3*d*(sin(c + d*x)**2 - 1))