3.187 \(\int \cos ^{-n}(c+d x) (a \cos (c+d x)+i a \sin (c+d x))^n \, dx\)

Optimal. Leaf size=66 \[ -\frac {i \cos ^{-n}(c+d x) \, _2F_1\left (1,n;n+1;\frac {1}{2} (i \tan (c+d x)+1)\right ) (a \cos (c+d x)+i a \sin (c+d x))^n}{2 d n} \]

[Out]

-1/2*I*hypergeom([1, n],[1+n],1/2+1/2*I*tan(d*x+c))*(a*cos(d*x+c)+I*a*sin(d*x+c))^n/d/n/(cos(d*x+c)^n)

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 66, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.030, Rules used = {3084} \[ -\frac {i \cos ^{-n}(c+d x) \, _2F_1\left (1,n;n+1;\frac {1}{2} (i \tan (c+d x)+1)\right ) (a \cos (c+d x)+i a \sin (c+d x))^n}{2 d n} \]

Antiderivative was successfully verified.

[In]

Int[(a*Cos[c + d*x] + I*a*Sin[c + d*x])^n/Cos[c + d*x]^n,x]

[Out]

((-I/2)*Hypergeometric2F1[1, n, 1 + n, (1 + I*Tan[c + d*x])/2]*(a*Cos[c + d*x] + I*a*Sin[c + d*x])^n)/(d*n*Cos
[c + d*x]^n)

Rule 3084

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symb
ol] :> -Simp[(b*(a*Cos[c + d*x] + b*Sin[c + d*x])^n*Hypergeometric2F1[1, n, n + 1, (a + b*Tan[c + d*x])/(2*a)]
)/(2*a*d*n*Cos[c + d*x]^n), x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[m + n, 0] && EqQ[a^2 + b^2, 0] &&  !Integer
Q[n]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 2.17, size = 90, normalized size = 1.36 \[ \frac {\cos ^{-n}(c+d x) \left (n (\tan (c+d x)-i) \, _2F_1\left (1,n+1;n+2;\frac {1}{2} (i \tan (c+d x)+1)\right )-2 i (n+1)\right ) (a (\cos (c+d x)+i \sin (c+d x)))^n}{4 d n (n+1)} \]

Antiderivative was successfully verified.

[In]

Integrate[(a*Cos[c + d*x] + I*a*Sin[c + d*x])^n/Cos[c + d*x]^n,x]

[Out]

((a*(Cos[c + d*x] + I*Sin[c + d*x]))^n*((-2*I)*(1 + n) + n*Hypergeometric2F1[1, 1 + n, 2 + n, (1 + I*Tan[c + d
*x])/2]*(-I + Tan[c + d*x])))/(4*d*n*(1 + n)*Cos[c + d*x]^n)

________________________________________________________________________________________

fricas [F]  time = 0.68, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {e^{\left (i \, d n x + i \, c n + n \log \relax (a)\right )}}{\left (\frac {1}{2} \, {\left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )} e^{\left (-i \, d x - i \, c\right )}\right )^{n}}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integral(e^(I*d*n*x + I*c*n + n*log(a))/(1/2*(e^(2*I*d*x + 2*I*c) + 1)*e^(-I*d*x - I*c))^n, x)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate((a*cos(d*x + c) + I*a*sin(d*x + c))^n/cos(d*x + c)^n, x)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a*cos(d*x+c)+I*a*sin(d*x+c))^n/(cos(d*x+c)^n),x)

[Out]

int((a*cos(d*x+c)+I*a*sin(d*x+c))^n/(cos(d*x+c)^n),x)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate((a*cos(d*x + c) + I*a*sin(d*x + c))^n*cos(d*x + c)^(-n), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.02 \[ \int \frac {{\left (a\,\cos \left (c+d\,x\right )+a\,\sin \left (c+d\,x\right )\,1{}\mathrm {i}\right )}^n}{{\cos \left (c+d\,x\right )}^n} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a*cos(c + d*x) + a*sin(c + d*x)*1i)^n/cos(c + d*x)^n,x)

[Out]

int((a*cos(c + d*x) + a*sin(c + d*x)*1i)^n/cos(c + d*x)^n, x)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*cos(d*x+c)+I*a*sin(d*x+c))**n/(cos(d*x+c)**n),x)

[Out]

Integral((a*(I*sin(c + d*x) + cos(c + d*x)))**n*cos(c + d*x)**(-n), x)

________________________________________________________________________________________