\(\int (e \cos (c+d x))^{3/2} (a+b \sin (c+d x))^2 \, dx\) [546]

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

Optimal result

Integrand size = 25, antiderivative size = 149 \[ \int (e \cos (c+d x))^{3/2} (a+b \sin (c+d x))^2 \, dx=-\frac {18 a b (e \cos (c+d x))^{5/2}}{35 d e}+\frac {2 \left (7 a^2+2 b^2\right ) e^2 \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{21 d \sqrt {e \cos (c+d x)}}+\frac {2 \left (7 a^2+2 b^2\right ) e \sqrt {e \cos (c+d x)} \sin (c+d x)}{21 d}-\frac {2 b (e \cos (c+d x))^{5/2} (a+b \sin (c+d x))}{7 d e} \] Output:

-18/35*a*b*(e*cos(d*x+c))^(5/2)/d/e+2/21*(7*a^2+2*b^2)*e^2*cos(d*x+c)^(1/2 
)*InverseJacobiAM(1/2*d*x+1/2*c,2^(1/2))/d/(e*cos(d*x+c))^(1/2)+2/21*(7*a^ 
2+2*b^2)*e*(e*cos(d*x+c))^(1/2)*sin(d*x+c)/d-2/7*b*(e*cos(d*x+c))^(5/2)*(a 
+b*sin(d*x+c))/d/e
 

Mathematica [A] (verified)

Time = 1.63 (sec) , antiderivative size = 115, normalized size of antiderivative = 0.77 \[ \int (e \cos (c+d x))^{3/2} (a+b \sin (c+d x))^2 \, dx=\frac {(e \cos (c+d x))^{3/2} \left (20 \left (7 a^2+2 b^2\right ) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )+\sqrt {\cos (c+d x)} \left (-84 a b \cos (2 (c+d x))+5 \left (28 a^2+5 b^2\right ) \sin (c+d x)-3 b (28 a+5 b \sin (3 (c+d x)))\right )\right )}{210 d \cos ^{\frac {3}{2}}(c+d x)} \] Input:

Integrate[(e*Cos[c + d*x])^(3/2)*(a + b*Sin[c + d*x])^2,x]
 

Output:

((e*Cos[c + d*x])^(3/2)*(20*(7*a^2 + 2*b^2)*EllipticF[(c + d*x)/2, 2] + Sq 
rt[Cos[c + d*x]]*(-84*a*b*Cos[2*(c + d*x)] + 5*(28*a^2 + 5*b^2)*Sin[c + d* 
x] - 3*b*(28*a + 5*b*Sin[3*(c + d*x)]))))/(210*d*Cos[c + d*x]^(3/2))
 

Rubi [A] (verified)

Time = 0.66 (sec) , antiderivative size = 145, normalized size of antiderivative = 0.97, number of steps used = 11, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.440, Rules used = {3042, 3171, 27, 3042, 3148, 3042, 3115, 3042, 3121, 3042, 3120}

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

\(\Big \downarrow \) 3042

\(\displaystyle \int (e \cos (c+d x))^{3/2} (a+b \sin (c+d x))^2dx\)

\(\Big \downarrow \) 3171

\(\displaystyle \frac {2}{7} \int \frac {1}{2} (e \cos (c+d x))^{3/2} \left (7 a^2+9 b \sin (c+d x) a+2 b^2\right )dx-\frac {2 b (e \cos (c+d x))^{5/2} (a+b \sin (c+d x))}{7 d e}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {1}{7} \int (e \cos (c+d x))^{3/2} \left (7 a^2+9 b \sin (c+d x) a+2 b^2\right )dx-\frac {2 b (e \cos (c+d x))^{5/2} (a+b \sin (c+d x))}{7 d e}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{7} \int (e \cos (c+d x))^{3/2} \left (7 a^2+9 b \sin (c+d x) a+2 b^2\right )dx-\frac {2 b (e \cos (c+d x))^{5/2} (a+b \sin (c+d x))}{7 d e}\)

\(\Big \downarrow \) 3148

\(\displaystyle \frac {1}{7} \left (\left (7 a^2+2 b^2\right ) \int (e \cos (c+d x))^{3/2}dx-\frac {18 a b (e \cos (c+d x))^{5/2}}{5 d e}\right )-\frac {2 b (e \cos (c+d x))^{5/2} (a+b \sin (c+d x))}{7 d e}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{7} \left (\left (7 a^2+2 b^2\right ) \int \left (e \sin \left (c+d x+\frac {\pi }{2}\right )\right )^{3/2}dx-\frac {18 a b (e \cos (c+d x))^{5/2}}{5 d e}\right )-\frac {2 b (e \cos (c+d x))^{5/2} (a+b \sin (c+d x))}{7 d e}\)

\(\Big \downarrow \) 3115

\(\displaystyle \frac {1}{7} \left (\left (7 a^2+2 b^2\right ) \left (\frac {1}{3} e^2 \int \frac {1}{\sqrt {e \cos (c+d x)}}dx+\frac {2 e \sin (c+d x) \sqrt {e \cos (c+d x)}}{3 d}\right )-\frac {18 a b (e \cos (c+d x))^{5/2}}{5 d e}\right )-\frac {2 b (e \cos (c+d x))^{5/2} (a+b \sin (c+d x))}{7 d e}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{7} \left (\left (7 a^2+2 b^2\right ) \left (\frac {1}{3} e^2 \int \frac {1}{\sqrt {e \sin \left (c+d x+\frac {\pi }{2}\right )}}dx+\frac {2 e \sin (c+d x) \sqrt {e \cos (c+d x)}}{3 d}\right )-\frac {18 a b (e \cos (c+d x))^{5/2}}{5 d e}\right )-\frac {2 b (e \cos (c+d x))^{5/2} (a+b \sin (c+d x))}{7 d e}\)

\(\Big \downarrow \) 3121

\(\displaystyle \frac {1}{7} \left (\left (7 a^2+2 b^2\right ) \left (\frac {e^2 \sqrt {\cos (c+d x)} \int \frac {1}{\sqrt {\cos (c+d x)}}dx}{3 \sqrt {e \cos (c+d x)}}+\frac {2 e \sin (c+d x) \sqrt {e \cos (c+d x)}}{3 d}\right )-\frac {18 a b (e \cos (c+d x))^{5/2}}{5 d e}\right )-\frac {2 b (e \cos (c+d x))^{5/2} (a+b \sin (c+d x))}{7 d e}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{7} \left (\left (7 a^2+2 b^2\right ) \left (\frac {e^2 \sqrt {\cos (c+d x)} \int \frac {1}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}}dx}{3 \sqrt {e \cos (c+d x)}}+\frac {2 e \sin (c+d x) \sqrt {e \cos (c+d x)}}{3 d}\right )-\frac {18 a b (e \cos (c+d x))^{5/2}}{5 d e}\right )-\frac {2 b (e \cos (c+d x))^{5/2} (a+b \sin (c+d x))}{7 d e}\)

\(\Big \downarrow \) 3120

\(\displaystyle \frac {1}{7} \left (\left (7 a^2+2 b^2\right ) \left (\frac {2 e^2 \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{3 d \sqrt {e \cos (c+d x)}}+\frac {2 e \sin (c+d x) \sqrt {e \cos (c+d x)}}{3 d}\right )-\frac {18 a b (e \cos (c+d x))^{5/2}}{5 d e}\right )-\frac {2 b (e \cos (c+d x))^{5/2} (a+b \sin (c+d x))}{7 d e}\)

Input:

Int[(e*Cos[c + d*x])^(3/2)*(a + b*Sin[c + d*x])^2,x]
 

Output:

(-2*b*(e*Cos[c + d*x])^(5/2)*(a + b*Sin[c + d*x]))/(7*d*e) + ((-18*a*b*(e* 
Cos[c + d*x])^(5/2))/(5*d*e) + (7*a^2 + 2*b^2)*((2*e^2*Sqrt[Cos[c + d*x]]* 
EllipticF[(c + d*x)/2, 2])/(3*d*Sqrt[e*Cos[c + d*x]]) + (2*e*Sqrt[e*Cos[c 
+ d*x]]*Sin[c + d*x])/(3*d)))/7
 

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 3115
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* 
x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n)   Int[(b*Sin 
[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 
2*n]
 

rule 3120
Int[1/Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticF[(1/2 
)*(c - Pi/2 + d*x), 2], x] /; FreeQ[{c, d}, x]
 

rule 3121
Int[((b_)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*Sin[c + d*x]) 
^n/Sin[c + d*x]^n   Int[Sin[c + d*x]^n, x], x] /; FreeQ[{b, c, d}, x] && Lt 
Q[-1, n, 1] && IntegerQ[2*n]
 

rule 3148
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x 
_)]), x_Symbol] :> Simp[(-b)*((g*Cos[e + f*x])^(p + 1)/(f*g*(p + 1))), x] + 
 Simp[a   Int[(g*Cos[e + f*x])^p, x], x] /; FreeQ[{a, b, e, f, g, p}, x] && 
 (IntegerQ[2*p] || NeQ[a^2 - b^2, 0])
 

rule 3171
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x 
_)])^(m_), x_Symbol] :> Simp[(-b)*(g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + 
f*x])^(m - 1)/(f*g*(m + p))), x] + Simp[1/(m + p)   Int[(g*Cos[e + f*x])^p* 
(a + b*Sin[e + f*x])^(m - 2)*(b^2*(m - 1) + a^2*(m + p) + a*b*(2*m + p - 1) 
*Sin[e + f*x]), x], x] /; FreeQ[{a, b, e, f, g, p}, x] && NeQ[a^2 - b^2, 0] 
 && GtQ[m, 1] && NeQ[m + p, 0] && (IntegersQ[2*m, 2*p] || IntegerQ[m])
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(342\) vs. \(2(132)=264\).

Time = 3.80 (sec) , antiderivative size = 343, normalized size of antiderivative = 2.30

method result size
default \(\frac {2 e^{2} \left (240 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{8} b^{2}-360 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{6} b^{2}+336 a b \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}-140 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} a^{2}+140 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} b^{2}-504 a b \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}+70 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a^{2}-10 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b^{2}-35 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) a^{2}-10 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) b^{2}+252 a b \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}-42 a b \sin \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{105 \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} e +e}\, d}\) \(343\)
parts \(-\frac {2 a^{2} \sqrt {e \left (2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, e^{2} \left (4 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right )}{3 \sqrt {-e \left (2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {e \left (2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )}\, d}+\frac {4 b^{2} \sqrt {e \left (2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, e^{2} \left (24 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}-60 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}+50 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}-15 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}-\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+\cos \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{21 \sqrt {-e \left (2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {e \left (2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )}\, d}-\frac {4 a b \left (e \cos \left (d x +c \right )\right )^{\frac {5}{2}}}{5 d e}\) \(424\)

Input:

int((e*cos(d*x+c))^(3/2)*(a+b*sin(d*x+c))^2,x,method=_RETURNVERBOSE)
 

Output:

2/105/sin(1/2*d*x+1/2*c)/(-2*sin(1/2*d*x+1/2*c)^2*e+e)^(1/2)*e^2*(240*cos( 
1/2*d*x+1/2*c)*sin(1/2*d*x+1/2*c)^8*b^2-360*cos(1/2*d*x+1/2*c)*sin(1/2*d*x 
+1/2*c)^6*b^2+336*a*b*sin(1/2*d*x+1/2*c)^7-140*cos(1/2*d*x+1/2*c)*sin(1/2* 
d*x+1/2*c)^4*a^2+140*cos(1/2*d*x+1/2*c)*sin(1/2*d*x+1/2*c)^4*b^2-504*a*b*s 
in(1/2*d*x+1/2*c)^5+70*cos(1/2*d*x+1/2*c)*sin(1/2*d*x+1/2*c)^2*a^2-10*cos( 
1/2*d*x+1/2*c)*sin(1/2*d*x+1/2*c)^2*b^2-35*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(2 
*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*EllipticF(cos(1/2*d*x+1/2*c),2^(1/2))*a^2-1 
0*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*EllipticF( 
cos(1/2*d*x+1/2*c),2^(1/2))*b^2+252*a*b*sin(1/2*d*x+1/2*c)^3-42*a*b*sin(1/ 
2*d*x+1/2*c))/d
 

Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.12 (sec) , antiderivative size = 142, normalized size of antiderivative = 0.95 \[ \int (e \cos (c+d x))^{3/2} (a+b \sin (c+d x))^2 \, dx=-\frac {2 \, {\left (5 i \, \sqrt {\frac {1}{2}} {\left (7 \, a^{2} + 2 \, b^{2}\right )} e^{\frac {3}{2}} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) - 5 i \, \sqrt {\frac {1}{2}} {\left (7 \, a^{2} + 2 \, b^{2}\right )} e^{\frac {3}{2}} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) + {\left (42 \, a b e \cos \left (d x + c\right )^{2} + 5 \, {\left (3 \, b^{2} e \cos \left (d x + c\right )^{2} - {\left (7 \, a^{2} + 2 \, b^{2}\right )} e\right )} \sin \left (d x + c\right )\right )} \sqrt {e \cos \left (d x + c\right )}\right )}}{105 \, d} \] Input:

integrate((e*cos(d*x+c))^(3/2)*(a+b*sin(d*x+c))^2,x, algorithm="fricas")
 

Output:

-2/105*(5*I*sqrt(1/2)*(7*a^2 + 2*b^2)*e^(3/2)*weierstrassPInverse(-4, 0, c 
os(d*x + c) + I*sin(d*x + c)) - 5*I*sqrt(1/2)*(7*a^2 + 2*b^2)*e^(3/2)*weie 
rstrassPInverse(-4, 0, cos(d*x + c) - I*sin(d*x + c)) + (42*a*b*e*cos(d*x 
+ c)^2 + 5*(3*b^2*e*cos(d*x + c)^2 - (7*a^2 + 2*b^2)*e)*sin(d*x + c))*sqrt 
(e*cos(d*x + c)))/d
 

Sympy [F(-1)]

Timed out. \[ \int (e \cos (c+d x))^{3/2} (a+b \sin (c+d x))^2 \, dx=\text {Timed out} \] Input:

integrate((e*cos(d*x+c))**(3/2)*(a+b*sin(d*x+c))**2,x)
 

Output:

Timed out
 

Maxima [F]

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

integrate((e*cos(d*x+c))^(3/2)*(a+b*sin(d*x+c))^2,x, algorithm="maxima")
 

Output:

integrate((e*cos(d*x + c))^(3/2)*(b*sin(d*x + c) + a)^2, x)
 

Giac [F]

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

integrate((e*cos(d*x+c))^(3/2)*(a+b*sin(d*x+c))^2,x, algorithm="giac")
 

Output:

integrate((e*cos(d*x + c))^(3/2)*(b*sin(d*x + c) + a)^2, x)
 

Mupad [F(-1)]

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

int((e*cos(c + d*x))^(3/2)*(a + b*sin(c + d*x))^2,x)
                                                                                    
                                                                                    
 

Output:

int((e*cos(c + d*x))^(3/2)*(a + b*sin(c + d*x))^2, x)
 

Reduce [F]

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

int((e*cos(d*x+c))^(3/2)*(a+b*sin(d*x+c))^2,x)
 

Output:

(sqrt(e)*e*( - 4*sqrt(cos(c + d*x))*cos(c + d*x)**2*a*b + 5*int(sqrt(cos(c 
 + d*x))*cos(c + d*x)*sin(c + d*x)**2,x)*b**2*d + 5*int(sqrt(cos(c + d*x)) 
*cos(c + d*x),x)*a**2*d))/(5*d)