Optimal. Leaf size=112 \[ -\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} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.168556, antiderivative size = 112, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.35, 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 3230
Rule 266
Rule 51
Rule 55
Rule 617
Rule 204
Rule 31
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.0420222, 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]
________________________________________________________________________________________
Maple [A] time = 0.027, size = 137, normalized size = 1.2 \begin{align*}{\frac{1}{2\,n{a}^{4}}\ln \left ( \left ({a}^{3}-{b}^{3} \left ( \cos \left ( x \right ) \right ) ^{n} \right ) ^{{\frac{2}{3}}}+a\sqrt [3]{{a}^{3}-{b}^{3} \left ( \cos \left ( x \right ) \right ) ^{n}}+{a}^{2} \right ) }-{\frac{\sqrt{3}}{n{a}^{4}}\arctan \left ({\frac{\sqrt{3}}{3\,a} \left ( a+2\,\sqrt [3]{{a}^{3}-{b}^{3} \left ( \cos \left ( x \right ) \right ) ^{n}} \right ) } \right ) }-{\frac{1}{n{a}^{4}}\ln \left ( -a+\sqrt [3]{{a}^{3}-{b}^{3} \left ( \cos \left ( x \right ) \right ) ^{n}} \right ) }-3\,{\frac{1}{{a}^{3}n\sqrt [3]{{a}^{3}-{b}^{3} \left ( \cos \left ( x \right ) \right ) ^{n}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.42737, size = 184, normalized size = 1.64 \begin{align*} -\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{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.95077, size = 450, normalized size = 4.02 \begin{align*} -\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{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\tan \left (x\right )}{{\left (-b^{3} \cos \left (x\right )^{n} + a^{3}\right )}^{\frac{4}{3}}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]