Integrand size = 11, antiderivative size = 50 \[ \int \frac {1}{(a \cot (x)+b \csc (x))^3} \, dx=\frac {a^2-b^2}{2 a^3 (b+a \cos (x))^2}+\frac {2 b}{a^3 (b+a \cos (x))}+\frac {\log (b+a \cos (x))}{a^3} \] Output:
1/2*(a^2-b^2)/a^3/(b+a*cos(x))^2+2*b/a^3/(b+a*cos(x))+ln(b+a*cos(x))/a^3
Time = 0.12 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.54 \[ \int \frac {1}{(a \cot (x)+b \csc (x))^3} \, dx=\frac {a^2+3 b^2+a^2 \log (b+a \cos (x))+2 b^2 \log (b+a \cos (x))+a^2 \cos (2 x) \log (b+a \cos (x))+4 a b \cos (x) (1+\log (b+a \cos (x)))}{2 a^3 (b+a \cos (x))^2} \] Input:
Integrate[(a*Cot[x] + b*Csc[x])^(-3),x]
Output:
(a^2 + 3*b^2 + a^2*Log[b + a*Cos[x]] + 2*b^2*Log[b + a*Cos[x]] + a^2*Cos[2 *x]*Log[b + a*Cos[x]] + 4*a*b*Cos[x]*(1 + Log[b + a*Cos[x]]))/(2*a^3*(b + a*Cos[x])^2)
Time = 0.30 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.94, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.545, Rules used = {3042, 4892, 3042, 3147, 476, 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 {1}{(a \cot (x)+b \csc (x))^3} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{(a \cot (x)+b \csc (x))^3}dx\) |
\(\Big \downarrow \) 4892 |
\(\displaystyle \int \frac {\sin ^3(x)}{(a \cos (x)+b)^3}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos \left (x-\frac {\pi }{2}\right )^3}{\left (b-a \sin \left (x-\frac {\pi }{2}\right )\right )^3}dx\) |
\(\Big \downarrow \) 3147 |
\(\displaystyle -\frac {\int \frac {a^2-a^2 \cos ^2(x)}{(b+a \cos (x))^3}d(a \cos (x))}{a^3}\) |
\(\Big \downarrow \) 476 |
\(\displaystyle -\frac {\int \left (\frac {2 b}{(b+a \cos (x))^2}+\frac {1}{-b-a \cos (x)}+\frac {a^2-b^2}{(b+a \cos (x))^3}\right )d(a \cos (x))}{a^3}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {-\frac {a^2-b^2}{2 (a \cos (x)+b)^2}-\frac {2 b}{a \cos (x)+b}-\log (a \cos (x)+b)}{a^3}\) |
Input:
Int[(a*Cot[x] + b*Csc[x])^(-3),x]
Output:
-((-1/2*(a^2 - b^2)/(b + a*Cos[x])^2 - (2*b)/(b + a*Cos[x]) - Log[b + a*Co s[x]])/a^3)
Int[((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ ExpandIntegrand[(c + d*x)^n*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d, n}, x] && IGtQ[p, 0]
Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m _.), x_Symbol] :> Simp[1/(b^p*f) Subst[Int[(a + x)^m*(b^2 - x^2)^((p - 1) /2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && IntegerQ[(p - 1)/2] && NeQ[a^2 - b^2, 0]
Int[(cot[(c_.) + (d_.)*(x_)]^(n_.)*(a_.) + csc[(c_.) + (d_.)*(x_)]^(n_.)*(b _.))^(p_)*(u_.), x_Symbol] :> Int[ActivateTrig[u]*Csc[c + d*x]^(n*p)*(b + a *Cos[c + d*x]^n)^p, x] /; FreeQ[{a, b, c, d}, x] && IntegersQ[n, p]
Time = 5.97 (sec) , antiderivative size = 49, normalized size of antiderivative = 0.98
method | result | size |
default | \(\frac {\ln \left (b +a \cos \left (x \right )\right )}{a^{3}}-\frac {-a^{2}+b^{2}}{2 a^{3} \left (b +a \cos \left (x \right )\right )^{2}}+\frac {2 b}{a^{3} \left (b +a \cos \left (x \right )\right )}\) | \(49\) |
risch | \(-\frac {i x}{a^{3}}+\frac {4 b a \,{\mathrm e}^{3 i x}+2 \,{\mathrm e}^{2 i x} a^{2}+6 \,{\mathrm e}^{2 i x} b^{2}+4 a b \,{\mathrm e}^{i x}}{a^{3} \left (a \,{\mathrm e}^{2 i x}+2 b \,{\mathrm e}^{i x}+a \right )^{2}}+\frac {\ln \left ({\mathrm e}^{2 i x}+\frac {2 b \,{\mathrm e}^{i x}}{a}+1\right )}{a^{3}}\) | \(94\) |
Input:
int(1/(a*cot(x)+b*csc(x))^3,x,method=_RETURNVERBOSE)
Output:
ln(b+a*cos(x))/a^3-1/2*(-a^2+b^2)/a^3/(b+a*cos(x))^2+2*b/a^3/(b+a*cos(x))
Time = 0.09 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.40 \[ \int \frac {1}{(a \cot (x)+b \csc (x))^3} \, dx=\frac {4 \, a b \cos \left (x\right ) + a^{2} + 3 \, b^{2} + 2 \, {\left (a^{2} \cos \left (x\right )^{2} + 2 \, a b \cos \left (x\right ) + b^{2}\right )} \log \left (a \cos \left (x\right ) + b\right )}{2 \, {\left (a^{5} \cos \left (x\right )^{2} + 2 \, a^{4} b \cos \left (x\right ) + a^{3} b^{2}\right )}} \] Input:
integrate(1/(a*cot(x)+b*csc(x))^3,x, algorithm="fricas")
Output:
1/2*(4*a*b*cos(x) + a^2 + 3*b^2 + 2*(a^2*cos(x)^2 + 2*a*b*cos(x) + b^2)*lo g(a*cos(x) + b))/(a^5*cos(x)^2 + 2*a^4*b*cos(x) + a^3*b^2)
\[ \int \frac {1}{(a \cot (x)+b \csc (x))^3} \, dx=\int \frac {1}{\left (a \cot {\left (x \right )} + b \csc {\left (x \right )}\right )^{3}}\, dx \] Input:
integrate(1/(a*cot(x)+b*csc(x))**3,x)
Output:
Integral((a*cot(x) + b*csc(x))**(-3), x)
Leaf count of result is larger than twice the leaf count of optimal. 177 vs. \(2 (48) = 96\).
Time = 0.12 (sec) , antiderivative size = 177, normalized size of antiderivative = 3.54 \[ \int \frac {1}{(a \cot (x)+b \csc (x))^3} \, dx=\frac {2 \, {\left (a b + b^{2} + \frac {{\left (a^{2} - 2 \, a b + b^{2}\right )} \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}}\right )}}{a^{5} + a^{4} b - a^{3} b^{2} - a^{2} b^{3} - \frac {2 \, {\left (a^{5} - a^{4} b - a^{3} b^{2} + a^{2} b^{3}\right )} \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + \frac {{\left (a^{5} - 3 \, a^{4} b + 3 \, a^{3} b^{2} - a^{2} b^{3}\right )} \sin \left (x\right )^{4}}{{\left (\cos \left (x\right ) + 1\right )}^{4}}} + \frac {\log \left (a + b - \frac {{\left (a - b\right )} \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}}\right )}{a^{3}} - \frac {\log \left (\frac {\sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + 1\right )}{a^{3}} \] Input:
integrate(1/(a*cot(x)+b*csc(x))^3,x, algorithm="maxima")
Output:
2*(a*b + b^2 + (a^2 - 2*a*b + b^2)*sin(x)^2/(cos(x) + 1)^2)/(a^5 + a^4*b - a^3*b^2 - a^2*b^3 - 2*(a^5 - a^4*b - a^3*b^2 + a^2*b^3)*sin(x)^2/(cos(x) + 1)^2 + (a^5 - 3*a^4*b + 3*a^3*b^2 - a^2*b^3)*sin(x)^4/(cos(x) + 1)^4) + log(a + b - (a - b)*sin(x)^2/(cos(x) + 1)^2)/a^3 - log(sin(x)^2/(cos(x) + 1)^2 + 1)/a^3
Time = 0.11 (sec) , antiderivative size = 45, normalized size of antiderivative = 0.90 \[ \int \frac {1}{(a \cot (x)+b \csc (x))^3} \, dx=\frac {\log \left ({\left | a \cos \left (x\right ) + b \right |}\right )}{a^{3}} + \frac {4 \, b \cos \left (x\right ) + \frac {a^{2} + 3 \, b^{2}}{a}}{2 \, {\left (a \cos \left (x\right ) + b\right )}^{2} a^{2}} \] Input:
integrate(1/(a*cot(x)+b*csc(x))^3,x, algorithm="giac")
Output:
log(abs(a*cos(x) + b))/a^3 + 1/2*(4*b*cos(x) + (a^2 + 3*b^2)/a)/((a*cos(x) + b)^2*a^2)
Time = 17.04 (sec) , antiderivative size = 311, normalized size of antiderivative = 6.22 \[ \int \frac {1}{(a \cot (x)+b \csc (x))^3} \, dx=\frac {\frac {2\,\left (b^2+a\,b\right )}{a^2\,\left (a-b\right )}+\frac {2\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2\,\left (a-b\right )}{a^2}}{{\mathrm {tan}\left (\frac {x}{2}\right )}^4\,\left (a^2-2\,a\,b+b^2\right )+2\,a\,b-{\mathrm {tan}\left (\frac {x}{2}\right )}^2\,\left (2\,a^2-2\,b^2\right )+a^2+b^2}-\frac {2\,\mathrm {atanh}\left (\frac {32\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{\frac {32\,b^3}{a^3}-\frac {32\,b^2}{a^2}-\frac {32\,b}{a}+\frac {32\,b\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{a}-\frac {64\,b^2\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{a^2}+\frac {32\,b^3\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{a^3}+32}-\frac {64\,b\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{32\,a-32\,b+32\,b\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2-\frac {32\,b^2}{a}+\frac {32\,b^3}{a^2}-\frac {64\,b^2\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{a}+\frac {32\,b^3\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{a^2}}+\frac {32\,b^2\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{32\,a^2-32\,a\,b-32\,b^2-64\,b^2\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2+\frac {32\,b^3}{a}+\frac {32\,b^3\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{a}+32\,a\,b\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}\right )}{a^3} \] Input:
int(1/(b/sin(x) + a*cot(x))^3,x)
Output:
((2*(a*b + b^2))/(a^2*(a - b)) + (2*tan(x/2)^2*(a - b))/a^2)/(tan(x/2)^4*( a^2 - 2*a*b + b^2) + 2*a*b - tan(x/2)^2*(2*a^2 - 2*b^2) + a^2 + b^2) - (2* atanh((32*tan(x/2)^2)/((32*b^3)/a^3 - (32*b^2)/a^2 - (32*b)/a + (32*b*tan( x/2)^2)/a - (64*b^2*tan(x/2)^2)/a^2 + (32*b^3*tan(x/2)^2)/a^3 + 32) - (64* b*tan(x/2)^2)/(32*a - 32*b + 32*b*tan(x/2)^2 - (32*b^2)/a + (32*b^3)/a^2 - (64*b^2*tan(x/2)^2)/a + (32*b^3*tan(x/2)^2)/a^2) + (32*b^2*tan(x/2)^2)/(3 2*a^2 - 32*a*b - 32*b^2 - 64*b^2*tan(x/2)^2 + (32*b^3)/a + (32*b^3*tan(x/2 )^2)/a + 32*a*b*tan(x/2)^2)))/a^3
Time = 0.17 (sec) , antiderivative size = 492, normalized size of antiderivative = 9.84 \[ \int \frac {1}{(a \cot (x)+b \csc (x))^3} \, dx =\text {Too large to display} \] Input:
int(1/(a*cot(x)+b*csc(x))^3,x)
Output:
( - 4*cos(x)*log(tan(x/2)**2 + 1)*a**2*b - 4*cos(x)*log(tan(x/2)**2 + 1)*a *b**2 + 4*cos(x)*log(tan(x/2)**2*a - tan(x/2)**2*b - a - b)*a**2*b + 4*cos (x)*log(tan(x/2)**2*a - tan(x/2)**2*b - a - b)*a*b**2 + 2*cos(x)*a**2*b - 2*cos(x)*a*b**2 + 2*log(tan(x/2)**2 + 1)*sin(x)**2*a**3 + 2*log(tan(x/2)** 2 + 1)*sin(x)**2*a**2*b - 2*log(tan(x/2)**2 + 1)*a**3 - 2*log(tan(x/2)**2 + 1)*a**2*b - 2*log(tan(x/2)**2 + 1)*a*b**2 - 2*log(tan(x/2)**2 + 1)*b**3 - 2*log(tan(x/2)**2*a - tan(x/2)**2*b - a - b)*sin(x)**2*a**3 - 2*log(tan( x/2)**2*a - tan(x/2)**2*b - a - b)*sin(x)**2*a**2*b + 2*log(tan(x/2)**2*a - tan(x/2)**2*b - a - b)*a**3 + 2*log(tan(x/2)**2*a - tan(x/2)**2*b - a - b)*a**2*b + 2*log(tan(x/2)**2*a - tan(x/2)**2*b - a - b)*a*b**2 + 2*log(ta n(x/2)**2*a - tan(x/2)**2*b - a - b)*b**3 + sin(x)**2*a**3 + 3*sin(x)**2*a **2*b - 2*a**2*b + 2*a*b**2)/(2*a**3*(2*cos(x)*a**2*b + 2*cos(x)*a*b**2 - sin(x)**2*a**3 - sin(x)**2*a**2*b + a**3 + a**2*b + a*b**2 + b**3))