Integrand size = 21, antiderivative size = 360 \[ \int \frac {\cot ^4(c+d x)}{(a+b \sec (c+d x))^2} \, dx=\frac {x}{a^2}-\frac {2 b^7 \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a^2 (a-b)^{7/2} (a+b)^{7/2} d}-\frac {4 b^5 \left (3 a^2-b^2\right ) \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a^2 (a-b)^{7/2} (a+b)^{7/2} d}-\frac {\sin (c+d x)}{12 (a+b)^2 d (1-\cos (c+d x))^2}-\frac {\sin (c+d x)}{12 (a+b)^2 d (1-\cos (c+d x))}+\frac {(3 a+5 b) \sin (c+d x)}{4 (a+b)^3 d (1-\cos (c+d x))}+\frac {\sin (c+d x)}{12 (a-b)^2 d (1+\cos (c+d x))^2}-\frac {(3 a-5 b) \sin (c+d x)}{4 (a-b)^3 d (1+\cos (c+d x))}+\frac {\sin (c+d x)}{12 (a-b)^2 d (1+\cos (c+d x))}+\frac {b^6 \sin (c+d x)}{a \left (a^2-b^2\right )^3 d (b+a \cos (c+d x))} \] Output:
x/a^2-2*b^7*arctanh((a-b)^(1/2)*tan(1/2*d*x+1/2*c)/(a+b)^(1/2))/a^2/(a-b)^ (7/2)/(a+b)^(7/2)/d-4*b^5*(3*a^2-b^2)*arctanh((a-b)^(1/2)*tan(1/2*d*x+1/2* c)/(a+b)^(1/2))/a^2/(a-b)^(7/2)/(a+b)^(7/2)/d-1/12*sin(d*x+c)/(a+b)^2/d/(1 -cos(d*x+c))^2-1/12*sin(d*x+c)/(a+b)^2/d/(1-cos(d*x+c))+1/4*(3*a+5*b)*sin( d*x+c)/(a+b)^3/d/(1-cos(d*x+c))+1/12*sin(d*x+c)/(a-b)^2/d/(1+cos(d*x+c))^2 -1/4*(3*a-5*b)*sin(d*x+c)/(a-b)^3/d/(1+cos(d*x+c))+1/12*sin(d*x+c)/(a-b)^2 /d/(1+cos(d*x+c))+b^6*sin(d*x+c)/a/(a^2-b^2)^3/d/(b+a*cos(d*x+c))
Time = 1.95 (sec) , antiderivative size = 303, normalized size of antiderivative = 0.84 \[ \int \frac {\cot ^4(c+d x)}{(a+b \sec (c+d x))^2} \, dx=\frac {(b+a \cos (c+d x)) \sec ^2(c+d x) \left (\frac {24 (c+d x) (b+a \cos (c+d x))}{a^2}-\frac {48 b^5 \left (-6 a^2+b^2\right ) \text {arctanh}\left (\frac {(-a+b) \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right ) (b+a \cos (c+d x))}{a^2 \left (a^2-b^2\right )^{7/2}}+\frac {4 (4 a+7 b) (b+a \cos (c+d x)) \cot \left (\frac {1}{2} (c+d x)\right )}{(a+b)^3}-\frac {(b+a \cos (c+d x)) \cot \left (\frac {1}{2} (c+d x)\right ) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{(a+b)^2}+\frac {24 b^6 \sin (c+d x)}{a (a-b)^3 (a+b)^3}+\frac {4 (-4 a+7 b) (b+a \cos (c+d x)) \tan \left (\frac {1}{2} (c+d x)\right )}{(a-b)^3}+\frac {(b+a \cos (c+d x)) \sec ^2\left (\frac {1}{2} (c+d x)\right ) \tan \left (\frac {1}{2} (c+d x)\right )}{(a-b)^2}\right )}{24 d (a+b \sec (c+d x))^2} \] Input:
Integrate[Cot[c + d*x]^4/(a + b*Sec[c + d*x])^2,x]
Output:
((b + a*Cos[c + d*x])*Sec[c + d*x]^2*((24*(c + d*x)*(b + a*Cos[c + d*x]))/ a^2 - (48*b^5*(-6*a^2 + b^2)*ArcTanh[((-a + b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]]*(b + a*Cos[c + d*x]))/(a^2*(a^2 - b^2)^(7/2)) + (4*(4*a + 7*b)*(b + a*Cos[c + d*x])*Cot[(c + d*x)/2])/(a + b)^3 - ((b + a*Cos[c + d*x])*Cot[ (c + d*x)/2]*Csc[(c + d*x)/2]^2)/(a + b)^2 + (24*b^6*Sin[c + d*x])/(a*(a - b)^3*(a + b)^3) + (4*(-4*a + 7*b)*(b + a*Cos[c + d*x])*Tan[(c + d*x)/2])/ (a - b)^3 + ((b + a*Cos[c + d*x])*Sec[(c + d*x)/2]^2*Tan[(c + d*x)/2])/(a - b)^2))/(24*d*(a + b*Sec[c + d*x])^2)
Time = 0.92 (sec) , antiderivative size = 360, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {3042, 4386, 3042, 3376, 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 {\cot ^4(c+d x)}{(a+b \sec (c+d x))^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\cot \left (c+d x+\frac {\pi }{2}\right )^4 \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^2}dx\) |
\(\Big \downarrow \) 4386 |
\(\displaystyle \int \frac {\cos ^2(c+d x) \cot ^4(c+d x)}{(a \cos (c+d x)+b)^2}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin \left (c+d x-\frac {\pi }{2}\right )^6}{\cos \left (c+d x-\frac {\pi }{2}\right )^4 \left (b-a \sin \left (c+d x-\frac {\pi }{2}\right )\right )^2}dx\) |
\(\Big \downarrow \) 3376 |
\(\displaystyle \int \left (\frac {b^6}{a^2 \left (a^2-b^2\right )^2 (-a \cos (c+d x)-b)^2}+\frac {2 b^5 \left (3 a^2-b^2\right )}{a^2 \left (a^2-b^2\right )^3 (-a \cos (c+d x)-b)}+\frac {1}{a^2}+\frac {3 a-5 b}{4 (a-b)^3 (-\cos (c+d x)-1)}+\frac {-3 a-5 b}{4 (a+b)^3 (1-\cos (c+d x))}+\frac {1}{4 (a-b)^2 (-\cos (c+d x)-1)^2}+\frac {1}{4 (a+b)^2 (1-\cos (c+d x))^2}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {2 b^7 \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a^2 d (a-b)^{7/2} (a+b)^{7/2}}-\frac {4 b^5 \left (3 a^2-b^2\right ) \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a^2 d (a-b)^{7/2} (a+b)^{7/2}}+\frac {b^6 \sin (c+d x)}{a d \left (a^2-b^2\right )^3 (a \cos (c+d x)+b)}+\frac {x}{a^2}+\frac {(3 a+5 b) \sin (c+d x)}{4 d (a+b)^3 (1-\cos (c+d x))}-\frac {\sin (c+d x)}{12 d (a+b)^2 (1-\cos (c+d x))}+\frac {\sin (c+d x)}{12 d (a-b)^2 (\cos (c+d x)+1)}-\frac {(3 a-5 b) \sin (c+d x)}{4 d (a-b)^3 (\cos (c+d x)+1)}-\frac {\sin (c+d x)}{12 d (a+b)^2 (1-\cos (c+d x))^2}+\frac {\sin (c+d x)}{12 d (a-b)^2 (\cos (c+d x)+1)^2}\) |
Input:
Int[Cot[c + d*x]^4/(a + b*Sec[c + d*x])^2,x]
Output:
x/a^2 - (2*b^7*ArcTanh[(Sqrt[a - b]*Tan[(c + d*x)/2])/Sqrt[a + b]])/(a^2*( a - b)^(7/2)*(a + b)^(7/2)*d) - (4*b^5*(3*a^2 - b^2)*ArcTanh[(Sqrt[a - b]* Tan[(c + d*x)/2])/Sqrt[a + b]])/(a^2*(a - b)^(7/2)*(a + b)^(7/2)*d) - Sin[ c + d*x]/(12*(a + b)^2*d*(1 - Cos[c + d*x])^2) - Sin[c + d*x]/(12*(a + b)^ 2*d*(1 - Cos[c + d*x])) + ((3*a + 5*b)*Sin[c + d*x])/(4*(a + b)^3*d*(1 - C os[c + d*x])) + Sin[c + d*x]/(12*(a - b)^2*d*(1 + Cos[c + d*x])^2) - ((3*a - 5*b)*Sin[c + d*x])/(4*(a - b)^3*d*(1 + Cos[c + d*x])) + Sin[c + d*x]/(1 2*(a - b)^2*d*(1 + Cos[c + d*x])) + (b^6*Sin[c + d*x])/(a*(a^2 - b^2)^3*d* (b + a*Cos[c + d*x]))
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Int[ExpandTrig[(d*sin[ e + f*x])^n*(a + b*sin[e + f*x])^m*(1 - sin[e + f*x]^2)^(p/2), x], x] /; Fr eeQ[{a, b, d, e, f}, x] && NeQ[a^2 - b^2, 0] && IntegersQ[m, 2*n, p/2] && ( LtQ[m, -1] || (EqQ[m, -1] && GtQ[p, 0]))
Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n _), x_Symbol] :> Int[Cos[c + d*x]^m*((b + a*Sin[c + d*x])^n/Sin[c + d*x]^(m + n)), x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0] && IntegerQ[n] && IntegerQ[m] && (IntegerQ[m/2] || LeQ[m, 1])
Time = 1.30 (sec) , antiderivative size = 260, normalized size of antiderivative = 0.72
method | result | size |
derivativedivides | \(\frac {\frac {\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} a}{3}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} b}{3}-5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a +9 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) b}{8 \left (a^{2}-2 a b +b^{2}\right ) \left (a -b \right )}-\frac {1}{24 \left (a +b \right )^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}-\frac {-5 a -9 b}{8 \left (a +b \right )^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}+\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a^{2}}+\frac {2 b^{5} \left (-\frac {a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b -a -b}-\frac {\left (6 a^{2}-b^{2}\right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{\left (a +b \right )^{3} \left (a -b \right )^{3} a^{2}}}{d}\) | \(260\) |
default | \(\frac {\frac {\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} a}{3}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} b}{3}-5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a +9 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) b}{8 \left (a^{2}-2 a b +b^{2}\right ) \left (a -b \right )}-\frac {1}{24 \left (a +b \right )^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}-\frac {-5 a -9 b}{8 \left (a +b \right )^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}+\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a^{2}}+\frac {2 b^{5} \left (-\frac {a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b -a -b}-\frac {\left (6 a^{2}-b^{2}\right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{\left (a +b \right )^{3} \left (a -b \right )^{3} a^{2}}}{d}\) | \(260\) |
risch | \(\frac {x}{a^{2}}+\frac {2 i \left (4 a^{7}-9 a^{5} b^{2}-7 a^{3} b^{4}-3 a \,b^{6}+27 a^{3} b^{4} {\mathrm e}^{6 i \left (d x +c \right )}+3 a \,b^{6} {\mathrm e}^{6 i \left (d x +c \right )}+10 a^{6} b \,{\mathrm e}^{5 i \left (d x +c \right )}-28 a^{4} b^{3} {\mathrm e}^{5 i \left (d x +c \right )}-3 a^{5} b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+41 a^{3} b^{4} {\mathrm e}^{2 i \left (d x +c \right )}+9 a \,b^{6} {\mathrm e}^{2 i \left (d x +c \right )}+2 a^{6} b \,{\mathrm e}^{i \left (d x +c \right )}-14 a^{2} b^{5} {\mathrm e}^{i \left (d x +c \right )}-6 a^{6} b \,{\mathrm e}^{7 i \left (d x +c \right )}+18 a^{4} b^{3} {\mathrm e}^{7 i \left (d x +c \right )}-21 a^{5} b^{2} {\mathrm e}^{6 i \left (d x +c \right )}-18 a^{2} b^{5} {\mathrm e}^{5 i \left (d x +c \right )}+17 a^{5} b^{2} {\mathrm e}^{4 i \left (d x +c \right )}-53 a^{3} b^{4} {\mathrm e}^{4 i \left (d x +c \right )}-9 a \,b^{6} {\mathrm e}^{4 i \left (d x +c \right )}-14 a^{6} b \,{\mathrm e}^{3 i \left (d x +c \right )}+26 a^{4} b^{3} {\mathrm e}^{3 i \left (d x +c \right )}+24 a^{2} b^{5} {\mathrm e}^{3 i \left (d x +c \right )}-3 b^{7} {\mathrm e}^{i \left (d x +c \right )}+9 b^{7} {\mathrm e}^{3 i \left (d x +c \right )}-2 a^{7} {\mathrm e}^{2 i \left (d x +c \right )}-9 b^{7} {\mathrm e}^{5 i \left (d x +c \right )}+3 b^{7} {\mathrm e}^{7 i \left (d x +c \right )}+6 a^{7} {\mathrm e}^{6 i \left (d x +c \right )}\right )}{3 d \left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{3} \left (a^{2}-b^{2}\right ) a^{2} \left (a \,{\mathrm e}^{2 i \left (d x +c \right )}+2 b \,{\mathrm e}^{i \left (d x +c \right )}+a \right )}+\frac {6 b^{5} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {-i a^{2}+i b^{2}+\sqrt {a^{2}-b^{2}}\, b}{a \sqrt {a^{2}-b^{2}}}\right )}{\sqrt {a^{2}-b^{2}}\, \left (a +b \right )^{3} \left (a -b \right )^{3} d}-\frac {b^{7} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {-i a^{2}+i b^{2}+\sqrt {a^{2}-b^{2}}\, b}{a \sqrt {a^{2}-b^{2}}}\right )}{\sqrt {a^{2}-b^{2}}\, \left (a +b \right )^{3} \left (a -b \right )^{3} d \,a^{2}}-\frac {6 b^{5} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a^{2}-i b^{2}+\sqrt {a^{2}-b^{2}}\, b}{a \sqrt {a^{2}-b^{2}}}\right )}{\sqrt {a^{2}-b^{2}}\, \left (a +b \right )^{3} \left (a -b \right )^{3} d}+\frac {b^{7} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a^{2}-i b^{2}+\sqrt {a^{2}-b^{2}}\, b}{a \sqrt {a^{2}-b^{2}}}\right )}{\sqrt {a^{2}-b^{2}}\, \left (a +b \right )^{3} \left (a -b \right )^{3} d \,a^{2}}\) | \(842\) |
Input:
int(cot(d*x+c)^4/(a+b*sec(d*x+c))^2,x,method=_RETURNVERBOSE)
Output:
1/d*(1/8/(a^2-2*a*b+b^2)/(a-b)*(1/3*tan(1/2*d*x+1/2*c)^3*a-1/3*tan(1/2*d*x +1/2*c)^3*b-5*tan(1/2*d*x+1/2*c)*a+9*tan(1/2*d*x+1/2*c)*b)-1/24/(a+b)^2/ta n(1/2*d*x+1/2*c)^3-1/8/(a+b)^3*(-5*a-9*b)/tan(1/2*d*x+1/2*c)+2/a^2*arctan( tan(1/2*d*x+1/2*c))+2*b^5/(a+b)^3/(a-b)^3/a^2*(-a*b*tan(1/2*d*x+1/2*c)/(ta n(1/2*d*x+1/2*c)^2*a-tan(1/2*d*x+1/2*c)^2*b-a-b)-(6*a^2-b^2)/((a+b)*(a-b)) ^(1/2)*arctanh((a-b)*tan(1/2*d*x+1/2*c)/((a+b)*(a-b))^(1/2))))
Leaf count of result is larger than twice the leaf count of optimal. 711 vs. \(2 (324) = 648\).
Time = 0.22 (sec) , antiderivative size = 1481, normalized size of antiderivative = 4.11 \[ \int \frac {\cot ^4(c+d x)}{(a+b \sec (c+d x))^2} \, dx=\text {Too large to display} \] Input:
integrate(cot(d*x+c)^4/(a+b*sec(d*x+c))^2,x, algorithm="fricas")
Output:
[1/6*(8*a^7*b^2 - 40*a^5*b^4 + 26*a^3*b^6 + 6*a*b^8 + 2*(4*a^9 - 13*a^7*b^ 2 + 2*a^5*b^4 + 4*a^3*b^6 + 3*a*b^8)*cos(d*x + c)^4 - 2*(2*a^8*b - 11*a^6* b^3 + 16*a^4*b^5 - 7*a^2*b^7)*cos(d*x + c)^3 - 3*(6*a^2*b^6 - b^8 - (6*a^3 *b^5 - a*b^7)*cos(d*x + c)^3 - (6*a^2*b^6 - b^8)*cos(d*x + c)^2 + (6*a^3*b ^5 - a*b^7)*cos(d*x + c))*sqrt(a^2 - b^2)*log((2*a*b*cos(d*x + c) - (a^2 - 2*b^2)*cos(d*x + c)^2 - 2*sqrt(a^2 - b^2)*(b*cos(d*x + c) + a)*sin(d*x + c) + 2*a^2 - b^2)/(a^2*cos(d*x + c)^2 + 2*a*b*cos(d*x + c) + b^2))*sin(d*x + c) - 6*(a^9 - 2*a^7*b^2 - 7*a^5*b^4 + 6*a^3*b^6 + 2*a*b^8)*cos(d*x + c) ^2 + 2*(a^8*b - 8*a^6*b^3 + 13*a^4*b^5 - 6*a^2*b^7)*cos(d*x + c) + 6*((a^9 - 4*a^7*b^2 + 6*a^5*b^4 - 4*a^3*b^6 + a*b^8)*d*x*cos(d*x + c)^3 + (a^8*b - 4*a^6*b^3 + 6*a^4*b^5 - 4*a^2*b^7 + b^9)*d*x*cos(d*x + c)^2 - (a^9 - 4*a ^7*b^2 + 6*a^5*b^4 - 4*a^3*b^6 + a*b^8)*d*x*cos(d*x + c) - (a^8*b - 4*a^6* b^3 + 6*a^4*b^5 - 4*a^2*b^7 + b^9)*d*x)*sin(d*x + c))/(((a^11 - 4*a^9*b^2 + 6*a^7*b^4 - 4*a^5*b^6 + a^3*b^8)*d*cos(d*x + c)^3 + (a^10*b - 4*a^8*b^3 + 6*a^6*b^5 - 4*a^4*b^7 + a^2*b^9)*d*cos(d*x + c)^2 - (a^11 - 4*a^9*b^2 + 6*a^7*b^4 - 4*a^5*b^6 + a^3*b^8)*d*cos(d*x + c) - (a^10*b - 4*a^8*b^3 + 6* a^6*b^5 - 4*a^4*b^7 + a^2*b^9)*d)*sin(d*x + c)), 1/3*(4*a^7*b^2 - 20*a^5*b ^4 + 13*a^3*b^6 + 3*a*b^8 + (4*a^9 - 13*a^7*b^2 + 2*a^5*b^4 + 4*a^3*b^6 + 3*a*b^8)*cos(d*x + c)^4 - (2*a^8*b - 11*a^6*b^3 + 16*a^4*b^5 - 7*a^2*b^7)* cos(d*x + c)^3 + 3*(6*a^2*b^6 - b^8 - (6*a^3*b^5 - a*b^7)*cos(d*x + c)^...
\[ \int \frac {\cot ^4(c+d x)}{(a+b \sec (c+d x))^2} \, dx=\int \frac {\cot ^{4}{\left (c + d x \right )}}{\left (a + b \sec {\left (c + d x \right )}\right )^{2}}\, dx \] Input:
integrate(cot(d*x+c)**4/(a+b*sec(d*x+c))**2,x)
Output:
Integral(cot(c + d*x)**4/(a + b*sec(c + d*x))**2, x)
Exception generated. \[ \int \frac {\cot ^4(c+d x)}{(a+b \sec (c+d x))^2} \, dx=\text {Exception raised: ValueError} \] Input:
integrate(cot(d*x+c)^4/(a+b*sec(d*x+c))^2,x, algorithm="maxima")
Output:
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*a^2-4*b^2>0)', see `assume?` f or more de
Time = 0.23 (sec) , antiderivative size = 487, normalized size of antiderivative = 1.35 \[ \int \frac {\cot ^4(c+d x)}{(a+b \sec (c+d x))^2} \, dx=-\frac {\frac {48 \, b^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (a^{7} - 3 \, a^{5} b^{2} + 3 \, a^{3} b^{4} - a b^{6}\right )} {\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a - b\right )}} - \frac {48 \, {\left (6 \, a^{2} b^{5} - b^{7}\right )} {\left (\pi \left \lfloor \frac {d x + c}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (2 \, a - 2 \, b\right ) + \arctan \left (\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\sqrt {-a^{2} + b^{2}}}\right )\right )}}{{\left (a^{8} - 3 \, a^{6} b^{2} + 3 \, a^{4} b^{4} - a^{2} b^{6}\right )} \sqrt {-a^{2} + b^{2}}} - \frac {a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 4 \, a^{3} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 6 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 4 \, a b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 15 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 72 \, a^{3} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 126 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 96 \, a b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 27 \, b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{6} - 6 \, a^{5} b + 15 \, a^{4} b^{2} - 20 \, a^{3} b^{3} + 15 \, a^{2} b^{4} - 6 \, a b^{5} + b^{6}} - \frac {24 \, {\left (d x + c\right )}}{a^{2}} - \frac {15 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 27 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a - b}{{\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3}}}{24 \, d} \] Input:
integrate(cot(d*x+c)^4/(a+b*sec(d*x+c))^2,x, algorithm="giac")
Output:
-1/24*(48*b^6*tan(1/2*d*x + 1/2*c)/((a^7 - 3*a^5*b^2 + 3*a^3*b^4 - a*b^6)* (a*tan(1/2*d*x + 1/2*c)^2 - b*tan(1/2*d*x + 1/2*c)^2 - a - b)) - 48*(6*a^2 *b^5 - b^7)*(pi*floor(1/2*(d*x + c)/pi + 1/2)*sgn(2*a - 2*b) + arctan((a*t an(1/2*d*x + 1/2*c) - b*tan(1/2*d*x + 1/2*c))/sqrt(-a^2 + b^2)))/((a^8 - 3 *a^6*b^2 + 3*a^4*b^4 - a^2*b^6)*sqrt(-a^2 + b^2)) - (a^4*tan(1/2*d*x + 1/2 *c)^3 - 4*a^3*b*tan(1/2*d*x + 1/2*c)^3 + 6*a^2*b^2*tan(1/2*d*x + 1/2*c)^3 - 4*a*b^3*tan(1/2*d*x + 1/2*c)^3 + b^4*tan(1/2*d*x + 1/2*c)^3 - 15*a^4*tan (1/2*d*x + 1/2*c) + 72*a^3*b*tan(1/2*d*x + 1/2*c) - 126*a^2*b^2*tan(1/2*d* x + 1/2*c) + 96*a*b^3*tan(1/2*d*x + 1/2*c) - 27*b^4*tan(1/2*d*x + 1/2*c))/ (a^6 - 6*a^5*b + 15*a^4*b^2 - 20*a^3*b^3 + 15*a^2*b^4 - 6*a*b^5 + b^6) - 2 4*(d*x + c)/a^2 - (15*a*tan(1/2*d*x + 1/2*c)^2 + 27*b*tan(1/2*d*x + 1/2*c) ^2 - a - b)/((a^3 + 3*a^2*b + 3*a*b^2 + b^3)*tan(1/2*d*x + 1/2*c)^3))/d
Time = 15.92 (sec) , antiderivative size = 8348, normalized size of antiderivative = 23.19 \[ \int \frac {\cot ^4(c+d x)}{(a+b \sec (c+d x))^2} \, dx=\text {Too large to display} \] Input:
int(cot(c + d*x)^4/(a + b/cos(c + d*x))^2,x)
Output:
tan(c/2 + (d*x)/2)^3/(24*d*(a - b)^2) + ((3*a*b^2 - 3*a^2*b + a^3 - b^3)/( 3*(a + b)) + (2*tan(c/2 + (d*x)/2)^2*(11*a^3*b - 31*a*b^3 - 8*a^4 + 13*b^4 + 15*a^2*b^2))/(3*(a + b)^2) - (tan(c/2 + (d*x)/2)^4*(11*a^5*b - 9*a*b^5 - 5*a^6 + 16*b^6 + 31*a^2*b^4 - 34*a^3*b^3 + 6*a^4*b^2))/(a*(a + b)^3))/(d *(tan(c/2 + (d*x)/2)^5*(8*a^4 - 32*a^3*b - 32*a*b^3 + 8*b^4 + 48*a^2*b^2) - tan(c/2 + (d*x)/2)^3*(16*a*b^3 - 16*a^3*b + 8*a^4 - 8*b^4))) + (tan(c/2 + (d*x)/2)*((16*a*b + 8*a^2 - 24*b^2)/(64*(a - b)^4) - 3/(4*(a - b)^2)))/d + (2*atan(((tan(c/2 + (d*x)/2)*(32*a^36 - 96*a^35*b + 64*a^3*b^33 - 128*a ^4*b^32 - 1056*a^5*b^31 + 2080*a^6*b^30 + 7680*a^7*b^29 - 15360*a^8*b^28 - 31360*a^9*b^27 + 67200*a^10*b^26 + 77760*a^11*b^25 - 194240*a^12*b^24 - 1 14240*a^13*b^23 + 393792*a^14*b^22 + 68096*a^15*b^21 - 580608*a^16*b^20 + 96000*a^17*b^19 + 636160*a^18*b^18 - 300960*a^19*b^17 - 522720*a^20*b^16 + 412640*a^21*b^15 + 319520*a^22*b^14 - 373632*a^23*b^13 - 138880*a^24*b^12 + 243456*a^25*b^11 + 36096*a^26*b^10 - 116480*a^27*b^9 + 40320*a^29*b^7 - 4480*a^30*b^6 - 9600*a^31*b^5 + 1920*a^32*b^4 + 1408*a^33*b^3 - 384*a^34* b^2) - ((32*a^38 - 32*a^37*b - 32*a^6*b^32 - 32*a^7*b^31 + 640*a^8*b^30 - 4992*a^10*b^28 + 2624*a^11*b^27 + 21504*a^12*b^26 - 19872*a^13*b^25 - 5792 0*a^14*b^24 + 77472*a^15*b^23 + 100992*a^16*b^22 - 195008*a^17*b^21 - 1070 08*a^18*b^20 + 344960*a^19*b^19 + 39424*a^20*b^18 - 446688*a^21*b^17 + 760 32*a^22*b^16 + 431904*a^23*b^15 - 161920*a^24*b^14 - 313984*a^25*b^13 +...
Time = 1.23 (sec) , antiderivative size = 881, normalized size of antiderivative = 2.45 \[ \int \frac {\cot ^4(c+d x)}{(a+b \sec (c+d x))^2} \, dx =\text {Too large to display} \] Input:
int(cot(d*x+c)^4/(a+b*sec(d*x+c))^2,x)
Output:
( - 36*sqrt( - a**2 + b**2)*atan((tan((c + d*x)/2)*a - tan((c + d*x)/2)*b) /sqrt( - a**2 + b**2))*cos(c + d*x)*sin(c + d*x)**3*a**3*b**5 + 6*sqrt( - a**2 + b**2)*atan((tan((c + d*x)/2)*a - tan((c + d*x)/2)*b)/sqrt( - a**2 + b**2))*cos(c + d*x)*sin(c + d*x)**3*a*b**7 - 36*sqrt( - a**2 + b**2)*atan ((tan((c + d*x)/2)*a - tan((c + d*x)/2)*b)/sqrt( - a**2 + b**2))*sin(c + d *x)**3*a**2*b**6 + 6*sqrt( - a**2 + b**2)*atan((tan((c + d*x)/2)*a - tan(( c + d*x)/2)*b)/sqrt( - a**2 + b**2))*sin(c + d*x)**3*b**8 + 3*cos(c + d*x) *sin(c + d*x)**3*a**9*d*x - 12*cos(c + d*x)*sin(c + d*x)**3*a**7*b**2*d*x + 18*cos(c + d*x)*sin(c + d*x)**3*a**5*b**4*d*x - 12*cos(c + d*x)*sin(c + d*x)**3*a**3*b**6*d*x + 3*cos(c + d*x)*sin(c + d*x)**3*a*b**8*d*x - 2*cos( c + d*x)*sin(c + d*x)**2*a**8*b + 11*cos(c + d*x)*sin(c + d*x)**2*a**6*b** 3 - 16*cos(c + d*x)*sin(c + d*x)**2*a**4*b**5 + 7*cos(c + d*x)*sin(c + d*x )**2*a**2*b**7 + cos(c + d*x)*a**8*b - 3*cos(c + d*x)*a**6*b**3 + 3*cos(c + d*x)*a**4*b**5 - cos(c + d*x)*a**2*b**7 - 4*sin(c + d*x)**4*a**9 + 13*si n(c + d*x)**4*a**7*b**2 - 2*sin(c + d*x)**4*a**5*b**4 - 4*sin(c + d*x)**4* a**3*b**6 - 3*sin(c + d*x)**4*a*b**8 + 3*sin(c + d*x)**3*a**8*b*d*x - 12*s in(c + d*x)**3*a**6*b**3*d*x + 18*sin(c + d*x)**3*a**4*b**5*d*x - 12*sin(c + d*x)**3*a**2*b**7*d*x + 3*sin(c + d*x)**3*b**9*d*x + 5*sin(c + d*x)**2* a**9 - 20*sin(c + d*x)**2*a**7*b**2 + 25*sin(c + d*x)**2*a**5*b**4 - 10*si n(c + d*x)**2*a**3*b**6 - a**9 + 3*a**7*b**2 - 3*a**5*b**4 + a**3*b**6)...