Optimal. Leaf size=383 \[ -\frac {3 x^2 \text {Li}_2\left (-\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {3 x^2 \text {Li}_2\left (-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}-\frac {6 i x \text {Li}_3\left (-\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {6 i x \text {Li}_3\left (-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {6 \text {Li}_4\left (-\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}-\frac {6 \text {Li}_4\left (-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}-\frac {i x^3 \log \left (1+\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {i x^3 \log \left (1+\frac {b e^{i x}}{\sqrt {a^2-b^2}+a}\right )}{\sqrt {a^2-b^2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.56, antiderivative size = 383, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 7, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.583, Rules used = {3321, 2264, 2190, 2531, 6609, 2282, 6589} \[ -\frac {3 x^2 \text {Li}_2\left (-\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {3 x^2 \text {Li}_2\left (-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}-\frac {6 i x \text {Li}_3\left (-\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {6 i x \text {Li}_3\left (-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {6 \text {Li}_4\left (-\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}-\frac {6 \text {Li}_4\left (-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}-\frac {i x^3 \log \left (1+\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {i x^3 \log \left (1+\frac {b e^{i x}}{\sqrt {a^2-b^2}+a}\right )}{\sqrt {a^2-b^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2190
Rule 2264
Rule 2282
Rule 2531
Rule 3321
Rule 6589
Rule 6609
Rubi steps
\begin {align*} \int \frac {x^3}{a+b \cos (x)} \, dx &=2 \int \frac {e^{i x} x^3}{b+2 a e^{i x}+b e^{2 i x}} \, dx\\ &=\frac {(2 b) \int \frac {e^{i x} x^3}{2 a-2 \sqrt {a^2-b^2}+2 b e^{i x}} \, dx}{\sqrt {a^2-b^2}}-\frac {(2 b) \int \frac {e^{i x} x^3}{2 a+2 \sqrt {a^2-b^2}+2 b e^{i x}} \, dx}{\sqrt {a^2-b^2}}\\ &=-\frac {i x^3 \log \left (1+\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {i x^3 \log \left (1+\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {(3 i) \int x^2 \log \left (1+\frac {2 b e^{i x}}{2 a-2 \sqrt {a^2-b^2}}\right ) \, dx}{\sqrt {a^2-b^2}}-\frac {(3 i) \int x^2 \log \left (1+\frac {2 b e^{i x}}{2 a+2 \sqrt {a^2-b^2}}\right ) \, dx}{\sqrt {a^2-b^2}}\\ &=-\frac {i x^3 \log \left (1+\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {i x^3 \log \left (1+\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}-\frac {3 x^2 \text {Li}_2\left (-\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {3 x^2 \text {Li}_2\left (-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {6 \int x \text {Li}_2\left (-\frac {2 b e^{i x}}{2 a-2 \sqrt {a^2-b^2}}\right ) \, dx}{\sqrt {a^2-b^2}}-\frac {6 \int x \text {Li}_2\left (-\frac {2 b e^{i x}}{2 a+2 \sqrt {a^2-b^2}}\right ) \, dx}{\sqrt {a^2-b^2}}\\ &=-\frac {i x^3 \log \left (1+\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {i x^3 \log \left (1+\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}-\frac {3 x^2 \text {Li}_2\left (-\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {3 x^2 \text {Li}_2\left (-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}-\frac {6 i x \text {Li}_3\left (-\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {6 i x \text {Li}_3\left (-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {(6 i) \int \text {Li}_3\left (-\frac {2 b e^{i x}}{2 a-2 \sqrt {a^2-b^2}}\right ) \, dx}{\sqrt {a^2-b^2}}-\frac {(6 i) \int \text {Li}_3\left (-\frac {2 b e^{i x}}{2 a+2 \sqrt {a^2-b^2}}\right ) \, dx}{\sqrt {a^2-b^2}}\\ &=-\frac {i x^3 \log \left (1+\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {i x^3 \log \left (1+\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}-\frac {3 x^2 \text {Li}_2\left (-\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {3 x^2 \text {Li}_2\left (-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}-\frac {6 i x \text {Li}_3\left (-\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {6 i x \text {Li}_3\left (-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {6 \operatorname {Subst}\left (\int \frac {\text {Li}_3\left (\frac {b x}{-a+\sqrt {a^2-b^2}}\right )}{x} \, dx,x,e^{i x}\right )}{\sqrt {a^2-b^2}}-\frac {6 \operatorname {Subst}\left (\int \frac {\text {Li}_3\left (-\frac {b x}{a+\sqrt {a^2-b^2}}\right )}{x} \, dx,x,e^{i x}\right )}{\sqrt {a^2-b^2}}\\ &=-\frac {i x^3 \log \left (1+\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {i x^3 \log \left (1+\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}-\frac {3 x^2 \text {Li}_2\left (-\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {3 x^2 \text {Li}_2\left (-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}-\frac {6 i x \text {Li}_3\left (-\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {6 i x \text {Li}_3\left (-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {6 \text {Li}_4\left (-\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}-\frac {6 \text {Li}_4\left (-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.92, size = 290, normalized size = 0.76 \[ \frac {-3 x^2 \text {Li}_2\left (\frac {b e^{i x}}{\sqrt {a^2-b^2}-a}\right )+3 x^2 \text {Li}_2\left (-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )-6 i x \text {Li}_3\left (\frac {b e^{i x}}{\sqrt {a^2-b^2}-a}\right )+6 i x \text {Li}_3\left (-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )+6 \text {Li}_4\left (\frac {b e^{i x}}{\sqrt {a^2-b^2}-a}\right )-6 \text {Li}_4\left (-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )-i x^3 \log \left (1+\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )+i x^3 \log \left (1+\frac {b e^{i x}}{\sqrt {a^2-b^2}+a}\right )}{\sqrt {a^2-b^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [C] time = 0.75, size = 1074, normalized size = 2.80 \[ \text {result too large to display} \]
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 {x^{3}}{b \cos \relax (x) + a}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 0.06, size = 0, normalized size = 0.00 \[ \int \frac {x^{3}}{a +b \cos \relax (x )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {x^3}{a+b\,\cos \relax (x)} \,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 {x^{3}}{a + b \cos {\relax (x )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________