\(\int \frac {A+B \cos (c+d x)+C \cos ^2(c+d x)}{(a+b \cos (c+d x))^{2/3}} \, dx\) [391]

Optimal result
Mathematica [A] (warning: unable to verify)
Rubi [A] (verified)
Maple [F]
Fricas [F]
Sympy [F]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 35, antiderivative size = 286 \[ \int \frac {A+B \cos (c+d x)+C \cos ^2(c+d x)}{(a+b \cos (c+d x))^{2/3}} \, dx=\frac {3 C \sqrt [3]{a+b \cos (c+d x)} \sin (c+d x)}{4 b d}+\frac {(4 b B-3 a C) \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2},-\frac {1}{3},\frac {3}{2},\frac {1}{2} (1-\cos (c+d x)),\frac {b (1-\cos (c+d x))}{a+b}\right ) \sqrt [3]{a+b \cos (c+d x)} \sin (c+d x)}{2 \sqrt {2} b^2 d \sqrt {1+\cos (c+d x)} \sqrt [3]{\frac {a+b \cos (c+d x)}{a+b}}}+\frac {\left (4 A b^2-4 a b B+3 a^2 C+b^2 C\right ) \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2},\frac {2}{3},\frac {3}{2},\frac {1}{2} (1-\cos (c+d x)),\frac {b (1-\cos (c+d x))}{a+b}\right ) \left (\frac {a+b \cos (c+d x)}{a+b}\right )^{2/3} \sin (c+d x)}{2 \sqrt {2} b^2 d \sqrt {1+\cos (c+d x)} (a+b \cos (c+d x))^{2/3}} \] Output:

3/4*C*(a+b*cos(d*x+c))^(1/3)*sin(d*x+c)/b/d+1/4*(4*B*b-3*C*a)*AppellF1(1/2 
,-1/3,1/2,3/2,b*(1-cos(d*x+c))/(a+b),1/2-1/2*cos(d*x+c))*(a+b*cos(d*x+c))^ 
(1/3)*sin(d*x+c)*2^(1/2)/b^2/d/(1+cos(d*x+c))^(1/2)/((a+b*cos(d*x+c))/(a+b 
))^(1/3)+1/4*(4*A*b^2-4*B*a*b+3*C*a^2+C*b^2)*AppellF1(1/2,2/3,1/2,3/2,b*(1 
-cos(d*x+c))/(a+b),1/2-1/2*cos(d*x+c))*((a+b*cos(d*x+c))/(a+b))^(2/3)*sin( 
d*x+c)*2^(1/2)/b^2/d/(1+cos(d*x+c))^(1/2)/(a+b*cos(d*x+c))^(2/3)
 

Mathematica [A] (warning: unable to verify)

Time = 3.88 (sec) , antiderivative size = 266, normalized size of antiderivative = 0.93 \[ \int \frac {A+B \cos (c+d x)+C \cos ^2(c+d x)}{(a+b \cos (c+d x))^{2/3}} \, dx=-\frac {3 \sqrt [3]{a+b \cos (c+d x)} \csc (c+d x) \left (4 \left (4 A b^2-4 a b B+3 a^2 C+b^2 C\right ) \operatorname {AppellF1}\left (\frac {1}{3},\frac {1}{2},\frac {1}{2},\frac {4}{3},\frac {a+b \cos (c+d x)}{a-b},\frac {a+b \cos (c+d x)}{a+b}\right ) \sqrt {-\frac {b (-1+\cos (c+d x))}{a+b}} \sqrt {\frac {b (1+\cos (c+d x))}{-a+b}}+(4 b B-3 a C) \operatorname {AppellF1}\left (\frac {4}{3},\frac {1}{2},\frac {1}{2},\frac {7}{3},\frac {a+b \cos (c+d x)}{a-b},\frac {a+b \cos (c+d x)}{a+b}\right ) \sqrt {-\frac {b (-1+\cos (c+d x))}{a+b}} \sqrt {\frac {b (1+\cos (c+d x))}{-a+b}} (a+b \cos (c+d x))-4 b^2 C \sin ^2(c+d x)\right )}{16 b^3 d} \] Input:

Integrate[(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(2/ 
3),x]
 

Output:

(-3*(a + b*Cos[c + d*x])^(1/3)*Csc[c + d*x]*(4*(4*A*b^2 - 4*a*b*B + 3*a^2* 
C + b^2*C)*AppellF1[1/3, 1/2, 1/2, 4/3, (a + b*Cos[c + d*x])/(a - b), (a + 
 b*Cos[c + d*x])/(a + b)]*Sqrt[-((b*(-1 + Cos[c + d*x]))/(a + b))]*Sqrt[(b 
*(1 + Cos[c + d*x]))/(-a + b)] + (4*b*B - 3*a*C)*AppellF1[4/3, 1/2, 1/2, 7 
/3, (a + b*Cos[c + d*x])/(a - b), (a + b*Cos[c + d*x])/(a + b)]*Sqrt[-((b* 
(-1 + Cos[c + d*x]))/(a + b))]*Sqrt[(b*(1 + Cos[c + d*x]))/(-a + b)]*(a + 
b*Cos[c + d*x]) - 4*b^2*C*Sin[c + d*x]^2))/(16*b^3*d)
 

Rubi [A] (verified)

Time = 0.67 (sec) , antiderivative size = 288, normalized size of antiderivative = 1.01, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.257, Rules used = {3042, 3502, 27, 3042, 3235, 3042, 3144, 156, 155}

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 {A+B \cos (c+d x)+C \cos ^2(c+d x)}{(a+b \cos (c+d x))^{2/3}} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {A+B \sin \left (c+d x+\frac {\pi }{2}\right )+C \sin \left (c+d x+\frac {\pi }{2}\right )^2}{\left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^{2/3}}dx\)

\(\Big \downarrow \) 3502

\(\displaystyle \frac {3 \int \frac {b (4 A+C)+(4 b B-3 a C) \cos (c+d x)}{3 (a+b \cos (c+d x))^{2/3}}dx}{4 b}+\frac {3 C \sin (c+d x) \sqrt [3]{a+b \cos (c+d x)}}{4 b d}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\int \frac {b (4 A+C)+(4 b B-3 a C) \cos (c+d x)}{(a+b \cos (c+d x))^{2/3}}dx}{4 b}+\frac {3 C \sin (c+d x) \sqrt [3]{a+b \cos (c+d x)}}{4 b d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\int \frac {b (4 A+C)+(4 b B-3 a C) \sin \left (c+d x+\frac {\pi }{2}\right )}{\left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^{2/3}}dx}{4 b}+\frac {3 C \sin (c+d x) \sqrt [3]{a+b \cos (c+d x)}}{4 b d}\)

\(\Big \downarrow \) 3235

\(\displaystyle \frac {\frac {\left (3 a^2 C-4 a b B+4 A b^2+b^2 C\right ) \int \frac {1}{(a+b \cos (c+d x))^{2/3}}dx}{b}+\frac {(4 b B-3 a C) \int \sqrt [3]{a+b \cos (c+d x)}dx}{b}}{4 b}+\frac {3 C \sin (c+d x) \sqrt [3]{a+b \cos (c+d x)}}{4 b d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {\left (3 a^2 C-4 a b B+4 A b^2+b^2 C\right ) \int \frac {1}{\left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^{2/3}}dx}{b}+\frac {(4 b B-3 a C) \int \sqrt [3]{a+b \sin \left (c+d x+\frac {\pi }{2}\right )}dx}{b}}{4 b}+\frac {3 C \sin (c+d x) \sqrt [3]{a+b \cos (c+d x)}}{4 b d}\)

\(\Big \downarrow \) 3144

\(\displaystyle \frac {-\frac {\sin (c+d x) \left (3 a^2 C-4 a b B+4 A b^2+b^2 C\right ) \int \frac {1}{\sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)+1} (a+b \cos (c+d x))^{2/3}}d\cos (c+d x)}{b d \sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)+1}}-\frac {(4 b B-3 a C) \sin (c+d x) \int \frac {\sqrt [3]{a+b \cos (c+d x)}}{\sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)+1}}d\cos (c+d x)}{b d \sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)+1}}}{4 b}+\frac {3 C \sin (c+d x) \sqrt [3]{a+b \cos (c+d x)}}{4 b d}\)

\(\Big \downarrow \) 156

\(\displaystyle \frac {-\frac {\sin (c+d x) \left (3 a^2 C-4 a b B+4 A b^2+b^2 C\right ) \left (\frac {a+b \cos (c+d x)}{a+b}\right )^{2/3} \int \frac {1}{\sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)+1} \left (\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}\right )^{2/3}}d\cos (c+d x)}{b d \sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)+1} (a+b \cos (c+d x))^{2/3}}-\frac {(4 b B-3 a C) \sin (c+d x) \sqrt [3]{a+b \cos (c+d x)} \int \frac {\sqrt [3]{\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}}}{\sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)+1}}d\cos (c+d x)}{b d \sqrt {1-\cos (c+d x)} \sqrt {\cos (c+d x)+1} \sqrt [3]{\frac {a+b \cos (c+d x)}{a+b}}}}{4 b}+\frac {3 C \sin (c+d x) \sqrt [3]{a+b \cos (c+d x)}}{4 b d}\)

\(\Big \downarrow \) 155

\(\displaystyle \frac {\frac {\sqrt {2} \sin (c+d x) \left (3 a^2 C-4 a b B+4 A b^2+b^2 C\right ) \left (\frac {a+b \cos (c+d x)}{a+b}\right )^{2/3} \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2},\frac {2}{3},\frac {3}{2},\frac {1}{2} (1-\cos (c+d x)),\frac {b (1-\cos (c+d x))}{a+b}\right )}{b d \sqrt {\cos (c+d x)+1} (a+b \cos (c+d x))^{2/3}}+\frac {\sqrt {2} (4 b B-3 a C) \sin (c+d x) \sqrt [3]{a+b \cos (c+d x)} \operatorname {AppellF1}\left (\frac {1}{2},\frac {1}{2},-\frac {1}{3},\frac {3}{2},\frac {1}{2} (1-\cos (c+d x)),\frac {b (1-\cos (c+d x))}{a+b}\right )}{b d \sqrt {\cos (c+d x)+1} \sqrt [3]{\frac {a+b \cos (c+d x)}{a+b}}}}{4 b}+\frac {3 C \sin (c+d x) \sqrt [3]{a+b \cos (c+d x)}}{4 b d}\)

Input:

Int[(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)/(a + b*Cos[c + d*x])^(2/3),x]
 

Output:

(3*C*(a + b*Cos[c + d*x])^(1/3)*Sin[c + d*x])/(4*b*d) + ((Sqrt[2]*(4*b*B - 
 3*a*C)*AppellF1[1/2, 1/2, -1/3, 3/2, (1 - Cos[c + d*x])/2, (b*(1 - Cos[c 
+ d*x]))/(a + b)]*(a + b*Cos[c + d*x])^(1/3)*Sin[c + d*x])/(b*d*Sqrt[1 + C 
os[c + d*x]]*((a + b*Cos[c + d*x])/(a + b))^(1/3)) + (Sqrt[2]*(4*A*b^2 - 4 
*a*b*B + 3*a^2*C + b^2*C)*AppellF1[1/2, 1/2, 2/3, 3/2, (1 - Cos[c + d*x])/ 
2, (b*(1 - Cos[c + d*x]))/(a + b)]*((a + b*Cos[c + d*x])/(a + b))^(2/3)*Si 
n[c + d*x])/(b*d*Sqrt[1 + Cos[c + d*x]]*(a + b*Cos[c + d*x])^(2/3)))/(4*b)
 

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 155
Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_)) 
^(p_), x_] :> Simp[((a + b*x)^(m + 1)/(b*(m + 1)*Simplify[b/(b*c - a*d)]^n* 
Simplify[b/(b*e - a*f)]^p))*AppellF1[m + 1, -n, -p, m + 2, (-d)*((a + b*x)/ 
(b*c - a*d)), (-f)*((a + b*x)/(b*e - a*f))], x] /; FreeQ[{a, b, c, d, e, f, 
 m, n, p}, x] &&  !IntegerQ[m] &&  !IntegerQ[n] &&  !IntegerQ[p] && GtQ[Sim 
plify[b/(b*c - a*d)], 0] && GtQ[Simplify[b/(b*e - a*f)], 0] &&  !(GtQ[Simpl 
ify[d/(d*a - c*b)], 0] && GtQ[Simplify[d/(d*e - c*f)], 0] && SimplerQ[c + d 
*x, a + b*x]) &&  !(GtQ[Simplify[f/(f*a - e*b)], 0] && GtQ[Simplify[f/(f*c 
- e*d)], 0] && SimplerQ[e + f*x, a + b*x])
 

rule 156
Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_)) 
^(p_), x_] :> Simp[(e + f*x)^FracPart[p]/(Simplify[b/(b*e - a*f)]^IntPart[p 
]*(b*((e + f*x)/(b*e - a*f)))^FracPart[p])   Int[(a + b*x)^m*(c + d*x)^n*Si 
mp[b*(e/(b*e - a*f)) + b*f*(x/(b*e - a*f)), x]^p, x], x] /; FreeQ[{a, b, c, 
 d, e, f, m, n, p}, x] &&  !IntegerQ[m] &&  !IntegerQ[n] &&  !IntegerQ[p] & 
& GtQ[Simplify[b/(b*c - a*d)], 0] &&  !GtQ[Simplify[b/(b*e - a*f)], 0]
 

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

rule 3144
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[Cos[c + 
d*x]/(d*Sqrt[1 + Sin[c + d*x]]*Sqrt[1 - Sin[c + d*x]])   Subst[Int[(a + b*x 
)^n/(Sqrt[1 + x]*Sqrt[1 - x]), x], x, Sin[c + d*x]], x] /; FreeQ[{a, b, c, 
d, n}, x] && NeQ[a^2 - b^2, 0] &&  !IntegerQ[2*n]
 

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

rule 3502
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) 
+ (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Co 
s[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m 
+ 2))   Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m 
 + 2) - a*C)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] 
 &&  !LtQ[m, -1]
 
Maple [F]

\[\int \frac {A +B \cos \left (d x +c \right )+C \cos \left (d x +c \right )^{2}}{\left (a +b \cos \left (d x +c \right )\right )^{\frac {2}{3}}}d x\]

Input:

int((A+B*cos(d*x+c)+C*cos(d*x+c)^2)/(a+b*cos(d*x+c))^(2/3),x)
 

Output:

int((A+B*cos(d*x+c)+C*cos(d*x+c)^2)/(a+b*cos(d*x+c))^(2/3),x)
 

Fricas [F]

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

integrate((A+B*cos(d*x+c)+C*cos(d*x+c)^2)/(a+b*cos(d*x+c))^(2/3),x, algori 
thm="fricas")
 

Output:

integral((C*cos(d*x + c)^2 + B*cos(d*x + c) + A)/(b*cos(d*x + c) + a)^(2/3 
), x)
 

Sympy [F]

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

integrate((A+B*cos(d*x+c)+C*cos(d*x+c)**2)/(a+b*cos(d*x+c))**(2/3),x)
 

Output:

Integral((A + B*cos(c + d*x) + C*cos(c + d*x)**2)/(a + b*cos(c + d*x))**(2 
/3), x)
 

Maxima [F]

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

integrate((A+B*cos(d*x+c)+C*cos(d*x+c)^2)/(a+b*cos(d*x+c))^(2/3),x, algori 
thm="maxima")
 

Output:

integrate((C*cos(d*x + c)^2 + B*cos(d*x + c) + A)/(b*cos(d*x + c) + a)^(2/ 
3), x)
 

Giac [F]

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

integrate((A+B*cos(d*x+c)+C*cos(d*x+c)^2)/(a+b*cos(d*x+c))^(2/3),x, algori 
thm="giac")
 

Output:

integrate((C*cos(d*x + c)^2 + B*cos(d*x + c) + A)/(b*cos(d*x + c) + a)^(2/ 
3), x)
 

Mupad [F(-1)]

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

int((A + B*cos(c + d*x) + C*cos(c + d*x)^2)/(a + b*cos(c + d*x))^(2/3),x)
 

Output:

int((A + B*cos(c + d*x) + C*cos(c + d*x)^2)/(a + b*cos(c + d*x))^(2/3), x)
 

Reduce [F]

\[ \int \frac {A+B \cos (c+d x)+C \cos ^2(c+d x)}{(a+b \cos (c+d x))^{2/3}} \, dx=\left (\int \frac {\cos \left (d x +c \right )}{\left (\cos \left (d x +c \right ) b +a \right )^{\frac {2}{3}}}d x \right ) b +\left (\int \frac {\cos \left (d x +c \right )^{2}}{\left (\cos \left (d x +c \right ) b +a \right )^{\frac {2}{3}}}d x \right ) c +\left (\int \frac {1}{\left (\cos \left (d x +c \right ) b +a \right )^{\frac {2}{3}}}d x \right ) a \] Input:

int((A+B*cos(d*x+c)+C*cos(d*x+c)^2)/(a+b*cos(d*x+c))^(2/3),x)
 

Output:

int(cos(c + d*x)/(cos(c + d*x)*b + a)**(2/3),x)*b + int(cos(c + d*x)**2/(c 
os(c + d*x)*b + a)**(2/3),x)*c + int(1/(cos(c + d*x)*b + a)**(2/3),x)*a