Optimal. Leaf size=112 \[ \frac {\log (\cos (x))}{2 a^4}-\frac {3}{a^3 n \sqrt [3]{a^3-b^3 \cos ^n(x)}}-\frac {3 \log \left (a-\sqrt [3]{a^3-b^3 \cos ^n(x)}\right )}{2 a^4 n}-\frac {\sqrt {3} \tan ^{-1}\left (\frac {2 \sqrt [3]{a^3-b^3 \cos ^n(x)}+a}{\sqrt {3} a}\right )}{a^4 n} \]
________________________________________________________________________________________
Rubi [A] time = 0.17, antiderivative size = 112, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.350, Rules used = {3230, 266, 51, 55, 617, 204, 31} \[ -\frac {3}{a^3 n \sqrt [3]{a^3-b^3 \cos ^n(x)}}-\frac {3 \log \left (a-\sqrt [3]{a^3-b^3 \cos ^n(x)}\right )}{2 a^4 n}-\frac {\sqrt {3} \tan ^{-1}\left (\frac {2 \sqrt [3]{a^3-b^3 \cos ^n(x)}+a}{\sqrt {3} a}\right )}{a^4 n}+\frac {\log (\cos (x))}{2 a^4} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 51
Rule 55
Rule 204
Rule 266
Rule 617
Rule 3230
Rubi steps
\begin {align*} \int \frac {\tan (x)}{\left (a^3-b^3 \cos ^n(x)\right )^{4/3}} \, dx &=-\operatorname {Subst}\left (\int \frac {1}{x \left (a^3-b^3 x^n\right )^{4/3}} \, dx,x,\cos (x)\right )\\ &=-\frac {\operatorname {Subst}\left (\int \frac {1}{x \left (a^3-b^3 x\right )^{4/3}} \, dx,x,\cos ^n(x)\right )}{n}\\ &=-\frac {3}{a^3 n \sqrt [3]{a^3-b^3 \cos ^n(x)}}-\frac {\operatorname {Subst}\left (\int \frac {1}{x \sqrt [3]{a^3-b^3 x}} \, dx,x,\cos ^n(x)\right )}{a^3 n}\\ &=-\frac {3}{a^3 n \sqrt [3]{a^3-b^3 \cos ^n(x)}}+\frac {\log (\cos (x))}{2 a^4}+\frac {3 \operatorname {Subst}\left (\int \frac {1}{a-x} \, dx,x,\sqrt [3]{a^3-b^3 \cos ^n(x)}\right )}{2 a^4 n}-\frac {3 \operatorname {Subst}\left (\int \frac {1}{a^2+a x+x^2} \, dx,x,\sqrt [3]{a^3-b^3 \cos ^n(x)}\right )}{2 a^3 n}\\ &=-\frac {3}{a^3 n \sqrt [3]{a^3-b^3 \cos ^n(x)}}+\frac {\log (\cos (x))}{2 a^4}-\frac {3 \log \left (a-\sqrt [3]{a^3-b^3 \cos ^n(x)}\right )}{2 a^4 n}+\frac {3 \operatorname {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,1+\frac {2 \sqrt [3]{a^3-b^3 \cos ^n(x)}}{a}\right )}{a^4 n}\\ &=-\frac {\sqrt {3} \tan ^{-1}\left (\frac {1+\frac {2 \sqrt [3]{a^3-b^3 \cos ^n(x)}}{a}}{\sqrt {3}}\right )}{a^4 n}-\frac {3}{a^3 n \sqrt [3]{a^3-b^3 \cos ^n(x)}}+\frac {\log (\cos (x))}{2 a^4}-\frac {3 \log \left (a-\sqrt [3]{a^3-b^3 \cos ^n(x)}\right )}{2 a^4 n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.04, size = 47, normalized size = 0.42 \[ -\frac {3 \, _2F_1\left (-\frac {1}{3},1;\frac {2}{3};1-\frac {b^3 \cos ^n(x)}{a^3}\right )}{a^3 n \sqrt [3]{a^3-b^3 \cos ^n(x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\tan (x)}{\left (a^3-b^3 \cos ^n(x)\right )^{4/3}} \, dx \]
Verification is Not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.36, size = 185, normalized size = 1.65 \[ -\frac {2 \, {\left (\sqrt {3} b^{3} \cos \relax (x)^{n} - \sqrt {3} a^{3}\right )} \arctan \left (\frac {\sqrt {3} a + 2 \, \sqrt {3} {\left (-b^{3} \cos \relax (x)^{n} + a^{3}\right )}^{\frac {1}{3}}}{3 \, a}\right ) - {\left (b^{3} \cos \relax (x)^{n} - a^{3}\right )} \log \left (a^{2} + {\left (-b^{3} \cos \relax (x)^{n} + a^{3}\right )}^{\frac {1}{3}} a + {\left (-b^{3} \cos \relax (x)^{n} + a^{3}\right )}^{\frac {2}{3}}\right ) + 2 \, {\left (b^{3} \cos \relax (x)^{n} - a^{3}\right )} \log \left (-a + {\left (-b^{3} \cos \relax (x)^{n} + a^{3}\right )}^{\frac {1}{3}}\right ) - 6 \, {\left (-b^{3} \cos \relax (x)^{n} + a^{3}\right )}^{\frac {2}{3}} a}{2 \, {\left (a^{4} b^{3} n \cos \relax (x)^{n} - a^{7} n\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\tan \relax (x)}{{\left (-b^{3} \cos \relax (x)^{n} + a^{3}\right )}^{\frac {4}{3}}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.51, size = 127, normalized size = 1.13
method | result | size |
derivativedivides | \(-\frac {\frac {\ln \left (a -\left (a^{3}-b^{3} \left (\cos ^{n}\relax (x )\right )\right )^{\frac {1}{3}}\right )}{a^{4}}+\frac {-\frac {\ln \left (a^{2}+a \left (a^{3}-b^{3} \left (\cos ^{n}\relax (x )\right )\right )^{\frac {1}{3}}+\left (a^{3}-b^{3} \left (\cos ^{n}\relax (x )\right )\right )^{\frac {2}{3}}\right )}{2}+\sqrt {3}\, \arctan \left (\frac {\left (a +2 \left (a^{3}-b^{3} \left (\cos ^{n}\relax (x )\right )\right )^{\frac {1}{3}}\right ) \sqrt {3}}{3 a}\right )}{a^{4}}+\frac {3}{a^{3} \left (a^{3}-b^{3} \left (\cos ^{n}\relax (x )\right )\right )^{\frac {1}{3}}}}{n}\) | \(127\) |
default | \(-\frac {\frac {\ln \left (a -\left (a^{3}-b^{3} \left (\cos ^{n}\relax (x )\right )\right )^{\frac {1}{3}}\right )}{a^{4}}+\frac {-\frac {\ln \left (a^{2}+a \left (a^{3}-b^{3} \left (\cos ^{n}\relax (x )\right )\right )^{\frac {1}{3}}+\left (a^{3}-b^{3} \left (\cos ^{n}\relax (x )\right )\right )^{\frac {2}{3}}\right )}{2}+\sqrt {3}\, \arctan \left (\frac {\left (a +2 \left (a^{3}-b^{3} \left (\cos ^{n}\relax (x )\right )\right )^{\frac {1}{3}}\right ) \sqrt {3}}{3 a}\right )}{a^{4}}+\frac {3}{a^{3} \left (a^{3}-b^{3} \left (\cos ^{n}\relax (x )\right )\right )^{\frac {1}{3}}}}{n}\) | \(127\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.98, size = 136, normalized size = 1.21 \[ -\frac {\sqrt {3} \arctan \left (\frac {\sqrt {3} {\left (a + 2 \, {\left (-b^{3} \cos \relax (x)^{n} + a^{3}\right )}^{\frac {1}{3}}\right )}}{3 \, a}\right )}{a^{4} n} + \frac {\log \left (a^{2} + {\left (-b^{3} \cos \relax (x)^{n} + a^{3}\right )}^{\frac {1}{3}} a + {\left (-b^{3} \cos \relax (x)^{n} + a^{3}\right )}^{\frac {2}{3}}\right )}{2 \, a^{4} n} - \frac {\log \left (-a + {\left (-b^{3} \cos \relax (x)^{n} + a^{3}\right )}^{\frac {1}{3}}\right )}{a^{4} n} - \frac {3}{{\left (-b^{3} \cos \relax (x)^{n} + a^{3}\right )}^{\frac {1}{3}} a^{3} n} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {\mathrm {tan}\relax (x)}{{\left (a^3-b^3\,{\cos \relax (x)}^n\right )}^{4/3}} \,d x \]
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 {\tan {\relax (x )}}{\left (a^{3} - b^{3} \cos ^{n}{\relax (x )}\right )^{\frac {4}{3}}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________