Optimal. Leaf size=112 \[ -\frac {\sqrt {3} \tan ^{-1}\left (\frac {a+2 \sqrt [3]{a^3-b^3 \cos ^n(x)}}{\sqrt {3} a}\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} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.11, 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 = {3309, 272, 53,
57, 631, 210, 31} \begin {gather*} \frac {\log (\cos (x))}{2 a^4}-\frac {3}{a^3 n \sqrt [3]{a^3-b^3 \cos ^n(x)}}-\frac {\sqrt {3} \text {ArcTan}\left (\frac {2 \sqrt [3]{a^3-b^3 \cos ^n(x)}+a}{\sqrt {3} a}\right )}{a^4 n}-\frac {3 \log \left (a-\sqrt [3]{a^3-b^3 \cos ^n(x)}\right )}{2 a^4 n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 53
Rule 57
Rule 210
Rule 272
Rule 631
Rule 3309
Rubi steps
\begin {align*} \int \frac {\tan (x)}{\left (a^3-b^3 \cos ^n(x)\right )^{4/3}} \, dx &=-\text {Subst}\left (\int \frac {1}{x \left (a^3-b^3 x^n\right )^{4/3}} \, dx,x,\cos (x)\right )\\ &=-\frac {\text {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 {\text {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 \text {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 \text {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 \text {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] Result contains higher order function than in optimal. Order 5 vs. order 3 in
optimal.
time = 0.03, size = 47, normalized size = 0.42 \begin {gather*} -\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)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.31, size = 127, normalized size = 1.13
method | result | size |
derivativedivides | \(-\frac {\frac {-\frac {\ln \left (a^{2}+a \left (a^{3}-b^{3} \left (\cos ^{n}\left (x \right )\right )\right )^{\frac {1}{3}}+\left (a^{3}-b^{3} \left (\cos ^{n}\left (x \right )\right )\right )^{\frac {2}{3}}\right )}{2}+\sqrt {3}\, \arctan \left (\frac {\left (a +2 \left (a^{3}-b^{3} \left (\cos ^{n}\left (x \right )\right )\right )^{\frac {1}{3}}\right ) \sqrt {3}}{3 a}\right )}{a^{4}}+\frac {\ln \left (a -\left (a^{3}-b^{3} \left (\cos ^{n}\left (x \right )\right )\right )^{\frac {1}{3}}\right )}{a^{4}}+\frac {3}{a^{3} \left (a^{3}-b^{3} \left (\cos ^{n}\left (x \right )\right )\right )^{\frac {1}{3}}}}{n}\) | \(127\) |
default | \(-\frac {\frac {-\frac {\ln \left (a^{2}+a \left (a^{3}-b^{3} \left (\cos ^{n}\left (x \right )\right )\right )^{\frac {1}{3}}+\left (a^{3}-b^{3} \left (\cos ^{n}\left (x \right )\right )\right )^{\frac {2}{3}}\right )}{2}+\sqrt {3}\, \arctan \left (\frac {\left (a +2 \left (a^{3}-b^{3} \left (\cos ^{n}\left (x \right )\right )\right )^{\frac {1}{3}}\right ) \sqrt {3}}{3 a}\right )}{a^{4}}+\frac {\ln \left (a -\left (a^{3}-b^{3} \left (\cos ^{n}\left (x \right )\right )\right )^{\frac {1}{3}}\right )}{a^{4}}+\frac {3}{a^{3} \left (a^{3}-b^{3} \left (\cos ^{n}\left (x \right )\right )\right )^{\frac {1}{3}}}}{n}\) | \(127\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 4.79, size = 136, normalized size = 1.21 \begin {gather*} -\frac {\sqrt {3} \arctan \left (\frac {\sqrt {3} {\left (a + 2 \, {\left (-b^{3} \cos \left (x\right )^{n} + a^{3}\right )}^{\frac {1}{3}}\right )}}{3 \, a}\right )}{a^{4} n} + \frac {\log \left (a^{2} + {\left (-b^{3} \cos \left (x\right )^{n} + a^{3}\right )}^{\frac {1}{3}} a + {\left (-b^{3} \cos \left (x\right )^{n} + a^{3}\right )}^{\frac {2}{3}}\right )}{2 \, a^{4} n} - \frac {\log \left (-a + {\left (-b^{3} \cos \left (x\right )^{n} + a^{3}\right )}^{\frac {1}{3}}\right )}{a^{4} n} - \frac {3}{{\left (-b^{3} \cos \left (x\right )^{n} + a^{3}\right )}^{\frac {1}{3}} a^{3} n} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.80, size = 185, normalized size = 1.65 \begin {gather*} -\frac {2 \, {\left (\sqrt {3} b^{3} \cos \left (x\right )^{n} - \sqrt {3} a^{3}\right )} \arctan \left (\frac {\sqrt {3} a + 2 \, \sqrt {3} {\left (-b^{3} \cos \left (x\right )^{n} + a^{3}\right )}^{\frac {1}{3}}}{3 \, a}\right ) - {\left (b^{3} \cos \left (x\right )^{n} - a^{3}\right )} \log \left (a^{2} + {\left (-b^{3} \cos \left (x\right )^{n} + a^{3}\right )}^{\frac {1}{3}} a + {\left (-b^{3} \cos \left (x\right )^{n} + a^{3}\right )}^{\frac {2}{3}}\right ) + 2 \, {\left (b^{3} \cos \left (x\right )^{n} - a^{3}\right )} \log \left (-a + {\left (-b^{3} \cos \left (x\right )^{n} + a^{3}\right )}^{\frac {1}{3}}\right ) - 6 \, {\left (-b^{3} \cos \left (x\right )^{n} + a^{3}\right )}^{\frac {2}{3}} a}{2 \, {\left (a^{4} b^{3} n \cos \left (x\right )^{n} - a^{7} n\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\tan {\left (x \right )}}{\left (a^{3} - b^{3} \cos ^{n}{\left (x \right )}\right )^{\frac {4}{3}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\mathrm {tan}\left (x\right )}{{\left (a^3-b^3\,{\cos \left (x\right )}^n\right )}^{4/3}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________