\(\int \frac {x^3}{a+b \cos (x)} \, dx\) [185]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [F]
Fricas [B] (verification not implemented)
Sympy [F]
Maxima [F(-2)]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 12, antiderivative size = 383 \[ \int \frac {x^3}{a+b \cos (x)} \, dx=-\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 \operatorname {PolyLog}\left (2,-\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {3 x^2 \operatorname {PolyLog}\left (2,-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}-\frac {6 i x \operatorname {PolyLog}\left (3,-\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {6 i x \operatorname {PolyLog}\left (3,-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {6 \operatorname {PolyLog}\left (4,-\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}-\frac {6 \operatorname {PolyLog}\left (4,-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}} \] Output:

-I*x^3*ln(1+b*exp(I*x)/(a-(a^2-b^2)^(1/2)))/(a^2-b^2)^(1/2)+I*x^3*ln(1+b*e 
xp(I*x)/(a+(a^2-b^2)^(1/2)))/(a^2-b^2)^(1/2)-3*x^2*polylog(2,-b*exp(I*x)/( 
a-(a^2-b^2)^(1/2)))/(a^2-b^2)^(1/2)+3*x^2*polylog(2,-b*exp(I*x)/(a+(a^2-b^ 
2)^(1/2)))/(a^2-b^2)^(1/2)-6*I*x*polylog(3,-b*exp(I*x)/(a-(a^2-b^2)^(1/2)) 
)/(a^2-b^2)^(1/2)+6*I*x*polylog(3,-b*exp(I*x)/(a+(a^2-b^2)^(1/2)))/(a^2-b^ 
2)^(1/2)+6*polylog(4,-b*exp(I*x)/(a-(a^2-b^2)^(1/2)))/(a^2-b^2)^(1/2)-6*po 
lylog(4,-b*exp(I*x)/(a+(a^2-b^2)^(1/2)))/(a^2-b^2)^(1/2)
 

Mathematica [A] (verified)

Time = 1.80 (sec) , antiderivative size = 290, normalized size of antiderivative = 0.76 \[ \int \frac {x^3}{a+b \cos (x)} \, dx=\frac {-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}}{a+\sqrt {a^2-b^2}}\right )-3 x^2 \operatorname {PolyLog}\left (2,\frac {b e^{i x}}{-a+\sqrt {a^2-b^2}}\right )+3 x^2 \operatorname {PolyLog}\left (2,-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )-6 i x \operatorname {PolyLog}\left (3,\frac {b e^{i x}}{-a+\sqrt {a^2-b^2}}\right )+6 i x \operatorname {PolyLog}\left (3,-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )+6 \operatorname {PolyLog}\left (4,\frac {b e^{i x}}{-a+\sqrt {a^2-b^2}}\right )-6 \operatorname {PolyLog}\left (4,-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}} \] Input:

Integrate[x^3/(a + b*Cos[x]),x]
 

Output:

((-I)*x^3*Log[1 + (b*E^(I*x))/(a - Sqrt[a^2 - b^2])] + I*x^3*Log[1 + (b*E^ 
(I*x))/(a + Sqrt[a^2 - b^2])] - 3*x^2*PolyLog[2, (b*E^(I*x))/(-a + Sqrt[a^ 
2 - b^2])] + 3*x^2*PolyLog[2, -((b*E^(I*x))/(a + Sqrt[a^2 - b^2]))] - (6*I 
)*x*PolyLog[3, (b*E^(I*x))/(-a + Sqrt[a^2 - b^2])] + (6*I)*x*PolyLog[3, -( 
(b*E^(I*x))/(a + Sqrt[a^2 - b^2]))] + 6*PolyLog[4, (b*E^(I*x))/(-a + Sqrt[ 
a^2 - b^2])] - 6*PolyLog[4, -((b*E^(I*x))/(a + Sqrt[a^2 - b^2]))])/Sqrt[a^ 
2 - b^2]
 

Rubi [A] (verified)

Time = 1.34 (sec) , antiderivative size = 351, normalized size of antiderivative = 0.92, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.750, Rules used = {3042, 3802, 2694, 27, 2620, 3011, 7163, 2720, 7143}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {x^3}{a+b \cos (x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {x^3}{a+b \sin \left (x+\frac {\pi }{2}\right )}dx\)

\(\Big \downarrow \) 3802

\(\displaystyle 2 \int \frac {e^{i x} x^3}{2 e^{i x} a+b e^{2 i x}+b}dx\)

\(\Big \downarrow \) 2694

\(\displaystyle 2 \left (\frac {b \int \frac {e^{i x} x^3}{2 \left (a+b e^{i x}-\sqrt {a^2-b^2}\right )}dx}{\sqrt {a^2-b^2}}-\frac {b \int \frac {e^{i x} x^3}{2 \left (a+b e^{i x}+\sqrt {a^2-b^2}\right )}dx}{\sqrt {a^2-b^2}}\right )\)

\(\Big \downarrow \) 27

\(\displaystyle 2 \left (\frac {b \int \frac {e^{i x} x^3}{a+b e^{i x}-\sqrt {a^2-b^2}}dx}{2 \sqrt {a^2-b^2}}-\frac {b \int \frac {e^{i x} x^3}{a+b e^{i x}+\sqrt {a^2-b^2}}dx}{2 \sqrt {a^2-b^2}}\right )\)

\(\Big \downarrow \) 2620

\(\displaystyle 2 \left (\frac {b \left (\frac {3 i \int x^2 \log \left (\frac {e^{i x} b}{a-\sqrt {a^2-b^2}}+1\right )dx}{b}-\frac {i x^3 \log \left (1+\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )}{b}\right )}{2 \sqrt {a^2-b^2}}-\frac {b \left (\frac {3 i \int x^2 \log \left (\frac {e^{i x} b}{a+\sqrt {a^2-b^2}}+1\right )dx}{b}-\frac {i x^3 \log \left (1+\frac {b e^{i x}}{\sqrt {a^2-b^2}+a}\right )}{b}\right )}{2 \sqrt {a^2-b^2}}\right )\)

\(\Big \downarrow \) 3011

\(\displaystyle 2 \left (\frac {b \left (\frac {3 i \left (i x^2 \operatorname {PolyLog}\left (2,-\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )-2 i \int x \operatorname {PolyLog}\left (2,-\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )dx\right )}{b}-\frac {i x^3 \log \left (1+\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )}{b}\right )}{2 \sqrt {a^2-b^2}}-\frac {b \left (\frac {3 i \left (i x^2 \operatorname {PolyLog}\left (2,-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )-2 i \int x \operatorname {PolyLog}\left (2,-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )dx\right )}{b}-\frac {i x^3 \log \left (1+\frac {b e^{i x}}{\sqrt {a^2-b^2}+a}\right )}{b}\right )}{2 \sqrt {a^2-b^2}}\right )\)

\(\Big \downarrow \) 7163

\(\displaystyle 2 \left (\frac {b \left (\frac {3 i \left (i x^2 \operatorname {PolyLog}\left (2,-\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )-2 i \left (i \int \operatorname {PolyLog}\left (3,-\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )dx-i x \operatorname {PolyLog}\left (3,-\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )\right )\right )}{b}-\frac {i x^3 \log \left (1+\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )}{b}\right )}{2 \sqrt {a^2-b^2}}-\frac {b \left (\frac {3 i \left (i x^2 \operatorname {PolyLog}\left (2,-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )-2 i \left (i \int \operatorname {PolyLog}\left (3,-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )dx-i x \operatorname {PolyLog}\left (3,-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )\right )\right )}{b}-\frac {i x^3 \log \left (1+\frac {b e^{i x}}{\sqrt {a^2-b^2}+a}\right )}{b}\right )}{2 \sqrt {a^2-b^2}}\right )\)

\(\Big \downarrow \) 2720

\(\displaystyle 2 \left (\frac {b \left (\frac {3 i \left (i x^2 \operatorname {PolyLog}\left (2,-\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )-2 i \left (\int e^{-i x} \operatorname {PolyLog}\left (3,-\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )de^{i x}-i x \operatorname {PolyLog}\left (3,-\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )\right )\right )}{b}-\frac {i x^3 \log \left (1+\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )}{b}\right )}{2 \sqrt {a^2-b^2}}-\frac {b \left (\frac {3 i \left (i x^2 \operatorname {PolyLog}\left (2,-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )-2 i \left (\int e^{-i x} \operatorname {PolyLog}\left (3,-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )de^{i x}-i x \operatorname {PolyLog}\left (3,-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )\right )\right )}{b}-\frac {i x^3 \log \left (1+\frac {b e^{i x}}{\sqrt {a^2-b^2}+a}\right )}{b}\right )}{2 \sqrt {a^2-b^2}}\right )\)

\(\Big \downarrow \) 7143

\(\displaystyle 2 \left (\frac {b \left (\frac {3 i \left (i x^2 \operatorname {PolyLog}\left (2,-\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )-2 i \left (\operatorname {PolyLog}\left (4,-\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )-i x \operatorname {PolyLog}\left (3,-\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )\right )\right )}{b}-\frac {i x^3 \log \left (1+\frac {b e^{i x}}{a-\sqrt {a^2-b^2}}\right )}{b}\right )}{2 \sqrt {a^2-b^2}}-\frac {b \left (\frac {3 i \left (i x^2 \operatorname {PolyLog}\left (2,-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )-2 i \left (\operatorname {PolyLog}\left (4,-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )-i x \operatorname {PolyLog}\left (3,-\frac {b e^{i x}}{a+\sqrt {a^2-b^2}}\right )\right )\right )}{b}-\frac {i x^3 \log \left (1+\frac {b e^{i x}}{\sqrt {a^2-b^2}+a}\right )}{b}\right )}{2 \sqrt {a^2-b^2}}\right )\)

Input:

Int[x^3/(a + b*Cos[x]),x]
 

Output:

2*((b*(((-I)*x^3*Log[1 + (b*E^(I*x))/(a - Sqrt[a^2 - b^2])])/b + ((3*I)*(I 
*x^2*PolyLog[2, -((b*E^(I*x))/(a - Sqrt[a^2 - b^2]))] - (2*I)*((-I)*x*Poly 
Log[3, -((b*E^(I*x))/(a - Sqrt[a^2 - b^2]))] + PolyLog[4, -((b*E^(I*x))/(a 
 - Sqrt[a^2 - b^2]))])))/b))/(2*Sqrt[a^2 - b^2]) - (b*(((-I)*x^3*Log[1 + ( 
b*E^(I*x))/(a + Sqrt[a^2 - b^2])])/b + ((3*I)*(I*x^2*PolyLog[2, -((b*E^(I* 
x))/(a + Sqrt[a^2 - b^2]))] - (2*I)*((-I)*x*PolyLog[3, -((b*E^(I*x))/(a + 
Sqrt[a^2 - b^2]))] + PolyLog[4, -((b*E^(I*x))/(a + Sqrt[a^2 - b^2]))])))/b 
))/(2*Sqrt[a^2 - b^2]))
 

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 2620
Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/ 
((a_) + (b_.)*((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp 
[((c + d*x)^m/(b*f*g*n*Log[F]))*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x] - Si 
mp[d*(m/(b*f*g*n*Log[F]))   Int[(c + d*x)^(m - 1)*Log[1 + b*((F^(g*(e + f*x 
)))^n/a)], x], x] /; FreeQ[{F, a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]
 

rule 2694
Int[((F_)^(u_)*((f_.) + (g_.)*(x_))^(m_.))/((a_.) + (b_.)*(F_)^(u_) + (c_.) 
*(F_)^(v_)), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Simp[2*(c/q)   Int 
[(f + g*x)^m*(F^u/(b - q + 2*c*F^u)), x], x] - Simp[2*(c/q)   Int[(f + g*x) 
^m*(F^u/(b + q + 2*c*F^u)), x], x]] /; FreeQ[{F, a, b, c, f, g}, x] && EqQ[ 
v, 2*u] && LinearQ[u, x] && NeQ[b^2 - 4*a*c, 0] && IGtQ[m, 0]
 

rule 2720
Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Simp[v/D[v, x] 
   Subst[Int[FunctionOfExponentialFunction[u, x]/x, x], x, v], x]] /; Funct 
ionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; FreeQ 
[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x)) 
*(F_)[v_] /; FreeQ[{a, b, c}, x] && InverseFunctionQ[F[x]]]
 

rule 3011
Int[Log[1 + (e_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.)]*((f_.) + (g_.) 
*(x_))^(m_.), x_Symbol] :> Simp[(-(f + g*x)^m)*(PolyLog[2, (-e)*(F^(c*(a + 
b*x)))^n]/(b*c*n*Log[F])), x] + Simp[g*(m/(b*c*n*Log[F]))   Int[(f + g*x)^( 
m - 1)*PolyLog[2, (-e)*(F^(c*(a + b*x)))^n], x], x] /; FreeQ[{F, a, b, c, e 
, f, g, n}, x] && GtQ[m, 0]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3802
Int[((c_.) + (d_.)*(x_))^(m_.)/((a_) + (b_.)*sin[(e_.) + Pi*(k_.) + (f_.)*( 
x_)]), x_Symbol] :> Simp[2   Int[(c + d*x)^m*E^(I*Pi*(k - 1/2))*(E^(I*(e + 
f*x))/(b + 2*a*E^(I*Pi*(k - 1/2))*E^(I*(e + f*x)) - b*E^(2*I*k*Pi)*E^(2*I*( 
e + f*x)))), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IntegerQ[2*k] && NeQ 
[a^2 - b^2, 0] && IGtQ[m, 0]
 

rule 7143
Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_S 
ymbol] :> Simp[PolyLog[n + 1, c*(a + b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d 
, e, n, p}, x] && EqQ[b*d, a*e]
 

rule 7163
Int[((e_.) + (f_.)*(x_))^(m_.)*PolyLog[n_, (d_.)*((F_)^((c_.)*((a_.) + (b_. 
)*(x_))))^(p_.)], x_Symbol] :> Simp[(e + f*x)^m*(PolyLog[n + 1, d*(F^(c*(a 
+ b*x)))^p]/(b*c*p*Log[F])), x] - Simp[f*(m/(b*c*p*Log[F]))   Int[(e + f*x) 
^(m - 1)*PolyLog[n + 1, d*(F^(c*(a + b*x)))^p], x], x] /; FreeQ[{F, a, b, c 
, d, e, f, n, p}, x] && GtQ[m, 0]
 
Maple [F]

\[\int \frac {x^{3}}{a +b \cos \left (x \right )}d x\]

Input:

int(x^3/(a+b*cos(x)),x)
 

Output:

int(x^3/(a+b*cos(x)),x)
 

Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1030 vs. \(2 (317) = 634\).

Time = 0.19 (sec) , antiderivative size = 1030, normalized size of antiderivative = 2.69 \[ \int \frac {x^3}{a+b \cos (x)} \, dx=\text {Too large to display} \] Input:

integrate(x^3/(a+b*cos(x)),x, algorithm="fricas")
 

Output:

1/2*(-I*b*x^3*sqrt((a^2 - b^2)/b^2)*log((a*cos(x) + I*a*sin(x) + (b*cos(x) 
 + I*b*sin(x))*sqrt((a^2 - b^2)/b^2) + b)/b) + I*b*x^3*sqrt((a^2 - b^2)/b^ 
2)*log((a*cos(x) + I*a*sin(x) - (b*cos(x) + I*b*sin(x))*sqrt((a^2 - b^2)/b 
^2) + b)/b) + I*b*x^3*sqrt((a^2 - b^2)/b^2)*log((a*cos(x) - I*a*sin(x) + ( 
b*cos(x) - I*b*sin(x))*sqrt((a^2 - b^2)/b^2) + b)/b) - I*b*x^3*sqrt((a^2 - 
 b^2)/b^2)*log((a*cos(x) - I*a*sin(x) - (b*cos(x) - I*b*sin(x))*sqrt((a^2 
- b^2)/b^2) + b)/b) - 3*b*x^2*sqrt((a^2 - b^2)/b^2)*dilog(-(a*cos(x) + I*a 
*sin(x) + (b*cos(x) + I*b*sin(x))*sqrt((a^2 - b^2)/b^2) + b)/b + 1) + 3*b* 
x^2*sqrt((a^2 - b^2)/b^2)*dilog(-(a*cos(x) + I*a*sin(x) - (b*cos(x) + I*b* 
sin(x))*sqrt((a^2 - b^2)/b^2) + b)/b + 1) - 3*b*x^2*sqrt((a^2 - b^2)/b^2)* 
dilog(-(a*cos(x) - I*a*sin(x) + (b*cos(x) - I*b*sin(x))*sqrt((a^2 - b^2)/b 
^2) + b)/b + 1) + 3*b*x^2*sqrt((a^2 - b^2)/b^2)*dilog(-(a*cos(x) - I*a*sin 
(x) - (b*cos(x) - I*b*sin(x))*sqrt((a^2 - b^2)/b^2) + b)/b + 1) - 6*I*b*x* 
sqrt((a^2 - b^2)/b^2)*polylog(3, -(a*cos(x) + I*a*sin(x) + (b*cos(x) + I*b 
*sin(x))*sqrt((a^2 - b^2)/b^2))/b) + 6*I*b*x*sqrt((a^2 - b^2)/b^2)*polylog 
(3, -(a*cos(x) + I*a*sin(x) - (b*cos(x) + I*b*sin(x))*sqrt((a^2 - b^2)/b^2 
))/b) + 6*I*b*x*sqrt((a^2 - b^2)/b^2)*polylog(3, -(a*cos(x) - I*a*sin(x) + 
 (b*cos(x) - I*b*sin(x))*sqrt((a^2 - b^2)/b^2))/b) - 6*I*b*x*sqrt((a^2 - b 
^2)/b^2)*polylog(3, -(a*cos(x) - I*a*sin(x) - (b*cos(x) - I*b*sin(x))*sqrt 
((a^2 - b^2)/b^2))/b) + 6*b*sqrt((a^2 - b^2)/b^2)*polylog(4, -(a*cos(x)...
 

Sympy [F]

\[ \int \frac {x^3}{a+b \cos (x)} \, dx=\int \frac {x^{3}}{a + b \cos {\left (x \right )}}\, dx \] Input:

integrate(x**3/(a+b*cos(x)),x)
 

Output:

Integral(x**3/(a + b*cos(x)), x)
 

Maxima [F(-2)]

Exception generated. \[ \int \frac {x^3}{a+b \cos (x)} \, dx=\text {Exception raised: ValueError} \] Input:

integrate(x^3/(a+b*cos(x)),x, algorithm="maxima")
 

Output:

Exception raised: ValueError >> Computation failed since Maxima requested 
additional constraints; using the 'assume' command before evaluation *may* 
 help (example of legal syntax is 'assume(4*a^2-4*b^2>0)', see `assume?` f 
or more de
 

Giac [F]

\[ \int \frac {x^3}{a+b \cos (x)} \, dx=\int { \frac {x^{3}}{b \cos \left (x\right ) + a} \,d x } \] Input:

integrate(x^3/(a+b*cos(x)),x, algorithm="giac")
 

Output:

integrate(x^3/(b*cos(x) + a), x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {x^3}{a+b \cos (x)} \, dx=\int \frac {x^3}{a+b\,\cos \left (x\right )} \,d x \] Input:

int(x^3/(a + b*cos(x)),x)
 

Output:

int(x^3/(a + b*cos(x)), x)
 

Reduce [F]

\[ \int \frac {x^3}{a+b \cos (x)} \, dx=\frac {8 \left (\int \frac {\tan \left (\frac {x}{2}\right )^{2} x^{3}}{\tan \left (\frac {x}{2}\right )^{2} a^{2}-\tan \left (\frac {x}{2}\right )^{2} b^{2}+a^{2}+2 a b +b^{2}}d x \right ) a b +8 \left (\int \frac {\tan \left (\frac {x}{2}\right )^{2} x^{3}}{\tan \left (\frac {x}{2}\right )^{2} a^{2}-\tan \left (\frac {x}{2}\right )^{2} b^{2}+a^{2}+2 a b +b^{2}}d x \right ) b^{2}+x^{4}}{4 a +4 b} \] Input:

int(x^3/(a+b*cos(x)),x)
 

Output:

(8*int((tan(x/2)**2*x**3)/(tan(x/2)**2*a**2 - tan(x/2)**2*b**2 + a**2 + 2* 
a*b + b**2),x)*a*b + 8*int((tan(x/2)**2*x**3)/(tan(x/2)**2*a**2 - tan(x/2) 
**2*b**2 + a**2 + 2*a*b + b**2),x)*b**2 + x**4)/(4*(a + b))