Integrand size = 13, antiderivative size = 91 \[ \int \frac {\cot ^4(x)}{a+b \csc (x)} \, dx=\frac {x}{a}-\frac {\left (2 a^2-3 b^2\right ) \text {arctanh}(\cos (x))}{2 b^3}+\frac {2 \left (a^2-b^2\right )^{3/2} \text {arctanh}\left (\frac {a+b \tan \left (\frac {x}{2}\right )}{\sqrt {a^2-b^2}}\right )}{a b^3}+\frac {a \cot (x)}{b^2}-\frac {\cot (x) \csc (x)}{2 b} \] Output:
x/a-1/2*(2*a^2-3*b^2)*arctanh(cos(x))/b^3+2*(a^2-b^2)^(3/2)*arctanh((a+b*t an(1/2*x))/(a^2-b^2)^(1/2))/a/b^3+a*cot(x)/b^2-1/2*cot(x)*csc(x)/b
Time = 0.39 (sec) , antiderivative size = 158, normalized size of antiderivative = 1.74 \[ \int \frac {\cot ^4(x)}{a+b \csc (x)} \, dx=\frac {8 b^3 x-16 \left (-a^2+b^2\right )^{3/2} \arctan \left (\frac {a+b \tan \left (\frac {x}{2}\right )}{\sqrt {-a^2+b^2}}\right )+4 a^2 b \cot \left (\frac {x}{2}\right )-a b^2 \csc ^2\left (\frac {x}{2}\right )-8 a^3 \log \left (\cos \left (\frac {x}{2}\right )\right )+12 a b^2 \log \left (\cos \left (\frac {x}{2}\right )\right )+8 a^3 \log \left (\sin \left (\frac {x}{2}\right )\right )-12 a b^2 \log \left (\sin \left (\frac {x}{2}\right )\right )+a b^2 \sec ^2\left (\frac {x}{2}\right )-4 a^2 b \tan \left (\frac {x}{2}\right )}{8 a b^3} \] Input:
Integrate[Cot[x]^4/(a + b*Csc[x]),x]
Output:
(8*b^3*x - 16*(-a^2 + b^2)^(3/2)*ArcTan[(a + b*Tan[x/2])/Sqrt[-a^2 + b^2]] + 4*a^2*b*Cot[x/2] - a*b^2*Csc[x/2]^2 - 8*a^3*Log[Cos[x/2]] + 12*a*b^2*Lo g[Cos[x/2]] + 8*a^3*Log[Sin[x/2]] - 12*a*b^2*Log[Sin[x/2]] + a*b^2*Sec[x/2 ]^2 - 4*a^2*b*Tan[x/2])/(8*a*b^3)
Time = 0.67 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.18, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.923, Rules used = {3042, 4386, 3042, 3372, 25, 3042, 3536, 3042, 3139, 1083, 219, 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(x)}{a+b \csc (x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cot (x)^4}{a+b \csc (x)}dx\) |
\(\Big \downarrow \) 4386 |
\(\displaystyle \int \frac {\cos (x) \cot ^3(x)}{a \sin (x)+b}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos (x)^4}{\sin (x)^3 (a \sin (x)+b)}dx\) |
\(\Big \downarrow \) 3372 |
\(\displaystyle -\frac {\int -\frac {\csc (x) \left (2 a^2+b \sin (x) a-3 b^2+2 b^2 \sin ^2(x)\right )}{b+a \sin (x)}dx}{2 b^2}+\frac {a \cot (x)}{b^2}-\frac {\cot (x) \csc (x)}{2 b}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \frac {\csc (x) \left (2 a^2+b \sin (x) a-3 b^2+2 b^2 \sin ^2(x)\right )}{b+a \sin (x)}dx}{2 b^2}+\frac {a \cot (x)}{b^2}-\frac {\cot (x) \csc (x)}{2 b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {2 a^2+b \sin (x) a-3 b^2+2 b^2 \sin (x)^2}{\sin (x) (b+a \sin (x))}dx}{2 b^2}+\frac {a \cot (x)}{b^2}-\frac {\cot (x) \csc (x)}{2 b}\) |
\(\Big \downarrow \) 3536 |
\(\displaystyle \frac {-\frac {2 \left (a^2-b^2\right )^2 \int \frac {1}{b+a \sin (x)}dx}{a b}+\frac {\left (2 a^2-3 b^2\right ) \int \csc (x)dx}{b}+\frac {2 b^2 x}{a}}{2 b^2}+\frac {a \cot (x)}{b^2}-\frac {\cot (x) \csc (x)}{2 b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {-\frac {2 \left (a^2-b^2\right )^2 \int \frac {1}{b+a \sin (x)}dx}{a b}+\frac {\left (2 a^2-3 b^2\right ) \int \csc (x)dx}{b}+\frac {2 b^2 x}{a}}{2 b^2}+\frac {a \cot (x)}{b^2}-\frac {\cot (x) \csc (x)}{2 b}\) |
\(\Big \downarrow \) 3139 |
\(\displaystyle \frac {-\frac {4 \left (a^2-b^2\right )^2 \int \frac {1}{b \tan ^2\left (\frac {x}{2}\right )+2 a \tan \left (\frac {x}{2}\right )+b}d\tan \left (\frac {x}{2}\right )}{a b}+\frac {\left (2 a^2-3 b^2\right ) \int \csc (x)dx}{b}+\frac {2 b^2 x}{a}}{2 b^2}+\frac {a \cot (x)}{b^2}-\frac {\cot (x) \csc (x)}{2 b}\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle \frac {\frac {8 \left (a^2-b^2\right )^2 \int \frac {1}{4 \left (a^2-b^2\right )-\left (2 a+2 b \tan \left (\frac {x}{2}\right )\right )^2}d\left (2 a+2 b \tan \left (\frac {x}{2}\right )\right )}{a b}+\frac {\left (2 a^2-3 b^2\right ) \int \csc (x)dx}{b}+\frac {2 b^2 x}{a}}{2 b^2}+\frac {a \cot (x)}{b^2}-\frac {\cot (x) \csc (x)}{2 b}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {\frac {\left (2 a^2-3 b^2\right ) \int \csc (x)dx}{b}+\frac {4 \left (a^2-b^2\right )^{3/2} \text {arctanh}\left (\frac {2 a+2 b \tan \left (\frac {x}{2}\right )}{2 \sqrt {a^2-b^2}}\right )}{a b}+\frac {2 b^2 x}{a}}{2 b^2}+\frac {a \cot (x)}{b^2}-\frac {\cot (x) \csc (x)}{2 b}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {-\frac {\left (2 a^2-3 b^2\right ) \text {arctanh}(\cos (x))}{b}+\frac {4 \left (a^2-b^2\right )^{3/2} \text {arctanh}\left (\frac {2 a+2 b \tan \left (\frac {x}{2}\right )}{2 \sqrt {a^2-b^2}}\right )}{a b}+\frac {2 b^2 x}{a}}{2 b^2}+\frac {a \cot (x)}{b^2}-\frac {\cot (x) \csc (x)}{2 b}\) |
Input:
Int[Cot[x]^4/(a + b*Csc[x]),x]
Output:
((2*b^2*x)/a - ((2*a^2 - 3*b^2)*ArcTanh[Cos[x]])/b + (4*(a^2 - b^2)^(3/2)* ArcTanh[(2*a + 2*b*Tan[x/2])/(2*Sqrt[a^2 - b^2])])/(a*b))/(2*b^2) + (a*Cot [x])/b^2 - (Cot[x]*Csc[x])/(2*b)
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2 Subst[I nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x]
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = Fre eFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d) Subst[Int[1/(a + 2*b*e*x + a *e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] && NeQ [a^2 - b^2, 0]
Int[cos[(e_.) + (f_.)*(x_)]^4*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[Cos[e + f*x]*(a + b* Sin[e + f*x])^(m + 1)*((d*Sin[e + f*x])^(n + 1)/(a*d*f*(n + 1))), x] + (-Si mp[b*(m + n + 2)*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1)*((d*Sin[e + f*x] )^(n + 2)/(a^2*d^2*f*(n + 1)*(n + 2))), x] - Simp[1/(a^2*d^2*(n + 1)*(n + 2 )) Int[(a + b*Sin[e + f*x])^m*(d*Sin[e + f*x])^(n + 2)*Simp[a^2*n*(n + 2) - b^2*(m + n + 2)*(m + n + 3) + a*b*m*Sin[e + f*x] - (a^2*(n + 1)*(n + 2) - b^2*(m + n + 2)*(m + n + 4))*Sin[e + f*x]^2, x], x], x]) /; FreeQ[{a, b, d, e, f, m}, x] && NeQ[a^2 - b^2, 0] && (IGtQ[m, 0] || IntegersQ[2*m, 2*n]) && !m < -1 && LtQ[n, -1] && (LtQ[n, -2] || EqQ[m + n + 4, 0])
Int[((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^ 2)/(((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.) *(x_)])), x_Symbol] :> Simp[C*(x/(b*d)), x] + (Simp[(A*b^2 - a*b*B + a^2*C) /(b*(b*c - a*d)) Int[1/(a + b*Sin[e + f*x]), x], x] - Simp[(c^2*C - B*c*d + A*d^2)/(d*(b*c - a*d)) Int[1/(c + d*Sin[e + f*x]), x], x]) /; FreeQ[{a , b, c, d, e, f, A, B, C}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
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 = 0.51 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.55
method | result | size |
default | \(-\frac {-\frac {b \tan \left (\frac {x}{2}\right )^{2}}{2}+2 a \tan \left (\frac {x}{2}\right )}{4 b^{2}}-\frac {1}{8 b \tan \left (\frac {x}{2}\right )^{2}}+\frac {\left (4 a^{2}-6 b^{2}\right ) \ln \left (\tan \left (\frac {x}{2}\right )\right )}{4 b^{3}}+\frac {a}{2 b^{2} \tan \left (\frac {x}{2}\right )}+\frac {2 \arctan \left (\tan \left (\frac {x}{2}\right )\right )}{a}+\frac {\left (-8 a^{4}+16 a^{2} b^{2}-8 b^{4}\right ) \arctan \left (\frac {2 b \tan \left (\frac {x}{2}\right )+2 a}{2 \sqrt {-a^{2}+b^{2}}}\right )}{4 a \,b^{3} \sqrt {-a^{2}+b^{2}}}\) | \(141\) |
risch | \(\frac {x}{a}+\frac {2 i a \,{\mathrm e}^{2 i x}+b \,{\mathrm e}^{3 i x}-2 i a +b \,{\mathrm e}^{i x}}{\left ({\mathrm e}^{2 i x}-1\right )^{2} b^{2}}+\frac {\ln \left ({\mathrm e}^{i x}-1\right ) a^{2}}{b^{3}}-\frac {3 \ln \left ({\mathrm e}^{i x}-1\right )}{2 b}-\frac {\ln \left ({\mathrm e}^{i x}+1\right ) a^{2}}{b^{3}}+\frac {3 \ln \left ({\mathrm e}^{i x}+1\right )}{2 b}+\frac {\sqrt {a^{2}-b^{2}}\, a \ln \left ({\mathrm e}^{i x}+\frac {i b +\sqrt {a^{2}-b^{2}}}{a}\right )}{b^{3}}-\frac {\sqrt {a^{2}-b^{2}}\, \ln \left ({\mathrm e}^{i x}+\frac {i b +\sqrt {a^{2}-b^{2}}}{a}\right )}{b a}-\frac {\sqrt {a^{2}-b^{2}}\, a \ln \left ({\mathrm e}^{i x}-\frac {-i b +\sqrt {a^{2}-b^{2}}}{a}\right )}{b^{3}}+\frac {\sqrt {a^{2}-b^{2}}\, \ln \left ({\mathrm e}^{i x}-\frac {-i b +\sqrt {a^{2}-b^{2}}}{a}\right )}{b a}\) | \(285\) |
Input:
int(cot(x)^4/(a+b*csc(x)),x,method=_RETURNVERBOSE)
Output:
-1/4/b^2*(-1/2*b*tan(1/2*x)^2+2*a*tan(1/2*x))-1/8/b/tan(1/2*x)^2+1/4/b^3*( 4*a^2-6*b^2)*ln(tan(1/2*x))+1/2*a/b^2/tan(1/2*x)+2/a*arctan(tan(1/2*x))+1/ 4*(-8*a^4+16*a^2*b^2-8*b^4)/a/b^3/(-a^2+b^2)^(1/2)*arctan(1/2*(2*b*tan(1/2 *x)+2*a)/(-a^2+b^2)^(1/2))
Leaf count of result is larger than twice the leaf count of optimal. 203 vs. \(2 (81) = 162\).
Time = 0.19 (sec) , antiderivative size = 453, normalized size of antiderivative = 4.98 \[ \int \frac {\cot ^4(x)}{a+b \csc (x)} \, dx=\left [\frac {4 \, b^{3} x \cos \left (x\right )^{2} - 4 \, a^{2} b \cos \left (x\right ) \sin \left (x\right ) - 4 \, b^{3} x + 2 \, a b^{2} \cos \left (x\right ) - 2 \, {\left ({\left (a^{2} - b^{2}\right )} \cos \left (x\right )^{2} - a^{2} + b^{2}\right )} \sqrt {a^{2} - b^{2}} \log \left (-\frac {{\left (a^{2} - 2 \, b^{2}\right )} \cos \left (x\right )^{2} + 2 \, a b \sin \left (x\right ) + a^{2} + b^{2} - 2 \, {\left (b \cos \left (x\right ) \sin \left (x\right ) + a \cos \left (x\right )\right )} \sqrt {a^{2} - b^{2}}}{a^{2} \cos \left (x\right )^{2} - 2 \, a b \sin \left (x\right ) - a^{2} - b^{2}}\right ) + {\left (2 \, a^{3} - 3 \, a b^{2} - {\left (2 \, a^{3} - 3 \, a b^{2}\right )} \cos \left (x\right )^{2}\right )} \log \left (\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) - {\left (2 \, a^{3} - 3 \, a b^{2} - {\left (2 \, a^{3} - 3 \, a b^{2}\right )} \cos \left (x\right )^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right )}{4 \, {\left (a b^{3} \cos \left (x\right )^{2} - a b^{3}\right )}}, \frac {4 \, b^{3} x \cos \left (x\right )^{2} - 4 \, a^{2} b \cos \left (x\right ) \sin \left (x\right ) - 4 \, b^{3} x + 2 \, a b^{2} \cos \left (x\right ) + 4 \, {\left ({\left (a^{2} - b^{2}\right )} \cos \left (x\right )^{2} - a^{2} + b^{2}\right )} \sqrt {-a^{2} + b^{2}} \arctan \left (-\frac {\sqrt {-a^{2} + b^{2}} {\left (b \sin \left (x\right ) + a\right )}}{{\left (a^{2} - b^{2}\right )} \cos \left (x\right )}\right ) + {\left (2 \, a^{3} - 3 \, a b^{2} - {\left (2 \, a^{3} - 3 \, a b^{2}\right )} \cos \left (x\right )^{2}\right )} \log \left (\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) - {\left (2 \, a^{3} - 3 \, a b^{2} - {\left (2 \, a^{3} - 3 \, a b^{2}\right )} \cos \left (x\right )^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right )}{4 \, {\left (a b^{3} \cos \left (x\right )^{2} - a b^{3}\right )}}\right ] \] Input:
integrate(cot(x)^4/(a+b*csc(x)),x, algorithm="fricas")
Output:
[1/4*(4*b^3*x*cos(x)^2 - 4*a^2*b*cos(x)*sin(x) - 4*b^3*x + 2*a*b^2*cos(x) - 2*((a^2 - b^2)*cos(x)^2 - a^2 + b^2)*sqrt(a^2 - b^2)*log(-((a^2 - 2*b^2) *cos(x)^2 + 2*a*b*sin(x) + a^2 + b^2 - 2*(b*cos(x)*sin(x) + a*cos(x))*sqrt (a^2 - b^2))/(a^2*cos(x)^2 - 2*a*b*sin(x) - a^2 - b^2)) + (2*a^3 - 3*a*b^2 - (2*a^3 - 3*a*b^2)*cos(x)^2)*log(1/2*cos(x) + 1/2) - (2*a^3 - 3*a*b^2 - (2*a^3 - 3*a*b^2)*cos(x)^2)*log(-1/2*cos(x) + 1/2))/(a*b^3*cos(x)^2 - a*b^ 3), 1/4*(4*b^3*x*cos(x)^2 - 4*a^2*b*cos(x)*sin(x) - 4*b^3*x + 2*a*b^2*cos( x) + 4*((a^2 - b^2)*cos(x)^2 - a^2 + b^2)*sqrt(-a^2 + b^2)*arctan(-sqrt(-a ^2 + b^2)*(b*sin(x) + a)/((a^2 - b^2)*cos(x))) + (2*a^3 - 3*a*b^2 - (2*a^3 - 3*a*b^2)*cos(x)^2)*log(1/2*cos(x) + 1/2) - (2*a^3 - 3*a*b^2 - (2*a^3 - 3*a*b^2)*cos(x)^2)*log(-1/2*cos(x) + 1/2))/(a*b^3*cos(x)^2 - a*b^3)]
\[ \int \frac {\cot ^4(x)}{a+b \csc (x)} \, dx=\int \frac {\cot ^{4}{\left (x \right )}}{a + b \csc {\left (x \right )}}\, dx \] Input:
integrate(cot(x)**4/(a+b*csc(x)),x)
Output:
Integral(cot(x)**4/(a + b*csc(x)), x)
Exception generated. \[ \int \frac {\cot ^4(x)}{a+b \csc (x)} \, dx=\text {Exception raised: ValueError} \] Input:
integrate(cot(x)^4/(a+b*csc(x)),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
Leaf count of result is larger than twice the leaf count of optimal. 163 vs. \(2 (81) = 162\).
Time = 0.19 (sec) , antiderivative size = 163, normalized size of antiderivative = 1.79 \[ \int \frac {\cot ^4(x)}{a+b \csc (x)} \, dx=\frac {x}{a} + \frac {b \tan \left (\frac {1}{2} \, x\right )^{2} - 4 \, a \tan \left (\frac {1}{2} \, x\right )}{8 \, b^{2}} + \frac {{\left (2 \, a^{2} - 3 \, b^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, x\right ) \right |}\right )}{2 \, b^{3}} - \frac {2 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} {\left (\pi \left \lfloor \frac {x}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (b\right ) + \arctan \left (\frac {b \tan \left (\frac {1}{2} \, x\right ) + a}{\sqrt {-a^{2} + b^{2}}}\right )\right )}}{\sqrt {-a^{2} + b^{2}} a b^{3}} - \frac {12 \, a^{2} \tan \left (\frac {1}{2} \, x\right )^{2} - 18 \, b^{2} \tan \left (\frac {1}{2} \, x\right )^{2} - 4 \, a b \tan \left (\frac {1}{2} \, x\right ) + b^{2}}{8 \, b^{3} \tan \left (\frac {1}{2} \, x\right )^{2}} \] Input:
integrate(cot(x)^4/(a+b*csc(x)),x, algorithm="giac")
Output:
x/a + 1/8*(b*tan(1/2*x)^2 - 4*a*tan(1/2*x))/b^2 + 1/2*(2*a^2 - 3*b^2)*log( abs(tan(1/2*x)))/b^3 - 2*(a^4 - 2*a^2*b^2 + b^4)*(pi*floor(1/2*x/pi + 1/2) *sgn(b) + arctan((b*tan(1/2*x) + a)/sqrt(-a^2 + b^2)))/(sqrt(-a^2 + b^2)*a *b^3) - 1/8*(12*a^2*tan(1/2*x)^2 - 18*b^2*tan(1/2*x)^2 - 4*a*b*tan(1/2*x) + b^2)/(b^3*tan(1/2*x)^2)
Time = 16.01 (sec) , antiderivative size = 2163, normalized size of antiderivative = 23.77 \[ \int \frac {\cot ^4(x)}{a+b \csc (x)} \, dx=\text {Too large to display} \] Input:
int(cot(x)^4/(a + b/sin(x)),x)
Output:
(a^3*log(sin(x/2)/cos(x/2)))/(a*b^3 - a*b^3*cos(2*x)) - (2*b^3*atan((2*b^3 *cos(x/2) + 2*a^3*sin(x/2) - 3*a*b^2*sin(x/2))/(2*b^3*sin(x/2) - 2*a^3*cos (x/2) + 3*a*b^2*cos(x/2))))/(a*b^3 - a*b^3*cos(2*x)) - (atan((32*a^6*sin(x /2)*(a^6 - b^6 + 3*a^2*b^4 - 3*a^4*b^2)^(3/2) - 14*b^6*sin(x/2)*(a^6 - b^6 + 3*a^2*b^4 - 3*a^4*b^2)^(3/2) - 14*b^12*sin(x/2)*(a^6 - b^6 + 3*a^2*b^4 - 3*a^4*b^2)^(1/2) + 19*a*b^5*cos(x/2)*(a^6 - b^6 + 3*a^2*b^4 - 3*a^4*b^2) ^(3/2) + 16*a^5*b*cos(x/2)*(a^6 - b^6 + 3*a^2*b^4 - 3*a^4*b^2)^(3/2) + 13* a*b^11*cos(x/2)*(a^6 - b^6 + 3*a^2*b^4 - 3*a^4*b^2)^(1/2) - 36*a^3*b^3*cos (x/2)*(a^6 - b^6 + 3*a^2*b^4 - 3*a^4*b^2)^(3/2) - 24*a^3*b^9*cos(x/2)*(a^6 - b^6 + 3*a^2*b^4 - 3*a^4*b^2)^(1/2) + 8*a^5*b^7*cos(x/2)*(a^6 - b^6 + 3* a^2*b^4 - 3*a^4*b^2)^(1/2) + 2*a^7*b^5*cos(x/2)*(a^6 - b^6 + 3*a^2*b^4 - 3 *a^4*b^2)^(1/2) + 63*a^2*b^4*sin(x/2)*(a^6 - b^6 + 3*a^2*b^4 - 3*a^4*b^2)^ (3/2) - 82*a^4*b^2*sin(x/2)*(a^6 - b^6 + 3*a^2*b^4 - 3*a^4*b^2)^(3/2) + 72 *a^2*b^10*sin(x/2)*(a^6 - b^6 + 3*a^2*b^4 - 3*a^4*b^2)^(1/2) - 106*a^4*b^8 *sin(x/2)*(a^6 - b^6 + 3*a^2*b^4 - 3*a^4*b^2)^(1/2) + 56*a^6*b^6*sin(x/2)* (a^6 - b^6 + 3*a^2*b^4 - 3*a^4*b^2)^(1/2) - 11*a^8*b^4*sin(x/2)*(a^6 - b^6 + 3*a^2*b^4 - 3*a^4*b^2)^(1/2) + 2*a^10*b^2*sin(x/2)*(a^6 - b^6 + 3*a^2*b ^4 - 3*a^4*b^2)^(1/2))/(a^15*sin(x/2)*32i + a^2*b^13*cos(x/2)*27i - a^4*b^ 11*cos(x/2)*165i + a^6*b^9*cos(x/2)*390i - a^8*b^7*cos(x/2)*469i + a^10*b^ 5*cos(x/2)*309i - a^12*b^3*cos(x/2)*108i + a^3*b^12*sin(x/2)*108i - a^5...
Time = 0.20 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.67 \[ \int \frac {\cot ^4(x)}{a+b \csc (x)} \, dx=\frac {4 \sqrt {-a^{2}+b^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {x}{2}\right ) b +a}{\sqrt {-a^{2}+b^{2}}}\right ) \sin \left (x \right )^{2} a^{2}-4 \sqrt {-a^{2}+b^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {x}{2}\right ) b +a}{\sqrt {-a^{2}+b^{2}}}\right ) \sin \left (x \right )^{2} b^{2}+2 \cos \left (x \right ) \sin \left (x \right ) a^{2} b -\cos \left (x \right ) a \,b^{2}+2 \,\mathrm {log}\left (\tan \left (\frac {x}{2}\right )\right ) \sin \left (x \right )^{2} a^{3}-3 \,\mathrm {log}\left (\tan \left (\frac {x}{2}\right )\right ) \sin \left (x \right )^{2} a \,b^{2}+2 \sin \left (x \right )^{2} b^{3} x}{2 \sin \left (x \right )^{2} a \,b^{3}} \] Input:
int(cot(x)^4/(a+b*csc(x)),x)
Output:
(4*sqrt( - a**2 + b**2)*atan((tan(x/2)*b + a)/sqrt( - a**2 + b**2))*sin(x) **2*a**2 - 4*sqrt( - a**2 + b**2)*atan((tan(x/2)*b + a)/sqrt( - a**2 + b** 2))*sin(x)**2*b**2 + 2*cos(x)*sin(x)*a**2*b - cos(x)*a*b**2 + 2*log(tan(x/ 2))*sin(x)**2*a**3 - 3*log(tan(x/2))*sin(x)**2*a*b**2 + 2*sin(x)**2*b**3*x )/(2*sin(x)**2*a*b**3)