3.526 \(\int \frac {\cos (x)-i \sin (x)}{\cos (x)+i \sin (x)} \, dx\)

Optimal. Leaf size=17 \[ \frac {1}{2} i (\cos (x)-i \sin (x))^2 \]

[Out]

1/2*I*(cos(x)-I*sin(x))^2

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 17, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.048, Rules used = {4385} \[ \frac {1}{2} i (\cos (x)-i \sin (x))^2 \]

Antiderivative was successfully verified.

[In]

Int[(Cos[x] - I*Sin[x])/(Cos[x] + I*Sin[x]),x]

[Out]

(I/2)*(Cos[x] - I*Sin[x])^2

Rule 4385

Int[(u_)*(y_)^(m_.), x_Symbol] :> With[{q = DerivativeDivides[ActivateTrig[y], ActivateTrig[u], x]}, Simp[(q*A
ctivateTrig[y^(m + 1)])/(m + 1), x] /;  !FalseQ[q]] /; FreeQ[m, x] && NeQ[m, -1] &&  !InertTrigFreeQ[u]

Rubi steps

\begin {align*} \int \frac {\cos (x)-i \sin (x)}{\cos (x)+i \sin (x)} \, dx &=\frac {1}{2} i (\cos (x)-i \sin (x))^2\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 19, normalized size = 1.12 \[ \frac {1}{2} \sin (2 x)+\frac {1}{2} i \cos (2 x) \]

Antiderivative was successfully verified.

[In]

Integrate[(Cos[x] - I*Sin[x])/(Cos[x] + I*Sin[x]),x]

[Out]

(I/2)*Cos[2*x] + Sin[2*x]/2

________________________________________________________________________________________

fricas [A]  time = 0.70, size = 6, normalized size = 0.35 \[ \frac {1}{2} i \, e^{\left (-2 i \, x\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((cos(x)-I*sin(x))/(cos(x)+I*sin(x)),x, algorithm="fricas")

[Out]

1/2*I*e^(-2*I*x)

________________________________________________________________________________________

giac [A]  time = 0.14, size = 14, normalized size = 0.82 \[ -\frac {2 \, \tan \left (\frac {1}{2} \, x\right )}{{\left (\tan \left (\frac {1}{2} \, x\right ) - i\right )}^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((cos(x)-I*sin(x))/(cos(x)+I*sin(x)),x, algorithm="giac")

[Out]

-2*tan(1/2*x)/(tan(1/2*x) - I)^2

________________________________________________________________________________________

maple [A]  time = 0.20, size = 8, normalized size = 0.47 \[ \frac {1}{\tan \relax (x )-i} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((cos(x)-I*sin(x))/(cos(x)+I*sin(x)),x)

[Out]

1/(tan(x)-I)

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((cos(x)-I*sin(x))/(cos(x)+I*sin(x)),x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: Error executing code in Maxima: expt: undefined: 0 to a negative e
xponent.

________________________________________________________________________________________

mupad [B]  time = 2.76, size = 16, normalized size = 0.94 \[ -\frac {\cos \relax (x)}{-\sin \relax (x)+\cos \relax (x)\,1{}\mathrm {i}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((cos(x) - sin(x)*1i)/(cos(x) + sin(x)*1i),x)

[Out]

-cos(x)/(cos(x)*1i - sin(x))

________________________________________________________________________________________

sympy [A]  time = 0.08, size = 8, normalized size = 0.47 \[ \frac {i e^{- 2 i x}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((cos(x)-I*sin(x))/(cos(x)+I*sin(x)),x)

[Out]

I*exp(-2*I*x)/2

________________________________________________________________________________________