Optimal. Leaf size=50 \[ \frac {2 b}{a^3 (a \cos (x)+b)}+\frac {\log (a \cos (x)+b)}{a^3}+\frac {a^2-b^2}{2 a^3 (a \cos (x)+b)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 50, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {4392, 2668, 697} \[ \frac {a^2-b^2}{2 a^3 (a \cos (x)+b)^2}+\frac {2 b}{a^3 (a \cos (x)+b)}+\frac {\log (a \cos (x)+b)}{a^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 697
Rule 2668
Rule 4392
Rubi steps
\begin {align*} \int \frac {1}{(a \cot (x)+b \csc (x))^3} \, dx &=\int \frac {\sin ^3(x)}{(b+a \cos (x))^3} \, dx\\ &=-\frac {\operatorname {Subst}\left (\int \frac {a^2-x^2}{(b+x)^3} \, dx,x,a \cos (x)\right )}{a^3}\\ &=-\frac {\operatorname {Subst}\left (\int \left (\frac {1}{-b-x}+\frac {a^2-b^2}{(b+x)^3}+\frac {2 b}{(b+x)^2}\right ) \, dx,x,a \cos (x)\right )}{a^3}\\ &=\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}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.11, size = 77, normalized size = 1.54 \[ \frac {a^2 \cos (2 x) \log (a \cos (x)+b)+a^2 \log (a \cos (x)+b)+a^2+2 b^2 \log (a \cos (x)+b)+4 a b \cos (x) (\log (a \cos (x)+b)+1)+3 b^2}{2 a^3 (a \cos (x)+b)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.84, size = 70, normalized size = 1.40 \[ \frac {4 \, a b \cos \relax (x) + a^{2} + 3 \, b^{2} + 2 \, {\left (a^{2} \cos \relax (x)^{2} + 2 \, a b \cos \relax (x) + b^{2}\right )} \log \left (a \cos \relax (x) + b\right )}{2 \, {\left (a^{5} \cos \relax (x)^{2} + 2 \, a^{4} b \cos \relax (x) + a^{3} b^{2}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.13, size = 45, normalized size = 0.90 \[ \frac {\log \left ({\left | a \cos \relax (x) + b \right |}\right )}{a^{3}} + \frac {4 \, b \cos \relax (x) + \frac {a^{2} + 3 \, b^{2}}{a}}{2 \, {\left (a \cos \relax (x) + b\right )}^{2} a^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.12, size = 56, normalized size = 1.12 \[ \frac {\ln \left (b +a \cos \relax (x )\right )}{a^{3}}+\frac {1}{2 a \left (b +a \cos \relax (x )\right )^{2}}-\frac {b^{2}}{2 a^{3} \left (b +a \cos \relax (x )\right )^{2}}+\frac {2 b}{a^{3} \left (b +a \cos \relax (x )\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.43, size = 177, normalized size = 3.54 \[ \frac {2 \, {\left (a b + b^{2} + \frac {{\left (a^{2} - 2 \, a b + b^{2}\right )} \sin \relax (x)^{2}}{{\left (\cos \relax (x) + 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 \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} + \frac {{\left (a^{5} - 3 \, a^{4} b + 3 \, a^{3} b^{2} - a^{2} b^{3}\right )} \sin \relax (x)^{4}}{{\left (\cos \relax (x) + 1\right )}^{4}}} + \frac {\log \left (a + b - \frac {{\left (a - b\right )} \sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}}\right )}{a^{3}} - \frac {\log \left (\frac {\sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} + 1\right )}{a^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.77, size = 311, normalized size = 6.22 \[ \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} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{\left (a \cot {\relax (x )} + b \csc {\relax (x )}\right )^{3}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________