3.252 \(\int (a \cos (c+d x)+i a \sin (c+d x)) \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {2637, 2638} \[ \frac {a \sin (c+d x)}{d}-\frac {i a \cos (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Int[a*Cos[c + d*x] + I*a*Sin[c + d*x],x]

[Out]

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

Rule 2637

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 2638

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 51, normalized size = 1.96 \[ \frac {i a \sin (c) \sin (d x)}{d}-\frac {i a \cos (c) \cos (d x)}{d}+\frac {a \sin (c) \cos (d x)}{d}+\frac {a \cos (c) \sin (d x)}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[a*Cos[c + d*x] + I*a*Sin[c + d*x],x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 1.93, size = 15, normalized size = 0.58 \[ -\frac {i \, a e^{\left (i \, d x + i \, c\right )}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.15, size = 24, normalized size = 0.92 \[ -\frac {i \, a \cos \left (d x + c\right )}{d} + \frac {a \sin \left (d x + c\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.00, size = 26, normalized size = 1.00 \[ -\frac {i a \cos \left (d x +c \right )}{d}+\frac {a \sin \left (d x +c \right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 1.12, size = 24, normalized size = 0.92 \[ -\frac {i \, a \cos \left (d x + c\right )}{d} + \frac {a \sin \left (d x + c\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 2.39, size = 20, normalized size = 0.77 \[ \frac {2\,a}{d\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1{}\mathrm {i}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(2*a)/(d*(tan(c/2 + (d*x)/2) + 1i))

________________________________________________________________________________________

sympy [A]  time = 0.12, size = 26, normalized size = 1.00 \[ \begin {cases} - \frac {i a e^{i c} e^{i d x}}{d} & \text {for}\: d \neq 0 \\a x e^{i c} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Piecewise((-I*a*exp(I*c)*exp(I*d*x)/d, Ne(d, 0)), (a*x*exp(I*c), True))

________________________________________________________________________________________