3.248 \(\int (a \cos (c+d x)+i a \sin (c+d x))^n \, dx\)

Optimal. Leaf size=32 \[ -\frac{i (a \cos (c+d x)+i a \sin (c+d x))^n}{d n} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0154417, antiderivative size = 32, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.045, Rules used = {3071} \[ -\frac{i (a \cos (c+d x)+i a \sin (c+d x))^n}{d n} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 3071

Int[(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(a*(a*Cos[c + d*x]
 + b*Sin[c + d*x])^n)/(b*d*n), x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[a^2 + b^2, 0]

Rubi steps

\begin{align*} \int (a \cos (c+d x)+i a \sin (c+d x))^n \, dx &=-\frac{i (a \cos (c+d x)+i a \sin (c+d x))^n}{d n}\\ \end{align*}

Mathematica [A]  time = 0.0840538, size = 31, normalized size = 0.97 \[ -\frac{i (a (\cos (c+d x)+i \sin (c+d x)))^n}{d n} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.029, size = 31, normalized size = 1. \begin{align*}{\frac{-i \left ( a\cos \left ( dx+c \right ) +ia\sin \left ( dx+c \right ) \right ) ^{n}}{dn}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [B]  time = 1.53916, size = 80, normalized size = 2.5 \begin{align*} -\frac{i \, a^{n} e^{\left (-n \log \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + i\right ) + n \log \left (-\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + i\right )\right )}}{d n} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-I*a^n*e^(-n*log(sin(d*x + c)/(cos(d*x + c) + 1) + I) + n*log(-sin(d*x + c)/(cos(d*x + c) + 1) + I))/(d*n)

________________________________________________________________________________________

Fricas [A]  time = 2.02777, size = 43, normalized size = 1.34 \begin{align*} -\frac{i \, \left (a e^{\left (i \, d x + i \, c\right )}\right )^{n}}{d n} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-I*(a*e^(I*d*x + I*c))^n/(d*n)

________________________________________________________________________________________

Sympy [A]  time = 7.14932, size = 116, normalized size = 3.62 \begin{align*} \begin{cases} x & \text{for}\: d = 0 \wedge n = 0 \\x \left (i a \sin{\left (c \right )} + a \cos{\left (c \right )}\right )^{n} & \text{for}\: d = 0 \\x & \text{for}\: n = 0 \\\frac{\left (i a \sin{\left (c + d x \right )} + a \cos{\left (c + d x \right )}\right )^{n} \sin{\left (c + d x \right )}}{i d n \sin{\left (c + d x \right )} + d n \cos{\left (c + d x \right )}} - \frac{i \left (i a \sin{\left (c + d x \right )} + a \cos{\left (c + d x \right )}\right )^{n} \cos{\left (c + d x \right )}}{i d n \sin{\left (c + d x \right )} + d n \cos{\left (c + d x \right )}} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Piecewise((x, Eq(d, 0) & Eq(n, 0)), (x*(I*a*sin(c) + a*cos(c))**n, Eq(d, 0)), (x, Eq(n, 0)), ((I*a*sin(c + d*x
) + a*cos(c + d*x))**n*sin(c + d*x)/(I*d*n*sin(c + d*x) + d*n*cos(c + d*x)) - I*(I*a*sin(c + d*x) + a*cos(c +
d*x))**n*cos(c + d*x)/(I*d*n*sin(c + d*x) + d*n*cos(c + d*x)), True))

________________________________________________________________________________________

Giac [A]  time = 1.64344, size = 31, normalized size = 0.97 \begin{align*} -\frac{i \, e^{\left (i \, d n x + i \, c n + n \log \left (a\right )\right )}}{d n} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-I*e^(I*d*n*x + I*c*n + n*log(a))/(d*n)