3.940 \(\int f^{a+b x} (\cos (c+d x)+i \sin (c+d x))^n \, dx\)

Optimal. Leaf size=34 \[ \frac{f^{a+b x} \left (e^{i (c+d x)}\right )^n}{b \log (f)+i d n} \]

[Out]

((E^(I*(c + d*x)))^n*f^(a + b*x))/(I*d*n + b*Log[f])

________________________________________________________________________________________

Rubi [A]  time = 0.0970483, antiderivative size = 34, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.148, Rules used = {4614, 2281, 2287, 2194} \[ \frac{f^{a+b x} \left (e^{i (c+d x)}\right )^n}{b \log (f)+i d n} \]

Antiderivative was successfully verified.

[In]

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

[Out]

((E^(I*(c + d*x)))^n*f^(a + b*x))/(I*d*n + b*Log[f])

Rule 4614

Int[(u_.)*(Cos[v_]*(a_.) + (b_.)*Sin[v_])^(n_.), x_Symbol] :> Int[u*(a/E^((a*v)/b))^n, x] /; FreeQ[{a, b, n},
x] && EqQ[a^2 + b^2, 0]

Rule 2281

Int[(u_.)*((a_.)*(F_)^(v_))^(n_), x_Symbol] :> Dist[(a*F^v)^n/F^(n*v), Int[u*F^(n*v), x], x] /; FreeQ[{F, a, n
}, x] &&  !IntegerQ[n]

Rule 2287

Int[(u_.)*(F_)^(v_)*(G_)^(w_), x_Symbol] :> With[{z = v*Log[F] + w*Log[G]}, Int[u*NormalizeIntegrand[E^z, x],
x] /; BinomialQ[z, x] || (PolynomialQ[z, x] && LeQ[Exponent[z, x], 2])] /; FreeQ[{F, G}, x]

Rule 2194

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rubi steps

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

Mathematica [A]  time = 0.092996, size = 43, normalized size = 1.26 \[ -\frac{i f^{a+b x} (\cos (c+d x)+i \sin (c+d x))^n}{d n-i b \log (f)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [B]  time = 0.125, size = 86, normalized size = 2.5 \begin{align*}{\frac{{{\rm e}^{ \left ( bx+a \right ) \ln \left ( f \right ) }}}{idn+b\ln \left ( f \right ) }{{\rm e}^{n\ln \left ({2\,i\tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \left ( 1+ \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{2} \right ) ^{-1}}+{ \left ( 1- \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{2} \right ) \left ( 1+ \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{2} \right ) ^{-1}} \right ) }}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/(I*d*n+b*ln(f))*exp((b*x+a)*ln(f))*exp(n*ln(2*I*tan(1/2*d*x+1/2*c)/(1+tan(1/2*d*x+1/2*c)^2)+(1-tan(1/2*d*x+1
/2*c)^2)/(1+tan(1/2*d*x+1/2*c)^2)))

________________________________________________________________________________________

Maxima [A]  time = 0.988954, size = 68, normalized size = 2. \begin{align*} \frac{-i \, f^{b x} f^{a} \cos \left (d n x + c n\right ) + f^{b x} f^{a} \sin \left (d n x + c n\right )}{d n - i \, b \log \left (f\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 2.3028, size = 70, normalized size = 2.06 \begin{align*} \frac{f^{b x + a} \left (e^{\left (i \, d x + i \, c\right )}\right )^{n}}{i \, d n + b \log \left (f\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.82261, size = 42, normalized size = 1.24 \begin{align*} \frac{f^{a} e^{\left (i \, d n x + b x \log \left (f\right ) + i \, c n\right )}}{i \, d n + b \log \left (f\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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