\(\int (d \sin (e+f x))^m (a+b \sin (e+f x)) \, dx\) [215]

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

Optimal result

Integrand size = 21, antiderivative size = 139 \[ \int (d \sin (e+f x))^m (a+b \sin (e+f x)) \, dx=\frac {a \cos (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1+m}{2},\frac {3+m}{2},\sin ^2(e+f x)\right ) (d \sin (e+f x))^{1+m}}{d f (1+m) \sqrt {\cos ^2(e+f x)}}+\frac {b \cos (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2+m}{2},\frac {4+m}{2},\sin ^2(e+f x)\right ) (d \sin (e+f x))^{2+m}}{d^2 f (2+m) \sqrt {\cos ^2(e+f x)}} \] Output:

a*cos(f*x+e)*hypergeom([1/2, 1/2+1/2*m],[3/2+1/2*m],sin(f*x+e)^2)*(d*sin(f 
*x+e))^(1+m)/d/f/(1+m)/(cos(f*x+e)^2)^(1/2)+b*cos(f*x+e)*hypergeom([1/2, 1 
+1/2*m],[2+1/2*m],sin(f*x+e)^2)*(d*sin(f*x+e))^(2+m)/d^2/f/(2+m)/(cos(f*x+ 
e)^2)^(1/2)
 

Mathematica [A] (verified)

Time = 0.20 (sec) , antiderivative size = 111, normalized size of antiderivative = 0.80 \[ \int (d \sin (e+f x))^m (a+b \sin (e+f x)) \, dx=\frac {\sqrt {\cos ^2(e+f x)} (d \sin (e+f x))^m \left (a (2+m) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1+m}{2},\frac {3+m}{2},\sin ^2(e+f x)\right )+b (1+m) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {2+m}{2},\frac {4+m}{2},\sin ^2(e+f x)\right ) \sin (e+f x)\right ) \tan (e+f x)}{f (1+m) (2+m)} \] Input:

Integrate[(d*Sin[e + f*x])^m*(a + b*Sin[e + f*x]),x]
 

Output:

(Sqrt[Cos[e + f*x]^2]*(d*Sin[e + f*x])^m*(a*(2 + m)*Hypergeometric2F1[1/2, 
 (1 + m)/2, (3 + m)/2, Sin[e + f*x]^2] + b*(1 + m)*Hypergeometric2F1[1/2, 
(2 + m)/2, (4 + m)/2, Sin[e + f*x]^2]*Sin[e + f*x])*Tan[e + f*x])/(f*(1 + 
m)*(2 + m))
 

Rubi [A] (verified)

Time = 0.32 (sec) , antiderivative size = 139, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3042, 3227, 3042, 3122}

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+b \sin (e+f x)) (d \sin (e+f x))^m \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int (a+b \sin (e+f x)) (d \sin (e+f x))^mdx\)

\(\Big \downarrow \) 3227

\(\displaystyle a \int (d \sin (e+f x))^mdx+\frac {b \int (d \sin (e+f x))^{m+1}dx}{d}\)

\(\Big \downarrow \) 3042

\(\displaystyle a \int (d \sin (e+f x))^mdx+\frac {b \int (d \sin (e+f x))^{m+1}dx}{d}\)

\(\Big \downarrow \) 3122

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

Input:

Int[(d*Sin[e + f*x])^m*(a + b*Sin[e + f*x]),x]
 

Output:

(a*Cos[e + f*x]*Hypergeometric2F1[1/2, (1 + m)/2, (3 + m)/2, Sin[e + f*x]^ 
2]*(d*Sin[e + f*x])^(1 + m))/(d*f*(1 + m)*Sqrt[Cos[e + f*x]^2]) + (b*Cos[e 
 + f*x]*Hypergeometric2F1[1/2, (2 + m)/2, (4 + m)/2, Sin[e + f*x]^2]*(d*Si 
n[e + f*x])^(2 + m))/(d^2*f*(2 + m)*Sqrt[Cos[e + f*x]^2])
 

Defintions of rubi rules used

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

rule 3122
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[Cos[c + d*x]*(( 
b*Sin[c + d*x])^(n + 1)/(b*d*(n + 1)*Sqrt[Cos[c + d*x]^2]))*Hypergeometric2 
F1[1/2, (n + 1)/2, (n + 3)/2, Sin[c + d*x]^2], x] /; FreeQ[{b, c, d, n}, x] 
 &&  !IntegerQ[2*n]
 

rule 3227
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x 
_)]), x_Symbol] :> Simp[c   Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b   Int 
[(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
 
Maple [F]

\[\int \left (d \sin \left (f x +e \right )\right )^{m} \left (a +b \sin \left (f x +e \right )\right )d x\]

Input:

int((d*sin(f*x+e))^m*(a+b*sin(f*x+e)),x)
 

Output:

int((d*sin(f*x+e))^m*(a+b*sin(f*x+e)),x)
 

Fricas [F]

\[ \int (d \sin (e+f x))^m (a+b \sin (e+f x)) \, dx=\int { {\left (b \sin \left (f x + e\right ) + a\right )} \left (d \sin \left (f x + e\right )\right )^{m} \,d x } \] Input:

integrate((d*sin(f*x+e))^m*(a+b*sin(f*x+e)),x, algorithm="fricas")
 

Output:

integral((b*sin(f*x + e) + a)*(d*sin(f*x + e))^m, x)
 

Sympy [F]

\[ \int (d \sin (e+f x))^m (a+b \sin (e+f x)) \, dx=\int \left (d \sin {\left (e + f x \right )}\right )^{m} \left (a + b \sin {\left (e + f x \right )}\right )\, dx \] Input:

integrate((d*sin(f*x+e))**m*(a+b*sin(f*x+e)),x)
 

Output:

Integral((d*sin(e + f*x))**m*(a + b*sin(e + f*x)), x)
 

Maxima [F]

\[ \int (d \sin (e+f x))^m (a+b \sin (e+f x)) \, dx=\int { {\left (b \sin \left (f x + e\right ) + a\right )} \left (d \sin \left (f x + e\right )\right )^{m} \,d x } \] Input:

integrate((d*sin(f*x+e))^m*(a+b*sin(f*x+e)),x, algorithm="maxima")
 

Output:

integrate((b*sin(f*x + e) + a)*(d*sin(f*x + e))^m, x)
 

Giac [F]

\[ \int (d \sin (e+f x))^m (a+b \sin (e+f x)) \, dx=\int { {\left (b \sin \left (f x + e\right ) + a\right )} \left (d \sin \left (f x + e\right )\right )^{m} \,d x } \] Input:

integrate((d*sin(f*x+e))^m*(a+b*sin(f*x+e)),x, algorithm="giac")
 

Output:

integrate((b*sin(f*x + e) + a)*(d*sin(f*x + e))^m, x)
 

Mupad [F(-1)]

Timed out. \[ \int (d \sin (e+f x))^m (a+b \sin (e+f x)) \, dx=\int {\left (d\,\sin \left (e+f\,x\right )\right )}^m\,\left (a+b\,\sin \left (e+f\,x\right )\right ) \,d x \] Input:

int((d*sin(e + f*x))^m*(a + b*sin(e + f*x)),x)
 

Output:

int((d*sin(e + f*x))^m*(a + b*sin(e + f*x)), x)
 

Reduce [F]

\[ \int (d \sin (e+f x))^m (a+b \sin (e+f x)) \, dx=d^{m} \left (\left (\int \sin \left (f x +e \right )^{m}d x \right ) a +\left (\int \sin \left (f x +e \right )^{m} \sin \left (f x +e \right )d x \right ) b \right ) \] Input:

int((d*sin(f*x+e))^m*(a+b*sin(f*x+e)),x)
 

Output:

d**m*(int(sin(e + f*x)**m,x)*a + int(sin(e + f*x)**m*sin(e + f*x),x)*b)