Optimal. Leaf size=101 \[ -\frac {\left (a^2-b^2\right )^2}{4 b^5 (a+b \sin (x))^4}+\frac {4 a \left (a^2-b^2\right )}{3 b^5 (a+b \sin (x))^3}-\frac {3 a^2-b^2}{b^5 (a+b \sin (x))^2}+\frac {4 a}{b^5 (a+b \sin (x))}+\frac {\log (a+b \sin (x))}{b^5} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.12, antiderivative size = 101, 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 = {4391, 2668, 697} \[ -\frac {\left (a^2-b^2\right )^2}{4 b^5 (a+b \sin (x))^4}+\frac {4 a \left (a^2-b^2\right )}{3 b^5 (a+b \sin (x))^3}-\frac {3 a^2-b^2}{b^5 (a+b \sin (x))^2}+\frac {4 a}{b^5 (a+b \sin (x))}+\frac {\log (a+b \sin (x))}{b^5} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 697
Rule 2668
Rule 4391
Rubi steps
\begin {align*} \int \frac {1}{(a \sec (x)+b \tan (x))^5} \, dx &=\int \frac {\cos ^5(x)}{(a+b \sin (x))^5} \, dx\\ &=\frac {\operatorname {Subst}\left (\int \frac {\left (b^2-x^2\right )^2}{(a+x)^5} \, dx,x,b \sin (x)\right )}{b^5}\\ &=\frac {\operatorname {Subst}\left (\int \left (\frac {\left (a^2-b^2\right )^2}{(a+x)^5}-\frac {4 \left (a^3-a b^2\right )}{(a+x)^4}+\frac {2 \left (3 a^2-b^2\right )}{(a+x)^3}-\frac {4 a}{(a+x)^2}+\frac {1}{a+x}\right ) \, dx,x,b \sin (x)\right )}{b^5}\\ &=\frac {\log (a+b \sin (x))}{b^5}-\frac {\left (a^2-b^2\right )^2}{4 b^5 (a+b \sin (x))^4}+\frac {4 a \left (a^2-b^2\right )}{3 b^5 (a+b \sin (x))^3}-\frac {3 a^2-b^2}{b^5 (a+b \sin (x))^2}+\frac {4 a}{b^5 (a+b \sin (x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.34, size = 86, normalized size = 0.85 \[ \frac {\frac {25 a^4+12 b^2 \left (9 a^2+b^2\right ) \sin ^2(x)+8 a b \left (11 a^2+b^2\right ) \sin (x)+2 a^2 b^2+48 a b^3 \sin ^3(x)-3 b^4}{12 (a+b \sin (x))^4}+\log (a+b \sin (x))}{b^5} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 1.06, size = 217, normalized size = 2.15 \[ \frac {25 \, a^{4} + 110 \, a^{2} b^{2} + 9 \, b^{4} - 12 \, {\left (9 \, a^{2} b^{2} + b^{4}\right )} \cos \relax (x)^{2} + 12 \, {\left (b^{4} \cos \relax (x)^{4} + a^{4} + 6 \, a^{2} b^{2} + b^{4} - 2 \, {\left (3 \, a^{2} b^{2} + b^{4}\right )} \cos \relax (x)^{2} - 4 \, {\left (a b^{3} \cos \relax (x)^{2} - a^{3} b - a b^{3}\right )} \sin \relax (x)\right )} \log \left (b \sin \relax (x) + a\right ) - 8 \, {\left (6 \, a b^{3} \cos \relax (x)^{2} - 11 \, a^{3} b - 7 \, a b^{3}\right )} \sin \relax (x)}{12 \, {\left (b^{9} \cos \relax (x)^{4} + a^{4} b^{5} + 6 \, a^{2} b^{7} + b^{9} - 2 \, {\left (3 \, a^{2} b^{7} + b^{9}\right )} \cos \relax (x)^{2} - 4 \, {\left (a b^{8} \cos \relax (x)^{2} - a^{3} b^{6} - a b^{8}\right )} \sin \relax (x)\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.14, size = 91, normalized size = 0.90 \[ \frac {\log \left ({\left | b \sin \relax (x) + a \right |}\right )}{b^{5}} - \frac {25 \, b^{3} \sin \relax (x)^{4} + 52 \, a b^{2} \sin \relax (x)^{3} + 42 \, a^{2} b \sin \relax (x)^{2} - 12 \, b^{3} \sin \relax (x)^{2} + 12 \, a^{3} \sin \relax (x) - 8 \, a b^{2} \sin \relax (x) - 2 \, a^{2} b + 3 \, b^{3}}{12 \, {\left (b \sin \relax (x) + a\right )}^{4} b^{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.21, size = 130, normalized size = 1.29 \[ \frac {4 a}{b^{5} \left (a +b \sin \relax (x )\right )}-\frac {a^{4}}{4 b^{5} \left (a +b \sin \relax (x )\right )^{4}}+\frac {a^{2}}{2 b^{3} \left (a +b \sin \relax (x )\right )^{4}}-\frac {1}{4 b \left (a +b \sin \relax (x )\right )^{4}}+\frac {4 a^{3}}{3 b^{5} \left (a +b \sin \relax (x )\right )^{3}}-\frac {4 a}{3 b^{3} \left (a +b \sin \relax (x )\right )^{3}}+\frac {\ln \left (a +b \sin \relax (x )\right )}{b^{5}}-\frac {3 a^{2}}{b^{5} \left (a +b \sin \relax (x )\right )^{2}}+\frac {1}{b^{3} \left (a +b \sin \relax (x )\right )^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.51, size = 483, normalized size = 4.78 \[ -\frac {2 \, {\left (\frac {3 \, {\left (a^{7} - a^{3} b^{4}\right )} \sin \relax (x)}{\cos \relax (x) + 1} + \frac {3 \, {\left (7 \, a^{6} b - 3 \, a^{2} b^{5}\right )} \sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} + \frac {{\left (9 \, a^{7} + 52 \, a^{5} b^{2} - a^{3} b^{4} - 12 \, a b^{6}\right )} \sin \relax (x)^{3}}{{\left (\cos \relax (x) + 1\right )}^{3}} + \frac {2 \, {\left (21 \, a^{6} b + 25 \, a^{4} b^{3} - 7 \, a^{2} b^{5} - 3 \, b^{7}\right )} \sin \relax (x)^{4}}{{\left (\cos \relax (x) + 1\right )}^{4}} + \frac {{\left (9 \, a^{7} + 52 \, a^{5} b^{2} - a^{3} b^{4} - 12 \, a b^{6}\right )} \sin \relax (x)^{5}}{{\left (\cos \relax (x) + 1\right )}^{5}} + \frac {3 \, {\left (7 \, a^{6} b - 3 \, a^{2} b^{5}\right )} \sin \relax (x)^{6}}{{\left (\cos \relax (x) + 1\right )}^{6}} + \frac {3 \, {\left (a^{7} - a^{3} b^{4}\right )} \sin \relax (x)^{7}}{{\left (\cos \relax (x) + 1\right )}^{7}}\right )}}{3 \, {\left (a^{8} b^{4} + \frac {8 \, a^{7} b^{5} \sin \relax (x)}{\cos \relax (x) + 1} + \frac {8 \, a^{7} b^{5} \sin \relax (x)^{7}}{{\left (\cos \relax (x) + 1\right )}^{7}} + \frac {a^{8} b^{4} \sin \relax (x)^{8}}{{\left (\cos \relax (x) + 1\right )}^{8}} + \frac {4 \, {\left (a^{8} b^{4} + 6 \, a^{6} b^{6}\right )} \sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} + \frac {8 \, {\left (3 \, a^{7} b^{5} + 4 \, a^{5} b^{7}\right )} \sin \relax (x)^{3}}{{\left (\cos \relax (x) + 1\right )}^{3}} + \frac {2 \, {\left (3 \, a^{8} b^{4} + 24 \, a^{6} b^{6} + 8 \, a^{4} b^{8}\right )} \sin \relax (x)^{4}}{{\left (\cos \relax (x) + 1\right )}^{4}} + \frac {8 \, {\left (3 \, a^{7} b^{5} + 4 \, a^{5} b^{7}\right )} \sin \relax (x)^{5}}{{\left (\cos \relax (x) + 1\right )}^{5}} + \frac {4 \, {\left (a^{8} b^{4} + 6 \, a^{6} b^{6}\right )} \sin \relax (x)^{6}}{{\left (\cos \relax (x) + 1\right )}^{6}}\right )}} + \frac {\log \left (a + \frac {2 \, b \sin \relax (x)}{\cos \relax (x) + 1} + \frac {a \sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}}\right )}{b^{5}} - \frac {\log \left (\frac {\sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} + 1\right )}{b^{5}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.84, size = 541, normalized size = 5.36 \[ \frac {2\,\mathrm {atanh}\left (\frac {16\,a}{\frac {32\,a^3}{b^2}-16\,a\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2-16\,a+\frac {32\,a^2\,\mathrm {tan}\left (\frac {x}{2}\right )}{b}+\frac {32\,a^3\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{b^2}}+\frac {16\,a\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{\frac {32\,a^3}{b^2}-16\,a\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2-16\,a+\frac {32\,a^2\,\mathrm {tan}\left (\frac {x}{2}\right )}{b}+\frac {32\,a^3\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{b^2}}+\frac {32\,a^2\,\mathrm {tan}\left (\frac {x}{2}\right )}{32\,a^2\,\mathrm {tan}\left (\frac {x}{2}\right )-16\,a\,b+\frac {32\,a^3}{b}+\frac {32\,a^3\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{b}-16\,a\,b\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2}\right )}{b^5}-\frac {\frac {2\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2\,\left (7\,a^4-3\,b^4\right )}{a^2\,b^3}+\frac {2\,{\mathrm {tan}\left (\frac {x}{2}\right )}^6\,\left (7\,a^4-3\,b^4\right )}{a^2\,b^3}+\frac {2\,\mathrm {tan}\left (\frac {x}{2}\right )\,\left (a^4-b^4\right )}{a\,b^4}+\frac {2\,{\mathrm {tan}\left (\frac {x}{2}\right )}^7\,\left (a^4-b^4\right )}{a\,b^4}+\frac {4\,{\mathrm {tan}\left (\frac {x}{2}\right )}^4\,\left (21\,a^6+25\,a^4\,b^2-7\,a^2\,b^4-3\,b^6\right )}{3\,a^4\,b^3}+\frac {2\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3\,\left (9\,a^6+52\,a^4\,b^2-a^2\,b^4-12\,b^6\right )}{3\,a^3\,b^4}+\frac {2\,{\mathrm {tan}\left (\frac {x}{2}\right )}^5\,\left (9\,a^6+52\,a^4\,b^2-a^2\,b^4-12\,b^6\right )}{3\,a^3\,b^4}}{{\mathrm {tan}\left (\frac {x}{2}\right )}^2\,\left (4\,a^4+24\,a^2\,b^2\right )+{\mathrm {tan}\left (\frac {x}{2}\right )}^6\,\left (4\,a^4+24\,a^2\,b^2\right )+{\mathrm {tan}\left (\frac {x}{2}\right )}^3\,\left (24\,a^3\,b+32\,a\,b^3\right )+{\mathrm {tan}\left (\frac {x}{2}\right )}^5\,\left (24\,a^3\,b+32\,a\,b^3\right )+{\mathrm {tan}\left (\frac {x}{2}\right )}^4\,\left (6\,a^4+48\,a^2\,b^2+16\,b^4\right )+a^4+a^4\,{\mathrm {tan}\left (\frac {x}{2}\right )}^8+8\,a^3\,b\,{\mathrm {tan}\left (\frac {x}{2}\right )}^7+8\,a^3\,b\,\mathrm {tan}\left (\frac {x}{2}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 15.19, size = 1719, normalized size = 17.02 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________