3.218 \(\int (2 \cos (c+d x)+3 \sin (c+d x))^n \, dx\)

Optimal. Leaf size=95 \[ -\frac {13^{n/2} \sin \left (c+d x-\tan ^{-1}\left (\frac {3}{2}\right )\right ) \cos ^{n+1}\left (c+d x-\tan ^{-1}\left (\frac {3}{2}\right )\right ) \, _2F_1\left (\frac {1}{2},\frac {n+1}{2};\frac {n+3}{2};\cos ^2\left (c+d x-\tan ^{-1}\left (\frac {3}{2}\right )\right )\right )}{d (n+1) \sqrt {\sin ^2\left (c+d x-\tan ^{-1}\left (\frac {3}{2}\right )\right )}} \]

[Out]

-13^(1/2*n)*cos(c+d*x-arctan(3/2))^(1+n)*hypergeom([1/2, 1/2+1/2*n],[3/2+1/2*n],cos(c+d*x-arctan(3/2))^2)*sin(
c+d*x-arctan(3/2))/d/(1+n)/(sin(c+d*x-arctan(3/2))^2)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 95, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {3077, 2643} \[ -\frac {13^{n/2} \sin \left (c+d x-\tan ^{-1}\left (\frac {3}{2}\right )\right ) \cos ^{n+1}\left (c+d x-\tan ^{-1}\left (\frac {3}{2}\right )\right ) \, _2F_1\left (\frac {1}{2},\frac {n+1}{2};\frac {n+3}{2};\cos ^2\left (c+d x-\tan ^{-1}\left (\frac {3}{2}\right )\right )\right )}{d (n+1) \sqrt {\sin ^2\left (c+d x-\tan ^{-1}\left (\frac {3}{2}\right )\right )}} \]

Antiderivative was successfully verified.

[In]

Int[(2*Cos[c + d*x] + 3*Sin[c + d*x])^n,x]

[Out]

-((13^(n/2)*Cos[c + d*x - ArcTan[3/2]]^(1 + n)*Hypergeometric2F1[1/2, (1 + n)/2, (3 + n)/2, Cos[c + d*x - ArcT
an[3/2]]^2]*Sin[c + d*x - ArcTan[3/2]])/(d*(1 + n)*Sqrt[Sin[c + d*x - ArcTan[3/2]]^2]))

Rule 2643

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

Rule 3077

Int[(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Dist[(a^2 + b^2)^(n/2),
 Int[Cos[c + d*x - ArcTan[a, b]]^n, x], x] /; FreeQ[{a, b, c, d, n}, x] &&  !(GeQ[n, 1] || LeQ[n, -1]) && GtQ[
a^2 + b^2, 0]

Rubi steps

\begin {align*} \int (2 \cos (c+d x)+3 \sin (c+d x))^n \, dx &=13^{n/2} \int \cos ^n\left (c+d x-\tan ^{-1}\left (\frac {3}{2}\right )\right ) \, dx\\ &=-\frac {13^{n/2} \cos ^{1+n}\left (c+d x-\tan ^{-1}\left (\frac {3}{2}\right )\right ) \, _2F_1\left (\frac {1}{2},\frac {1+n}{2};\frac {3+n}{2};\cos ^2\left (c+d x-\tan ^{-1}\left (\frac {3}{2}\right )\right )\right ) \sin \left (c+d x-\tan ^{-1}\left (\frac {3}{2}\right )\right )}{d (1+n) \sqrt {\sin ^2\left (c+d x-\tan ^{-1}\left (\frac {3}{2}\right )\right )}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.17, size = 88, normalized size = 0.93 \[ -\frac {\sin \left (2 \left (c+d x+\tan ^{-1}\left (\frac {2}{3}\right )\right )\right ) \sin ^2\left (c+d x+\tan ^{-1}\left (\frac {2}{3}\right )\right )^{-\frac {n}{2}-\frac {1}{2}} (3 \sin (c+d x)+2 \cos (c+d x))^n \, _2F_1\left (\frac {1}{2},\frac {1-n}{2};\frac {3}{2};\cos ^2\left (c+d x+\tan ^{-1}\left (\frac {2}{3}\right )\right )\right )}{2 d} \]

Antiderivative was successfully verified.

[In]

Integrate[(2*Cos[c + d*x] + 3*Sin[c + d*x])^n,x]

[Out]

-1/2*(Hypergeometric2F1[1/2, (1 - n)/2, 3/2, Cos[c + d*x + ArcTan[2/3]]^2]*(2*Cos[c + d*x] + 3*Sin[c + d*x])^n
*(Sin[c + d*x + ArcTan[2/3]]^2)^(-1/2 - n/2)*Sin[2*(c + d*x + ArcTan[2/3])])/d

________________________________________________________________________________________

fricas [F]  time = 1.18, size = 0, normalized size = 0.00 \[ {\rm integral}\left ({\left (2 \, \cos \left (d x + c\right ) + 3 \, \sin \left (d x + c\right )\right )}^{n}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*cos(d*x+c)+3*sin(d*x+c))^n,x, algorithm="fricas")

[Out]

integral((2*cos(d*x + c) + 3*sin(d*x + c))^n, x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (2 \, \cos \left (d x + c\right ) + 3 \, \sin \left (d x + c\right )\right )}^{n}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*cos(d*x+c)+3*sin(d*x+c))^n,x, algorithm="giac")

[Out]

integrate((2*cos(d*x + c) + 3*sin(d*x + c))^n, x)

________________________________________________________________________________________

maple [F]  time = 1.06, size = 0, normalized size = 0.00 \[ \int \left (2 \cos \left (d x +c \right )+3 \sin \left (d x +c \right )\right )^{n}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*cos(d*x+c)+3*sin(d*x+c))^n,x)

[Out]

int((2*cos(d*x+c)+3*sin(d*x+c))^n,x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (2 \, \cos \left (d x + c\right ) + 3 \, \sin \left (d x + c\right )\right )}^{n}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*cos(d*x+c)+3*sin(d*x+c))^n,x, algorithm="maxima")

[Out]

integrate((2*cos(d*x + c) + 3*sin(d*x + c))^n, x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int {\left (2\,\cos \left (c+d\,x\right )+3\,\sin \left (c+d\,x\right )\right )}^n \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*cos(c + d*x) + 3*sin(c + d*x))^n,x)

[Out]

int((2*cos(c + d*x) + 3*sin(c + d*x))^n, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (3 \sin {\left (c + d x \right )} + 2 \cos {\left (c + d x \right )}\right )^{n}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*cos(d*x+c)+3*sin(d*x+c))**n,x)

[Out]

Integral((3*sin(c + d*x) + 2*cos(c + d*x))**n, x)

________________________________________________________________________________________