\(\int (a+a \sin (e+f x))^{3/2} (c+d \sin (e+f x))^n \, dx\) [670]

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

Optimal result

Integrand size = 27, antiderivative size = 160 \[ \int (a+a \sin (e+f x))^{3/2} (c+d \sin (e+f x))^n \, dx=-\frac {2 a^2 \cos (e+f x) (c+d \sin (e+f x))^{1+n}}{d f (3+2 n) \sqrt {a+a \sin (e+f x)}}+\frac {2 a^2 (c-d (5+4 n)) \cos (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-n,\frac {3}{2},\frac {d (1-\sin (e+f x))}{c+d}\right ) (c+d \sin (e+f x))^n \left (\frac {c+d \sin (e+f x)}{c+d}\right )^{-n}}{d f (3+2 n) \sqrt {a+a \sin (e+f x)}} \] Output:

-2*a^2*cos(f*x+e)*(c+d*sin(f*x+e))^(1+n)/d/f/(3+2*n)/(a+a*sin(f*x+e))^(1/2 
)+2*a^2*(c-d*(5+4*n))*cos(f*x+e)*hypergeom([1/2, -n],[3/2],d*(1-sin(f*x+e) 
)/(c+d))*(c+d*sin(f*x+e))^n/d/f/(3+2*n)/(a+a*sin(f*x+e))^(1/2)/(((c+d*sin( 
f*x+e))/(c+d))^n)
 

Mathematica [A] (verified)

Time = 4.54 (sec) , antiderivative size = 133, normalized size of antiderivative = 0.83 \[ \int (a+a \sin (e+f x))^{3/2} (c+d \sin (e+f x))^n \, dx=-\frac {2 a^2 \cos (e+f x) (c+d \sin (e+f x))^n \left (\frac {c+d \sin (e+f x)}{c+d}\right )^{-n} \left ((-c+d (5+4 n)) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-n,\frac {3}{2},-\frac {d (-1+\sin (e+f x))}{c+d}\right )+(c+d) \left (\frac {c+d \sin (e+f x)}{c+d}\right )^{1+n}\right )}{d f (3+2 n) \sqrt {a (1+\sin (e+f x))}} \] Input:

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

Output:

(-2*a^2*Cos[e + f*x]*(c + d*Sin[e + f*x])^n*((-c + d*(5 + 4*n))*Hypergeome 
tric2F1[1/2, -n, 3/2, -((d*(-1 + Sin[e + f*x]))/(c + d))] + (c + d)*((c + 
d*Sin[e + f*x])/(c + d))^(1 + n)))/(d*f*(3 + 2*n)*Sqrt[a*(1 + Sin[e + f*x] 
)]*((c + d*Sin[e + f*x])/(c + d))^n)
 

Rubi [A] (verified)

Time = 0.56 (sec) , antiderivative size = 159, normalized size of antiderivative = 0.99, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.296, Rules used = {3042, 3242, 27, 2011, 3042, 3255, 80, 79}

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

\(\Big \downarrow \) 3042

\(\displaystyle \int (a \sin (e+f x)+a)^{3/2} (c+d \sin (e+f x))^ndx\)

\(\Big \downarrow \) 3242

\(\displaystyle \frac {2 \int -\frac {(c+d \sin (e+f x))^n \left ((c-5 d-4 d n) a^2+(c-5 d-4 d n) \sin (e+f x) a^2\right )}{2 \sqrt {\sin (e+f x) a+a}}dx}{d (2 n+3)}-\frac {2 a^2 \cos (e+f x) (c+d \sin (e+f x))^{n+1}}{d f (2 n+3) \sqrt {a \sin (e+f x)+a}}\)

\(\Big \downarrow \) 27

\(\displaystyle -\frac {\int \frac {(c+d \sin (e+f x))^n \left ((c-5 d-4 d n) a^2+(c-5 d-4 d n) \sin (e+f x) a^2\right )}{\sqrt {\sin (e+f x) a+a}}dx}{d (2 n+3)}-\frac {2 a^2 \cos (e+f x) (c+d \sin (e+f x))^{n+1}}{d f (2 n+3) \sqrt {a \sin (e+f x)+a}}\)

\(\Big \downarrow \) 2011

\(\displaystyle -\frac {a (c-4 d n-5 d) \int \sqrt {\sin (e+f x) a+a} (c+d \sin (e+f x))^ndx}{d (2 n+3)}-\frac {2 a^2 \cos (e+f x) (c+d \sin (e+f x))^{n+1}}{d f (2 n+3) \sqrt {a \sin (e+f x)+a}}\)

\(\Big \downarrow \) 3042

\(\displaystyle -\frac {a (c-4 d n-5 d) \int \sqrt {\sin (e+f x) a+a} (c+d \sin (e+f x))^ndx}{d (2 n+3)}-\frac {2 a^2 \cos (e+f x) (c+d \sin (e+f x))^{n+1}}{d f (2 n+3) \sqrt {a \sin (e+f x)+a}}\)

\(\Big \downarrow \) 3255

\(\displaystyle -\frac {a^3 (c-4 d n-5 d) \cos (e+f x) \int \frac {(c+d \sin (e+f x))^n}{\sqrt {a-a \sin (e+f x)}}d\sin (e+f x)}{d f (2 n+3) \sqrt {a-a \sin (e+f x)} \sqrt {a \sin (e+f x)+a}}-\frac {2 a^2 \cos (e+f x) (c+d \sin (e+f x))^{n+1}}{d f (2 n+3) \sqrt {a \sin (e+f x)+a}}\)

\(\Big \downarrow \) 80

\(\displaystyle -\frac {a^3 (c-4 d n-5 d) \cos (e+f x) (c+d \sin (e+f x))^n \left (\frac {c+d \sin (e+f x)}{c+d}\right )^{-n} \int \frac {\left (\frac {c}{c+d}+\frac {d \sin (e+f x)}{c+d}\right )^n}{\sqrt {a-a \sin (e+f x)}}d\sin (e+f x)}{d f (2 n+3) \sqrt {a-a \sin (e+f x)} \sqrt {a \sin (e+f x)+a}}-\frac {2 a^2 \cos (e+f x) (c+d \sin (e+f x))^{n+1}}{d f (2 n+3) \sqrt {a \sin (e+f x)+a}}\)

\(\Big \downarrow \) 79

\(\displaystyle \frac {2 a^2 (c-4 d n-5 d) \cos (e+f x) (c+d \sin (e+f x))^n \left (\frac {c+d \sin (e+f x)}{c+d}\right )^{-n} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-n,\frac {3}{2},\frac {d (1-\sin (e+f x))}{c+d}\right )}{d f (2 n+3) \sqrt {a \sin (e+f x)+a}}-\frac {2 a^2 \cos (e+f x) (c+d \sin (e+f x))^{n+1}}{d f (2 n+3) \sqrt {a \sin (e+f x)+a}}\)

Input:

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

Output:

(-2*a^2*Cos[e + f*x]*(c + d*Sin[e + f*x])^(1 + n))/(d*f*(3 + 2*n)*Sqrt[a + 
 a*Sin[e + f*x]]) + (2*a^2*(c - 5*d - 4*d*n)*Cos[e + f*x]*Hypergeometric2F 
1[1/2, -n, 3/2, (d*(1 - Sin[e + f*x]))/(c + d)]*(c + d*Sin[e + f*x])^n)/(d 
*f*(3 + 2*n)*Sqrt[a + a*Sin[e + f*x]]*((c + d*Sin[e + f*x])/(c + d))^n)
 

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 79
Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(( 
a + b*x)^(m + 1)/(b*(m + 1)*(b/(b*c - a*d))^n))*Hypergeometric2F1[-n, m + 1 
, m + 2, (-d)*((a + b*x)/(b*c - a*d))], x] /; FreeQ[{a, b, c, d, m, n}, x] 
&&  !IntegerQ[m] &&  !IntegerQ[n] && GtQ[b/(b*c - a*d), 0] && (RationalQ[m] 
 ||  !(RationalQ[n] && GtQ[-d/(b*c - a*d), 0]))
 

rule 80
Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(c 
 + d*x)^FracPart[n]/((b/(b*c - a*d))^IntPart[n]*(b*((c + d*x)/(b*c - a*d))) 
^FracPart[n])   Int[(a + b*x)^m*Simp[b*(c/(b*c - a*d)) + b*d*(x/(b*c - a*d) 
), x]^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] &&  !IntegerQ[m] &&  !Integ 
erQ[n] && (RationalQ[m] ||  !SimplerQ[n + 1, m + 1])
 

rule 2011
Int[(u_.)*((a_) + (b_.)*(v_))^(m_.)*((c_) + (d_.)*(v_))^(n_.), x_Symbol] :> 
 Simp[(b/d)^m   Int[u*(c + d*v)^(m + n), x], x] /; FreeQ[{a, b, c, d, n}, x 
] && EqQ[b*c - a*d, 0] && IntegerQ[m] && ( !IntegerQ[n] || SimplerQ[c + d*x 
, a + b*x])
 

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

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

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

\[\int \left (a +a \sin \left (f x +e \right )\right )^{\frac {3}{2}} \left (c +d \sin \left (f x +e \right )\right )^{n}d x\]

Input:

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

Output:

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

Fricas [F]

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

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

Output:

integral((a*sin(f*x + e) + a)^(3/2)*(d*sin(f*x + e) + c)^n, x)
 

Sympy [F(-1)]

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

integrate((a+a*sin(f*x+e))**(3/2)*(c+d*sin(f*x+e))**n,x)
 

Output:

Timed out
 

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

\[ \int (a+a \sin (e+f x))^{3/2} (c+d \sin (e+f x))^n \, dx=\sqrt {a}\, a \left (\int \left (\sin \left (f x +e \right ) d +c \right )^{n} \sqrt {\sin \left (f x +e \right )+1}\, \sin \left (f x +e \right )d x +\int \left (\sin \left (f x +e \right ) d +c \right )^{n} \sqrt {\sin \left (f x +e \right )+1}d x \right ) \] Input:

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

Output:

sqrt(a)*a*(int((sin(e + f*x)*d + c)**n*sqrt(sin(e + f*x) + 1)*sin(e + f*x) 
,x) + int((sin(e + f*x)*d + c)**n*sqrt(sin(e + f*x) + 1),x))