Integrand size = 21, antiderivative size = 116 \[ \int \frac {\csc ^2(c+d x)}{(a+b \tan (c+d x))^4} \, dx=-\frac {\cot (c+d x)}{a^4 d}-\frac {4 b \log (\tan (c+d x))}{a^5 d}+\frac {4 b \log (a+b \tan (c+d x))}{a^5 d}-\frac {b}{3 a^2 d (a+b \tan (c+d x))^3}-\frac {b}{a^3 d (a+b \tan (c+d x))^2}-\frac {3 b}{a^4 d (a+b \tan (c+d x))} \] Output:
-cot(d*x+c)/a^4/d-4*b*ln(tan(d*x+c))/a^5/d+4*b*ln(a+b*tan(d*x+c))/a^5/d-1/ 3*b/a^2/d/(a+b*tan(d*x+c))^3-b/a^3/d/(a+b*tan(d*x+c))^2-3*b/a^4/d/(a+b*tan (d*x+c))
Leaf count is larger than twice the leaf count of optimal. \(259\) vs. \(2(116)=232\).
Time = 2.08 (sec) , antiderivative size = 259, normalized size of antiderivative = 2.23 \[ \int \frac {\csc ^2(c+d x)}{(a+b \tan (c+d x))^4} \, dx=\frac {\sec ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x)) \left (-3 a (b+a \cot (c+d x))^3 \sin ^2(c+d x)+\frac {a^2 b^4 \tan (c+d x)}{a^2+b^2}+\frac {b^2 \left (18 a^4+23 a^2 b^2+9 b^4\right ) (a \cos (c+d x)+b \sin (c+d x))^2 \tan (c+d x)}{\left (a^2+b^2\right )^2}-\frac {2 a^2 b^3 \left (3 a^2+2 b^2\right ) (a+b \tan (c+d x))}{\left (a^2+b^2\right )^2}-12 b \cos ^2(c+d x) \log (\sin (c+d x)) (a+b \tan (c+d x))^3+12 b \cos ^2(c+d x) \log (a \cos (c+d x)+b \sin (c+d x)) (a+b \tan (c+d x))^3\right )}{3 a^5 d (a+b \tan (c+d x))^4} \] Input:
Integrate[Csc[c + d*x]^2/(a + b*Tan[c + d*x])^4,x]
Output:
(Sec[c + d*x]^3*(a*Cos[c + d*x] + b*Sin[c + d*x])*(-3*a*(b + a*Cot[c + d*x ])^3*Sin[c + d*x]^2 + (a^2*b^4*Tan[c + d*x])/(a^2 + b^2) + (b^2*(18*a^4 + 23*a^2*b^2 + 9*b^4)*(a*Cos[c + d*x] + b*Sin[c + d*x])^2*Tan[c + d*x])/(a^2 + b^2)^2 - (2*a^2*b^3*(3*a^2 + 2*b^2)*(a + b*Tan[c + d*x]))/(a^2 + b^2)^2 - 12*b*Cos[c + d*x]^2*Log[Sin[c + d*x]]*(a + b*Tan[c + d*x])^3 + 12*b*Cos [c + d*x]^2*Log[a*Cos[c + d*x] + b*Sin[c + d*x]]*(a + b*Tan[c + d*x])^3))/ (3*a^5*d*(a + b*Tan[c + d*x])^4)
Time = 0.32 (sec) , antiderivative size = 103, normalized size of antiderivative = 0.89, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3042, 3999, 54, 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 \frac {\csc ^2(c+d x)}{(a+b \tan (c+d x))^4} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\sin (c+d x)^2 (a+b \tan (c+d x))^4}dx\) |
\(\Big \downarrow \) 3999 |
\(\displaystyle \frac {b \int \frac {\cot ^2(c+d x)}{b^2 (a+b \tan (c+d x))^4}d(b \tan (c+d x))}{d}\) |
\(\Big \downarrow \) 54 |
\(\displaystyle \frac {b \int \left (\frac {\cot ^2(c+d x)}{a^4 b^2}-\frac {4 \cot (c+d x)}{a^5 b}+\frac {4}{a^5 (a+b \tan (c+d x))}+\frac {3}{a^4 (a+b \tan (c+d x))^2}+\frac {2}{a^3 (a+b \tan (c+d x))^3}+\frac {1}{a^2 (a+b \tan (c+d x))^4}\right )d(b \tan (c+d x))}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {b \left (-\frac {4 \log (b \tan (c+d x))}{a^5}+\frac {4 \log (a+b \tan (c+d x))}{a^5}-\frac {3}{a^4 (a+b \tan (c+d x))}-\frac {\cot (c+d x)}{a^4 b}-\frac {1}{a^3 (a+b \tan (c+d x))^2}-\frac {1}{3 a^2 (a+b \tan (c+d x))^3}\right )}{d}\) |
Input:
Int[Csc[c + d*x]^2/(a + b*Tan[c + d*x])^4,x]
Output:
(b*(-(Cot[c + d*x]/(a^4*b)) - (4*Log[b*Tan[c + d*x]])/a^5 + (4*Log[a + b*T an[c + d*x]])/a^5 - 1/(3*a^2*(a + b*Tan[c + d*x])^3) - 1/(a^3*(a + b*Tan[c + d*x])^2) - 3/(a^4*(a + b*Tan[c + d*x]))))/d
Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[E xpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && ILtQ[m, 0] && IntegerQ[n] && !(IGtQ[n, 0] && LtQ[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.73 (sec) , antiderivative size = 103, normalized size of antiderivative = 0.89
method | result | size |
derivativedivides | \(\frac {-\frac {b}{3 a^{2} \left (a +b \tan \left (d x +c \right )\right )^{3}}+\frac {4 b \ln \left (a +b \tan \left (d x +c \right )\right )}{a^{5}}-\frac {3 b}{a^{4} \left (a +b \tan \left (d x +c \right )\right )}-\frac {b}{a^{3} \left (a +b \tan \left (d x +c \right )\right )^{2}}-\frac {1}{a^{4} \tan \left (d x +c \right )}-\frac {4 b \ln \left (\tan \left (d x +c \right )\right )}{a^{5}}}{d}\) | \(103\) |
default | \(\frac {-\frac {b}{3 a^{2} \left (a +b \tan \left (d x +c \right )\right )^{3}}+\frac {4 b \ln \left (a +b \tan \left (d x +c \right )\right )}{a^{5}}-\frac {3 b}{a^{4} \left (a +b \tan \left (d x +c \right )\right )}-\frac {b}{a^{3} \left (a +b \tan \left (d x +c \right )\right )^{2}}-\frac {1}{a^{4} \tan \left (d x +c \right )}-\frac {4 b \ln \left (\tan \left (d x +c \right )\right )}{a^{5}}}{d}\) | \(103\) |
risch | \(-\frac {2 i \left (36 i a^{5} b \,{\mathrm e}^{4 i \left (d x +c \right )}+60 i a \,b^{5} {\mathrm e}^{2 i \left (d x +c \right )}+18 i a^{5} b \,{\mathrm e}^{2 i \left (d x +c \right )}-3 a^{6} {\mathrm e}^{6 i \left (d x +c \right )}+63 a^{4} b^{2} {\mathrm e}^{6 i \left (d x +c \right )}-120 a^{2} b^{4} {\mathrm e}^{6 i \left (d x +c \right )}+12 b^{6} {\mathrm e}^{6 i \left (d x +c \right )}+60 i a \,b^{5} {\mathrm e}^{6 i \left (d x +c \right )}+96 i a^{3} b^{3} {\mathrm e}^{2 i \left (d x +c \right )}-9 a^{6} {\mathrm e}^{4 i \left (d x +c \right )}+63 a^{4} b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+120 a^{2} b^{4} {\mathrm e}^{4 i \left (d x +c \right )}-36 b^{6} {\mathrm e}^{4 i \left (d x +c \right )}+18 i a^{5} b \,{\mathrm e}^{6 i \left (d x +c \right )}-120 i a^{3} b^{3} {\mathrm e}^{6 i \left (d x +c \right )}-120 i a \,b^{5} {\mathrm e}^{4 i \left (d x +c \right )}-9 a^{6} {\mathrm e}^{2 i \left (d x +c \right )}-27 a^{4} b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+32 a^{2} b^{4} {\mathrm e}^{2 i \left (d x +c \right )}+36 b^{6} {\mathrm e}^{2 i \left (d x +c \right )}-3 a^{6}-27 a^{4} b^{2}-32 a^{2} b^{4}-12 b^{6}\right )}{3 \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right ) \left (b \,{\mathrm e}^{2 i \left (d x +c \right )}+i a \,{\mathrm e}^{2 i \left (d x +c \right )}-b +i a \right )^{3} \left (i a +b \right )^{3} a^{4} d}-\frac {4 b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{a^{5} d}+\frac {4 b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right )}{a^{5} d}\) | \(470\) |
Input:
int(csc(d*x+c)^2/(a+b*tan(d*x+c))^4,x,method=_RETURNVERBOSE)
Output:
1/d*(-1/3*b/a^2/(a+b*tan(d*x+c))^3+4/a^5*b*ln(a+b*tan(d*x+c))-3/a^4*b/(a+b *tan(d*x+c))-1/a^3*b/(a+b*tan(d*x+c))^2-1/a^4/tan(d*x+c)-4/a^5*b*ln(tan(d* x+c)))
Leaf count of result is larger than twice the leaf count of optimal. 874 vs. \(2 (114) = 228\).
Time = 0.16 (sec) , antiderivative size = 874, normalized size of antiderivative = 7.53 \[ \int \frac {\csc ^2(c+d x)}{(a+b \tan (c+d x))^4} \, dx =\text {Too large to display} \] Input:
integrate(csc(d*x+c)^2/(a+b*tan(d*x+c))^4,x, algorithm="fricas")
Output:
-1/3*(13*a^6*b^4 + 15*a^4*b^6 + 6*a^2*b^8 - (3*a^10 + 18*a^8*b^2 - 49*a^6* b^4 - 84*a^4*b^6 - 36*a^2*b^8)*cos(d*x + c)^4 + (9*a^8*b^2 - 71*a^6*b^4 - 102*a^4*b^6 - 42*a^2*b^8)*cos(d*x + c)^2 + 6*(a^6*b^4 + 3*a^4*b^6 + 3*a^2* b^8 + b^10 - (3*a^8*b^2 + 8*a^6*b^4 + 6*a^4*b^6 - b^10)*cos(d*x + c)^4 + ( 3*a^8*b^2 + 7*a^6*b^4 + 3*a^4*b^6 - 3*a^2*b^8 - 2*b^10)*cos(d*x + c)^2 + ( (a^9*b - 6*a^5*b^5 - 8*a^3*b^7 - 3*a*b^9)*cos(d*x + c)^3 + 3*(a^7*b^3 + 3* a^5*b^5 + 3*a^3*b^7 + a*b^9)*cos(d*x + c))*sin(d*x + c))*log(2*a*b*cos(d*x + c)*sin(d*x + c) + (a^2 - b^2)*cos(d*x + c)^2 + b^2) - 6*(a^6*b^4 + 3*a^ 4*b^6 + 3*a^2*b^8 + b^10 - (3*a^8*b^2 + 8*a^6*b^4 + 6*a^4*b^6 - b^10)*cos( d*x + c)^4 + (3*a^8*b^2 + 7*a^6*b^4 + 3*a^4*b^6 - 3*a^2*b^8 - 2*b^10)*cos( d*x + c)^2 + ((a^9*b - 6*a^5*b^5 - 8*a^3*b^7 - 3*a*b^9)*cos(d*x + c)^3 + 3 *(a^7*b^3 + 3*a^5*b^5 + 3*a^3*b^7 + a*b^9)*cos(d*x + c))*sin(d*x + c))*log (-1/4*cos(d*x + c)^2 + 1/4) - ((9*a^9*b + 78*a^7*b^3 + 69*a^5*b^5 + 4*a^3* b^7 - 12*a*b^9)*cos(d*x + c)^3 - 3*(9*a^7*b^3 + 3*a^5*b^5 - 6*a^3*b^7 - 4* a*b^9)*cos(d*x + c))*sin(d*x + c))/((3*a^13*b + 8*a^11*b^3 + 6*a^9*b^5 - a ^5*b^9)*d*cos(d*x + c)^4 - (3*a^13*b + 7*a^11*b^3 + 3*a^9*b^5 - 3*a^7*b^7 - 2*a^5*b^9)*d*cos(d*x + c)^2 - (a^11*b^3 + 3*a^9*b^5 + 3*a^7*b^7 + a^5*b^ 9)*d - ((a^14 - 6*a^10*b^4 - 8*a^8*b^6 - 3*a^6*b^8)*d*cos(d*x + c)^3 + 3*( a^12*b^2 + 3*a^10*b^4 + 3*a^8*b^6 + a^6*b^8)*d*cos(d*x + c))*sin(d*x + c))
\[ \int \frac {\csc ^2(c+d x)}{(a+b \tan (c+d x))^4} \, dx=\int \frac {\csc ^{2}{\left (c + d x \right )}}{\left (a + b \tan {\left (c + d x \right )}\right )^{4}}\, dx \] Input:
integrate(csc(d*x+c)**2/(a+b*tan(d*x+c))**4,x)
Output:
Integral(csc(c + d*x)**2/(a + b*tan(c + d*x))**4, x)
Time = 0.05 (sec) , antiderivative size = 140, normalized size of antiderivative = 1.21 \[ \int \frac {\csc ^2(c+d x)}{(a+b \tan (c+d x))^4} \, dx=-\frac {\frac {12 \, b^{3} \tan \left (d x + c\right )^{3} + 30 \, a b^{2} \tan \left (d x + c\right )^{2} + 22 \, a^{2} b \tan \left (d x + c\right ) + 3 \, a^{3}}{a^{4} b^{3} \tan \left (d x + c\right )^{4} + 3 \, a^{5} b^{2} \tan \left (d x + c\right )^{3} + 3 \, a^{6} b \tan \left (d x + c\right )^{2} + a^{7} \tan \left (d x + c\right )} - \frac {12 \, b \log \left (b \tan \left (d x + c\right ) + a\right )}{a^{5}} + \frac {12 \, b \log \left (\tan \left (d x + c\right )\right )}{a^{5}}}{3 \, d} \] Input:
integrate(csc(d*x+c)^2/(a+b*tan(d*x+c))^4,x, algorithm="maxima")
Output:
-1/3*((12*b^3*tan(d*x + c)^3 + 30*a*b^2*tan(d*x + c)^2 + 22*a^2*b*tan(d*x + c) + 3*a^3)/(a^4*b^3*tan(d*x + c)^4 + 3*a^5*b^2*tan(d*x + c)^3 + 3*a^6*b *tan(d*x + c)^2 + a^7*tan(d*x + c)) - 12*b*log(b*tan(d*x + c) + a)/a^5 + 1 2*b*log(tan(d*x + c))/a^5)/d
Time = 0.24 (sec) , antiderivative size = 115, normalized size of antiderivative = 0.99 \[ \int \frac {\csc ^2(c+d x)}{(a+b \tan (c+d x))^4} \, dx=\frac {4 \, b \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{a^{5} d} - \frac {4 \, b \log \left ({\left | \tan \left (d x + c\right ) \right |}\right )}{a^{5} d} - \frac {12 \, a b^{3} \tan \left (d x + c\right )^{3} + 30 \, a^{2} b^{2} \tan \left (d x + c\right )^{2} + 22 \, a^{3} b \tan \left (d x + c\right ) + 3 \, a^{4}}{3 \, {\left (b \tan \left (d x + c\right ) + a\right )}^{3} a^{5} d \tan \left (d x + c\right )} \] Input:
integrate(csc(d*x+c)^2/(a+b*tan(d*x+c))^4,x, algorithm="giac")
Output:
4*b*log(abs(b*tan(d*x + c) + a))/(a^5*d) - 4*b*log(abs(tan(d*x + c)))/(a^5 *d) - 1/3*(12*a*b^3*tan(d*x + c)^3 + 30*a^2*b^2*tan(d*x + c)^2 + 22*a^3*b* tan(d*x + c) + 3*a^4)/((b*tan(d*x + c) + a)^3*a^5*d*tan(d*x + c))
Time = 1.02 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.13 \[ \int \frac {\csc ^2(c+d x)}{(a+b \tan (c+d x))^4} \, dx=\frac {8\,b\,\mathrm {atanh}\left (\frac {2\,b\,\mathrm {tan}\left (c+d\,x\right )}{a}+1\right )}{a^5\,d}-\frac {\frac {1}{a}+\frac {10\,b^2\,{\mathrm {tan}\left (c+d\,x\right )}^2}{a^3}+\frac {4\,b^3\,{\mathrm {tan}\left (c+d\,x\right )}^3}{a^4}+\frac {22\,b\,\mathrm {tan}\left (c+d\,x\right )}{3\,a^2}}{d\,\left (a^3\,\mathrm {tan}\left (c+d\,x\right )+3\,a^2\,b\,{\mathrm {tan}\left (c+d\,x\right )}^2+3\,a\,b^2\,{\mathrm {tan}\left (c+d\,x\right )}^3+b^3\,{\mathrm {tan}\left (c+d\,x\right )}^4\right )} \] Input:
int(1/(sin(c + d*x)^2*(a + b*tan(c + d*x))^4),x)
Output:
(8*b*atanh((2*b*tan(c + d*x))/a + 1))/(a^5*d) - (1/a + (10*b^2*tan(c + d*x )^2)/a^3 + (4*b^3*tan(c + d*x)^3)/a^4 + (22*b*tan(c + d*x))/(3*a^2))/(d*(a ^3*tan(c + d*x) + b^3*tan(c + d*x)^4 + 3*a^2*b*tan(c + d*x)^2 + 3*a*b^2*ta n(c + d*x)^3))
Time = 0.21 (sec) , antiderivative size = 710, normalized size of antiderivative = 6.12 \[ \int \frac {\csc ^2(c+d x)}{(a+b \tan (c+d x))^4} \, dx =\text {Too large to display} \] Input:
int(csc(d*x+c)^2/(a+b*tan(d*x+c))^4,x)
Output:
(12*cos(c + d*x)*log(tan((c + d*x)/2)**2*a - 2*tan((c + d*x)/2)*b - a)*sin (c + d*x)**3*a**3*b**2 - 36*cos(c + d*x)*log(tan((c + d*x)/2)**2*a - 2*tan ((c + d*x)/2)*b - a)*sin(c + d*x)**3*a*b**4 - 12*cos(c + d*x)*log(tan((c + d*x)/2)**2*a - 2*tan((c + d*x)/2)*b - a)*sin(c + d*x)*a**3*b**2 - 12*cos( c + d*x)*log(tan((c + d*x)/2))*sin(c + d*x)**3*a**3*b**2 + 36*cos(c + d*x) *log(tan((c + d*x)/2))*sin(c + d*x)**3*a*b**4 + 12*cos(c + d*x)*log(tan((c + d*x)/2))*sin(c + d*x)*a**3*b**2 - cos(c + d*x)*sin(c + d*x)**3*a**5 - 9 *cos(c + d*x)*sin(c + d*x)**3*a**3*b**2 - 18*cos(c + d*x)*sin(c + d*x)**3* a*b**4 + cos(c + d*x)*sin(c + d*x)*a**5 + 12*cos(c + d*x)*sin(c + d*x)*a** 3*b**2 + 36*log(tan((c + d*x)/2)**2*a - 2*tan((c + d*x)/2)*b - a)*sin(c + d*x)**4*a**2*b**3 - 12*log(tan((c + d*x)/2)**2*a - 2*tan((c + d*x)/2)*b - a)*sin(c + d*x)**4*b**5 - 36*log(tan((c + d*x)/2)**2*a - 2*tan((c + d*x)/2 )*b - a)*sin(c + d*x)**2*a**2*b**3 - 36*log(tan((c + d*x)/2))*sin(c + d*x) **4*a**2*b**3 + 12*log(tan((c + d*x)/2))*sin(c + d*x)**4*b**5 + 36*log(tan ((c + d*x)/2))*sin(c + d*x)**2*a**2*b**3 + sin(c + d*x)**4*a**2*b**3 - 10* sin(c + d*x)**4*b**5 - 3*sin(c + d*x)**2*a**4*b + 3*a**4*b)/(3*sin(c + d*x )*a**5*b*d*(cos(c + d*x)*sin(c + d*x)**2*a**3 - 3*cos(c + d*x)*sin(c + d*x )**2*a*b**2 - cos(c + d*x)*a**3 + 3*sin(c + d*x)**3*a**2*b - sin(c + d*x)* *3*b**3 - 3*sin(c + d*x)*a**2*b))