Integrand size = 21, antiderivative size = 64 \[ \int \csc ^2(c+d x) (a+b \tan (c+d x))^3 \, dx=-\frac {a^3 \cot (c+d x)}{d}+\frac {3 a^2 b \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^3*cot(d*x+c)/d+3*a^2*b*ln(tan(d*x+c))/d+3*a*b^2*tan(d*x+c)/d+1/2*b^3*ta n(d*x+c)^2/d
Time = 1.64 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.97 \[ \int \csc ^2(c+d x) (a+b \tan (c+d x))^3 \, dx=-\frac {\csc (c+d x) \sec ^2(c+d x) \left (3 a \left (a^2-b^2\right ) \cos (c+d x)+\left (a^3+3 a b^2\right ) \cos (3 (c+d x))-2 b \left (b^2-3 a^2 \log (\cos (c+d x))-3 a^2 \cos (2 (c+d x)) (\log (\cos (c+d x))-\log (\sin (c+d x)))+3 a^2 \log (\sin (c+d x))\right ) \sin (c+d x)\right )}{4 d} \] Input:
Integrate[Csc[c + d*x]^2*(a + b*Tan[c + d*x])^3,x]
Output:
-1/4*(Csc[c + d*x]*Sec[c + d*x]^2*(3*a*(a^2 - b^2)*Cos[c + d*x] + (a^3 + 3 *a*b^2)*Cos[3*(c + d*x)] - 2*b*(b^2 - 3*a^2*Log[Cos[c + d*x]] - 3*a^2*Cos[ 2*(c + d*x)]*(Log[Cos[c + d*x]] - Log[Sin[c + d*x]]) + 3*a^2*Log[Sin[c + d *x]])*Sin[c + d*x]))/d
Time = 0.25 (sec) , antiderivative size = 59, 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, 49, 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 ^2(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)^2}dx\) |
\(\Big \downarrow \) 3999 |
\(\displaystyle \frac {b \int \frac {\cot ^2(c+d x) (a+b \tan (c+d x))^3}{b^2}d(b \tan (c+d x))}{d}\) |
\(\Big \downarrow \) 49 |
\(\displaystyle \frac {b \int \left (\frac {\cot ^2(c+d x) a^3}{b^2}+\frac {3 \cot (c+d x) a^2}{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 (c+d x)}{b}+3 a^2 \log (b \tan (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]^2*(a + b*Tan[c + d*x])^3,x]
Output:
(b*(-((a^3*Cot[c + d*x])/b) + 3*a^2*Log[b*Tan[c + d*x]] + 3*a*b*Tan[c + d* x] + (b^2*Tan[c + d*x]^2)/2))/d
Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int [ExpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && IGtQ[m, 0] && IGtQ[m + n + 2, 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 = 3.61 (sec) , antiderivative size = 55, normalized size of antiderivative = 0.86
method | result | size |
derivativedivides | \(\frac {\frac {b^{3}}{2 \cos \left (d x +c \right )^{2}}+3 \tan \left (d x +c \right ) a \,b^{2}+3 a^{2} b \ln \left (\tan \left (d x +c \right )\right )-\cot \left (d x +c \right ) a^{3}}{d}\) | \(55\) |
default | \(\frac {\frac {b^{3}}{2 \cos \left (d x +c \right )^{2}}+3 \tan \left (d x +c \right ) a \,b^{2}+3 a^{2} b \ln \left (\tan \left (d x +c \right )\right )-\cot \left (d x +c \right ) a^{3}}{d}\) | \(55\) |
risch | \(\frac {-2 i a^{3} {\mathrm e}^{4 i \left (d x +c \right )}+6 i a \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+2 b^{3} {\mathrm e}^{4 i \left (d x +c \right )}-4 i a^{3} {\mathrm e}^{2 i \left (d x +c \right )}-2 b^{3} {\mathrm e}^{2 i \left (d x +c \right )}-2 i a^{3}-6 i a \,b^{2}}{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 )}+\frac {3 a^{2} b \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}\) | \(162\) |
Input:
int(csc(d*x+c)^2*(a+b*tan(d*x+c))^3,x,method=_RETURNVERBOSE)
Output:
1/d*(1/2*b^3/cos(d*x+c)^2+3*tan(d*x+c)*a*b^2+3*a^2*b*ln(tan(d*x+c))-cot(d* x+c)*a^3)
Leaf count of result is larger than twice the leaf count of optimal. 127 vs. \(2 (62) = 124\).
Time = 0.11 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.98 \[ \int \csc ^2(c+d x) (a+b \tan (c+d x))^3 \, dx=-\frac {3 \, a^{2} b \cos \left (d x + c\right )^{2} \log \left (\cos \left (d x + c\right )^{2}\right ) \sin \left (d x + c\right ) - 3 \, a^{2} b \cos \left (d x + c\right )^{2} \log \left (-\frac {1}{4} \, \cos \left (d x + c\right )^{2} + \frac {1}{4}\right ) \sin \left (d x + c\right ) - 6 \, a b^{2} \cos \left (d x + c\right ) + 2 \, {\left (a^{3} + 3 \, a b^{2}\right )} \cos \left (d x + c\right )^{3} - b^{3} \sin \left (d x + c\right )}{2 \, d \cos \left (d x + c\right )^{2} \sin \left (d x + c\right )} \] Input:
integrate(csc(d*x+c)^2*(a+b*tan(d*x+c))^3,x, algorithm="fricas")
Output:
-1/2*(3*a^2*b*cos(d*x + c)^2*log(cos(d*x + c)^2)*sin(d*x + c) - 3*a^2*b*co s(d*x + c)^2*log(-1/4*cos(d*x + c)^2 + 1/4)*sin(d*x + c) - 6*a*b^2*cos(d*x + c) + 2*(a^3 + 3*a*b^2)*cos(d*x + c)^3 - b^3*sin(d*x + c))/(d*cos(d*x + c)^2*sin(d*x + c))
\[ \int \csc ^2(c+d x) (a+b \tan (c+d x))^3 \, dx=\int \left (a + b \tan {\left (c + d x \right )}\right )^{3} \csc ^{2}{\left (c + d x \right )}\, dx \] Input:
integrate(csc(d*x+c)**2*(a+b*tan(d*x+c))**3,x)
Output:
Integral((a + b*tan(c + d*x))**3*csc(c + d*x)**2, x)
Time = 0.03 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.88 \[ \int \csc ^2(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {b^{3} \tan \left (d x + c\right )^{2} + 6 \, a^{2} b \log \left (\tan \left (d x + c\right )\right ) + 6 \, a b^{2} \tan \left (d x + c\right ) - \frac {2 \, a^{3}}{\tan \left (d x + c\right )}}{2 \, d} \] Input:
integrate(csc(d*x+c)^2*(a+b*tan(d*x+c))^3,x, algorithm="maxima")
Output:
1/2*(b^3*tan(d*x + c)^2 + 6*a^2*b*log(tan(d*x + c)) + 6*a*b^2*tan(d*x + c) - 2*a^3/tan(d*x + c))/d
Time = 0.20 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.89 \[ \int \csc ^2(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {b^{3} \tan \left (d x + c\right )^{2} + 6 \, a^{2} b \log \left ({\left | \tan \left (d x + c\right ) \right |}\right ) + 6 \, a b^{2} \tan \left (d x + c\right ) - \frac {2 \, a^{3}}{\tan \left (d x + c\right )}}{2 \, d} \] Input:
integrate(csc(d*x+c)^2*(a+b*tan(d*x+c))^3,x, algorithm="giac")
Output:
1/2*(b^3*tan(d*x + c)^2 + 6*a^2*b*log(abs(tan(d*x + c))) + 6*a*b^2*tan(d*x + c) - 2*a^3/tan(d*x + c))/d
Time = 0.81 (sec) , antiderivative size = 62, normalized size of antiderivative = 0.97 \[ \int \csc ^2(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {b^3\,{\mathrm {tan}\left (c+d\,x\right )}^2}{2\,d}-\frac {a^3\,\mathrm {cot}\left (c+d\,x\right )}{d}+\frac {3\,a^2\,b\,\ln \left (\mathrm {tan}\left (c+d\,x\right )\right )}{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)^2,x)
Output:
(b^3*tan(c + d*x)^2)/(2*d) - (a^3*cot(c + d*x))/d + (3*a^2*b*log(tan(c + d *x)))/d + (3*a*b^2*tan(c + d*x))/d
Time = 0.23 (sec) , antiderivative size = 235, normalized size of antiderivative = 3.67 \[ \int \csc ^2(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {-2 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} a^{3}-6 \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}-6 \,\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 ) 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} 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 ) 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} a^{2} b -6 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \sin \left (d x +c \right ) a^{2} b -\sin \left (d x +c \right )^{3} b^{3}}{2 \sin \left (d x +c \right ) d \left (\sin \left (d x +c \right )^{2}-1\right )} \] Input:
int(csc(d*x+c)^2*(a+b*tan(d*x+c))^3,x)
Output:
( - 2*cos(c + d*x)*sin(c + d*x)**2*a**3 - 6*cos(c + d*x)*sin(c + d*x)**2*a *b**2 + 2*cos(c + d*x)*a**3 - 6*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)*a**2*b - 6*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)*a**2*b + 6*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)*a**2*b - sin(c + d*x)**3*b**3)/(2*sin(c + d*x)*d *(sin(c + d*x)**2 - 1))