### 3.64 $$\int (a+b \sin (c+d x))^n \, dx$$

Optimal. Leaf size=104 $-\frac{\sqrt{2} \cos (c+d x) (a+b \sin (c+d x))^n \left (\frac{a+b \sin (c+d x)}{a+b}\right )^{-n} F_1\left (\frac{1}{2};\frac{1}{2},-n;\frac{3}{2};\frac{1}{2} (1-\sin (c+d x)),\frac{b (1-\sin (c+d x))}{a+b}\right )}{d \sqrt{\sin (c+d x)+1}}$

[Out]

-((Sqrt[2]*AppellF1[1/2, 1/2, -n, 3/2, (1 - Sin[c + d*x])/2, (b*(1 - Sin[c + d*x]))/(a + b)]*Cos[c + d*x]*(a +
b*Sin[c + d*x])^n)/(d*Sqrt[1 + Sin[c + d*x]]*((a + b*Sin[c + d*x])/(a + b))^n))

________________________________________________________________________________________

Rubi [A]  time = 0.0656679, antiderivative size = 104, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 12, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.25, Rules used = {2665, 139, 138} $-\frac{\sqrt{2} \cos (c+d x) (a+b \sin (c+d x))^n \left (\frac{a+b \sin (c+d x)}{a+b}\right )^{-n} F_1\left (\frac{1}{2};\frac{1}{2},-n;\frac{3}{2};\frac{1}{2} (1-\sin (c+d x)),\frac{b (1-\sin (c+d x))}{a+b}\right )}{d \sqrt{\sin (c+d x)+1}}$

Antiderivative was successfully veriﬁed.

[In]

Int[(a + b*Sin[c + d*x])^n,x]

[Out]

-((Sqrt[2]*AppellF1[1/2, 1/2, -n, 3/2, (1 - Sin[c + d*x])/2, (b*(1 - Sin[c + d*x]))/(a + b)]*Cos[c + d*x]*(a +
b*Sin[c + d*x])^n)/(d*Sqrt[1 + Sin[c + d*x]]*((a + b*Sin[c + d*x])/(a + b))^n))

Rule 2665

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Dist[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 139

Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_))^(p_), x_Symbol] :> Dist[(e + f*x)^
FracPart[p]/((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*
((b*e)/(b*e - a*f) + (b*f*x)/(b*e - a*f))^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] &&  !IntegerQ[m]
&&  !IntegerQ[n] &&  !IntegerQ[p] && GtQ[b/(b*c - a*d), 0] &&  !GtQ[b/(b*e - a*f), 0]

Rule 138

Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_))^(p_), x_Symbol] :> Simp[((a + b*x)
^(m + 1)*AppellF1[m + 1, -n, -p, m + 2, -((d*(a + b*x))/(b*c - a*d)), -((f*(a + b*x))/(b*e - a*f))])/(b*(m + 1
)*(b/(b*c - a*d))^n*(b/(b*e - a*f))^p), x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] &&  !IntegerQ[m] &&  !Inte
gerQ[n] &&  !IntegerQ[p] && GtQ[b/(b*c - a*d), 0] && GtQ[b/(b*e - a*f), 0] &&  !(GtQ[d/(d*a - c*b), 0] && GtQ[
d/(d*e - c*f), 0] && SimplerQ[c + d*x, a + b*x]) &&  !(GtQ[f/(f*a - e*b), 0] && GtQ[f/(f*c - e*d), 0] && Simpl
erQ[e + f*x, a + b*x])

Rubi steps

\begin{align*} \int (a+b \sin (c+d x))^n \, dx &=\frac{\cos (c+d x) \operatorname{Subst}\left (\int \frac{(a+b x)^n}{\sqrt{1-x} \sqrt{1+x}} \, dx,x,\sin (c+d x)\right )}{d \sqrt{1-\sin (c+d x)} \sqrt{1+\sin (c+d x)}}\\ &=\frac{\left (\cos (c+d x) (a+b \sin (c+d x))^n \left (-\frac{a+b \sin (c+d x)}{-a-b}\right )^{-n}\right ) \operatorname{Subst}\left (\int \frac{\left (-\frac{a}{-a-b}-\frac{b x}{-a-b}\right )^n}{\sqrt{1-x} \sqrt{1+x}} \, dx,x,\sin (c+d x)\right )}{d \sqrt{1-\sin (c+d x)} \sqrt{1+\sin (c+d x)}}\\ &=-\frac{\sqrt{2} F_1\left (\frac{1}{2};\frac{1}{2},-n;\frac{3}{2};\frac{1}{2} (1-\sin (c+d x)),\frac{b (1-\sin (c+d x))}{a+b}\right ) \cos (c+d x) (a+b \sin (c+d x))^n \left (\frac{a+b \sin (c+d x)}{a+b}\right )^{-n}}{d \sqrt{1+\sin (c+d x)}}\\ \end{align*}

Mathematica [A]  time = 0.245063, size = 120, normalized size = 1.15 $\frac{\sec (c+d x) \sqrt{-\frac{b (\sin (c+d x)-1)}{a+b}} \sqrt{\frac{b (\sin (c+d x)+1)}{b-a}} (a+b \sin (c+d x))^{n+1} F_1\left (n+1;\frac{1}{2},\frac{1}{2};n+2;\frac{a+b \sin (c+d x)}{a-b},\frac{a+b \sin (c+d x)}{a+b}\right )}{b d (n+1)}$

Warning: Unable to verify antiderivative.

[In]

Integrate[(a + b*Sin[c + d*x])^n,x]

[Out]

(AppellF1[1 + n, 1/2, 1/2, 2 + n, (a + b*Sin[c + d*x])/(a - b), (a + b*Sin[c + d*x])/(a + b)]*Sec[c + d*x]*Sqr
t[-((b*(-1 + Sin[c + d*x]))/(a + b))]*Sqrt[(b*(1 + Sin[c + d*x]))/(-a + b)]*(a + b*Sin[c + d*x])^(1 + n))/(b*d
*(1 + n))

________________________________________________________________________________________

Maple [F]  time = 0.405, size = 0, normalized size = 0. \begin{align*} \int \left ( a+b\sin \left ( dx+c \right ) \right ) ^{n}\, dx \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sin(d*x+c))^n,x)

[Out]

int((a+b*sin(d*x+c))^n,x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \sin \left (d x + c\right ) + a\right )}^{n}\,{d x} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(d*x+c))^n,x, algorithm="maxima")

[Out]

integrate((b*sin(d*x + c) + a)^n, x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (b \sin \left (d x + c\right ) + a\right )}^{n}, x\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(d*x+c))^n,x, algorithm="fricas")

[Out]

integral((b*sin(d*x + c) + a)^n, x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(d*x+c))**n,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \sin \left (d x + c\right ) + a\right )}^{n}\,{d x} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(d*x+c))^n,x, algorithm="giac")

[Out]

integrate((b*sin(d*x + c) + a)^n, x)