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

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

Optimal result

Integrand size = 34, antiderivative size = 307 \[ \int \frac {B \cos (c+d x)+C \cos ^2(c+d x)}{(a+b \cos (c+d x))^{5/2}} \, dx=-\frac {2 \left (a^2 b B+3 b^3 B+2 a^3 C-6 a b^2 C\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{3 b^2 \left (a^2-b^2\right )^2 d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}+\frac {2 \left (a b B+2 a^2 C-3 b^2 C\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )}{3 b^2 \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 a (b B-a C) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^{3/2}}+\frac {2 \left (a^2 b B+3 b^3 B+2 a^3 C-6 a b^2 C\right ) \sin (c+d x)}{3 b \left (a^2-b^2\right )^2 d \sqrt {a+b \cos (c+d x)}} \] Output:

-2/3*(B*a^2*b+3*B*b^3+2*C*a^3-6*C*a*b^2)*(a+b*cos(d*x+c))^(1/2)*EllipticE( 
sin(1/2*d*x+1/2*c),2^(1/2)*(b/(a+b))^(1/2))/b^2/(a^2-b^2)^2/d/((a+b*cos(d* 
x+c))/(a+b))^(1/2)+2/3*(B*a*b+2*C*a^2-3*C*b^2)*((a+b*cos(d*x+c))/(a+b))^(1 
/2)*InverseJacobiAM(1/2*d*x+1/2*c,2^(1/2)*(b/(a+b))^(1/2))/b^2/(a^2-b^2)/d 
/(a+b*cos(d*x+c))^(1/2)+2/3*a*(B*b-C*a)*sin(d*x+c)/b/(a^2-b^2)/d/(a+b*cos( 
d*x+c))^(3/2)+2/3*(B*a^2*b+3*B*b^3+2*C*a^3-6*C*a*b^2)*sin(d*x+c)/b/(a^2-b^ 
2)^2/d/(a+b*cos(d*x+c))^(1/2)
 

Mathematica [A] (verified)

Time = 2.59 (sec) , antiderivative size = 224, normalized size of antiderivative = 0.73 \[ \int \frac {B \cos (c+d x)+C \cos ^2(c+d x)}{(a+b \cos (c+d x))^{5/2}} \, dx=\frac {2 \left (-\frac {\left (\frac {a+b \cos (c+d x)}{a+b}\right )^{3/2} \left (\left (a^2 b B+3 b^3 B+2 a^3 C-6 a b^2 C\right ) E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )-(a-b) \left (a b B+2 a^2 C-3 b^2 C\right ) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )\right )}{(a-b)^2}+\frac {b \left (a \left (2 a^2 b B+2 b^3 B+a^3 C-5 a b^2 C\right )+b \left (a^2 b B+3 b^3 B+2 a^3 C-6 a b^2 C\right ) \cos (c+d x)\right ) \sin (c+d x)}{\left (a^2-b^2\right )^2}\right )}{3 b^2 d (a+b \cos (c+d x))^{3/2}} \] Input:

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

Output:

(2*(-((((a + b*Cos[c + d*x])/(a + b))^(3/2)*((a^2*b*B + 3*b^3*B + 2*a^3*C 
- 6*a*b^2*C)*EllipticE[(c + d*x)/2, (2*b)/(a + b)] - (a - b)*(a*b*B + 2*a^ 
2*C - 3*b^2*C)*EllipticF[(c + d*x)/2, (2*b)/(a + b)]))/(a - b)^2) + (b*(a* 
(2*a^2*b*B + 2*b^3*B + a^3*C - 5*a*b^2*C) + b*(a^2*b*B + 3*b^3*B + 2*a^3*C 
 - 6*a*b^2*C)*Cos[c + d*x])*Sin[c + d*x])/(a^2 - b^2)^2))/(3*b^2*d*(a + b* 
Cos[c + d*x])^(3/2))
 

Rubi [A] (verified)

Time = 1.45 (sec) , antiderivative size = 317, normalized size of antiderivative = 1.03, number of steps used = 15, number of rules used = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.441, Rules used = {3042, 3500, 27, 3042, 3233, 27, 3042, 3231, 3042, 3134, 3042, 3132, 3142, 3042, 3140}

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

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {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 )^{5/2}}dx\)

\(\Big \downarrow \) 3500

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3233

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3231

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3134

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3132

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

\(\Big \downarrow \) 3142

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3140

\(\displaystyle \frac {2 a (b B-a C) \sin (c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \cos (c+d x))^{3/2}}-\frac {\frac {\frac {2 \left (2 a^3 C+a^2 b B-6 a b^2 C+3 b^3 B\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{b d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {2 \left (a^2-b^2\right ) \left (2 a^2 C+a b B-3 b^2 C\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )}{b d \sqrt {a+b \cos (c+d x)}}}{a^2-b^2}-\frac {2 \left (2 a^3 C+a^2 b B-6 a b^2 C+3 b^3 B\right ) \sin (c+d x)}{d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}}{3 b \left (a^2-b^2\right )}\)

Input:

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

Output:

(2*a*(b*B - a*C)*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^(3/ 
2)) - (((2*(a^2*b*B + 3*b^3*B + 2*a^3*C - 6*a*b^2*C)*Sqrt[a + b*Cos[c + d* 
x]]*EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(b*d*Sqrt[(a + b*Cos[c + d*x])/ 
(a + b)]) - (2*(a^2 - b^2)*(a*b*B + 2*a^2*C - 3*b^2*C)*Sqrt[(a + b*Cos[c + 
 d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b)/(a + b)])/(b*d*Sqrt[a + b*Cos 
[c + d*x]]))/(a^2 - b^2) - (2*(a^2*b*B + 3*b^3*B + 2*a^3*C - 6*a*b^2*C)*Si 
n[c + d*x])/((a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]))/(3*b*(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 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3132
Int[Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[2*(Sqrt[a 
 + b]/d)*EllipticE[(1/2)*(c - Pi/2 + d*x), 2*(b/(a + b))], x] /; FreeQ[{a, 
b, c, d}, x] && NeQ[a^2 - b^2, 0] && GtQ[a + b, 0]
 

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

rule 3140
Int[1/Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/(d*S 
qrt[a + b]))*EllipticF[(1/2)*(c - Pi/2 + d*x), 2*(b/(a + b))], x] /; FreeQ[ 
{a, b, c, d}, x] && NeQ[a^2 - b^2, 0] && GtQ[a + b, 0]
 

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

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

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

rule 3500
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + 
 (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-(A*b^2 
 - a*b*B + a^2*C))*Cos[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 1)* 
(a^2 - b^2))), x] + Simp[1/(b*(m + 1)*(a^2 - b^2))   Int[(a + b*Sin[e + f*x 
])^(m + 1)*Simp[b*(a*A - b*B + a*C)*(m + 1) - (A*b^2 - a*b*B + a^2*C + b*(A 
*b - a*B + b*C)*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, 
B, C}, x] && LtQ[m, -1] && NeQ[a^2 - b^2, 0]
 
Maple [B] (warning: unable to verify)

Leaf count of result is larger than twice the leaf count of optimal. \(863\) vs. \(2(296)=592\).

Time = 6.68 (sec) , antiderivative size = 864, normalized size of antiderivative = 2.81

method result size
default \(\text {Expression too large to display}\) \(864\)
parts \(\text {Expression too large to display}\) \(1598\)

Input:

int((B*cos(d*x+c)+C*cos(d*x+c)^2)/(a+b*cos(d*x+c))^(5/2),x,method=_RETURNV 
ERBOSE)
 

Output:

-(-(-2*b*cos(1/2*d*x+1/2*c)^2-a+b)*sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*C/b^2*(s 
in(1/2*d*x+1/2*c)^2)^(1/2)*((2*b*cos(1/2*d*x+1/2*c)^2+a-b)/(a-b))^(1/2)/(- 
2*b*sin(1/2*d*x+1/2*c)^4+(a+b)*sin(1/2*d*x+1/2*c)^2)^(1/2)*EllipticF(cos(1 
/2*d*x+1/2*c),(-2*b/(a-b))^(1/2))-2/b^2*(B*b-2*C*a)/sin(1/2*d*x+1/2*c)^2/( 
2*b*sin(1/2*d*x+1/2*c)^2-a-b)/(a^2-b^2)*(-2*b*sin(1/2*d*x+1/2*c)^4+(a+b)*s 
in(1/2*d*x+1/2*c)^2)^(1/2)*(2*cos(1/2*d*x+1/2*c)*sin(1/2*d*x+1/2*c)^2*b+(- 
2*b/(a-b)*sin(1/2*d*x+1/2*c)^2+(a+b)/(a-b))^(1/2)*(sin(1/2*d*x+1/2*c)^2)^( 
1/2)*EllipticE(cos(1/2*d*x+1/2*c),(-2*b/(a-b))^(1/2))*a-(-2*b/(a-b)*sin(1/ 
2*d*x+1/2*c)^2+(a+b)/(a-b))^(1/2)*(sin(1/2*d*x+1/2*c)^2)^(1/2)*EllipticE(c 
os(1/2*d*x+1/2*c),(-2*b/(a-b))^(1/2))*b)-2*a*(B*b-C*a)/b^2*(1/6/b/(a-b)/(a 
+b)*cos(1/2*d*x+1/2*c)*(-2*b*sin(1/2*d*x+1/2*c)^4+(a+b)*sin(1/2*d*x+1/2*c) 
^2)^(1/2)/(cos(1/2*d*x+1/2*c)^2+1/2*(a-b)/b)^2+8/3*b*sin(1/2*d*x+1/2*c)^2/ 
(a-b)^2/(a+b)^2*cos(1/2*d*x+1/2*c)*a/(-(-2*b*cos(1/2*d*x+1/2*c)^2-a+b)*sin 
(1/2*d*x+1/2*c)^2)^(1/2)+(3*a-b)/(3*a^3+3*a^2*b-3*a*b^2-3*b^3)*(sin(1/2*d* 
x+1/2*c)^2)^(1/2)*((2*b*cos(1/2*d*x+1/2*c)^2+a-b)/(a-b))^(1/2)/(-2*b*sin(1 
/2*d*x+1/2*c)^4+(a+b)*sin(1/2*d*x+1/2*c)^2)^(1/2)*EllipticF(cos(1/2*d*x+1/ 
2*c),(-2*b/(a-b))^(1/2))-4/3*a/(a-b)/(a+b)^2*(sin(1/2*d*x+1/2*c)^2)^(1/2)* 
((2*b*cos(1/2*d*x+1/2*c)^2+a-b)/(a-b))^(1/2)/(-2*b*sin(1/2*d*x+1/2*c)^4+(a 
+b)*sin(1/2*d*x+1/2*c)^2)^(1/2)*(EllipticF(cos(1/2*d*x+1/2*c),(-2*b/(a-b)) 
^(1/2))-EllipticE(cos(1/2*d*x+1/2*c),(-2*b/(a-b))^(1/2)))))/sin(1/2*d*x...
 

Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.14 (sec) , antiderivative size = 1044, normalized size of antiderivative = 3.40 \[ \int \frac {B \cos (c+d x)+C \cos ^2(c+d x)}{(a+b \cos (c+d x))^{5/2}} \, dx=\text {Too large to display} \] Input:

integrate((B*cos(d*x+c)+C*cos(d*x+c)^2)/(a+b*cos(d*x+c))^(5/2),x, algorith 
m="fricas")
 

Output:

-2/9*(sqrt(1/2)*(4*I*C*a^6 + 2*I*B*a^5*b - 9*I*C*a^4*b^2 - 6*I*B*a^3*b^3 + 
 9*I*C*a^2*b^4 + (4*I*C*a^4*b^2 + 2*I*B*a^3*b^3 - 9*I*C*a^2*b^4 - 6*I*B*a* 
b^5 + 9*I*C*b^6)*cos(d*x + c)^2 + 2*(4*I*C*a^5*b + 2*I*B*a^4*b^2 - 9*I*C*a 
^3*b^3 - 6*I*B*a^2*b^4 + 9*I*C*a*b^5)*cos(d*x + c))*sqrt(b)*weierstrassPIn 
verse(4/3*(4*a^2 - 3*b^2)/b^2, -8/27*(8*a^3 - 9*a*b^2)/b^3, 1/3*(3*b*cos(d 
*x + c) + 3*I*b*sin(d*x + c) + 2*a)/b) + sqrt(1/2)*(-4*I*C*a^6 - 2*I*B*a^5 
*b + 9*I*C*a^4*b^2 + 6*I*B*a^3*b^3 - 9*I*C*a^2*b^4 + (-4*I*C*a^4*b^2 - 2*I 
*B*a^3*b^3 + 9*I*C*a^2*b^4 + 6*I*B*a*b^5 - 9*I*C*b^6)*cos(d*x + c)^2 + 2*( 
-4*I*C*a^5*b - 2*I*B*a^4*b^2 + 9*I*C*a^3*b^3 + 6*I*B*a^2*b^4 - 9*I*C*a*b^5 
)*cos(d*x + c))*sqrt(b)*weierstrassPInverse(4/3*(4*a^2 - 3*b^2)/b^2, -8/27 
*(8*a^3 - 9*a*b^2)/b^3, 1/3*(3*b*cos(d*x + c) - 3*I*b*sin(d*x + c) + 2*a)/ 
b) + 3*sqrt(1/2)*(2*I*C*a^5*b + I*B*a^4*b^2 - 6*I*C*a^3*b^3 + 3*I*B*a^2*b^ 
4 + (2*I*C*a^3*b^3 + I*B*a^2*b^4 - 6*I*C*a*b^5 + 3*I*B*b^6)*cos(d*x + c)^2 
 + 2*(2*I*C*a^4*b^2 + I*B*a^3*b^3 - 6*I*C*a^2*b^4 + 3*I*B*a*b^5)*cos(d*x + 
 c))*sqrt(b)*weierstrassZeta(4/3*(4*a^2 - 3*b^2)/b^2, -8/27*(8*a^3 - 9*a*b 
^2)/b^3, weierstrassPInverse(4/3*(4*a^2 - 3*b^2)/b^2, -8/27*(8*a^3 - 9*a*b 
^2)/b^3, 1/3*(3*b*cos(d*x + c) + 3*I*b*sin(d*x + c) + 2*a)/b)) + 3*sqrt(1/ 
2)*(-2*I*C*a^5*b - I*B*a^4*b^2 + 6*I*C*a^3*b^3 - 3*I*B*a^2*b^4 + (-2*I*C*a 
^3*b^3 - I*B*a^2*b^4 + 6*I*C*a*b^5 - 3*I*B*b^6)*cos(d*x + c)^2 + 2*(-2*I*C 
*a^4*b^2 - I*B*a^3*b^3 + 6*I*C*a^2*b^4 - 3*I*B*a*b^5)*cos(d*x + c))*sqr...
 

Sympy [F(-1)]

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

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

Output:

Timed out
                                                                                    
                                                                                    
 

Maxima [F]

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

integrate((B*cos(d*x+c)+C*cos(d*x+c)^2)/(a+b*cos(d*x+c))^(5/2),x, algorith 
m="maxima")
 

Output:

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

Giac [F]

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

integrate((B*cos(d*x+c)+C*cos(d*x+c)^2)/(a+b*cos(d*x+c))^(5/2),x, algorith 
m="giac")
 

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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