3.377 \(\int \frac{1}{2 a-2 a \cos (d+e x)+2 c \sin (d+e x)} \, dx\)

Optimal. Leaf size=25 \[ -\frac{\log \left (a+c \cot \left (\frac{1}{2} (d+e x)\right )\right )}{2 c e} \]

[Out]

-Log[a + c*Cot[(d + e*x)/2]]/(2*c*e)

________________________________________________________________________________________

Rubi [A]  time = 0.0210431, antiderivative size = 25, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.083, Rules used = {3121, 31} \[ -\frac{\log \left (a+c \cot \left (\frac{1}{2} (d+e x)\right )\right )}{2 c e} \]

Antiderivative was successfully verified.

[In]

Int[(2*a - 2*a*Cos[d + e*x] + 2*c*Sin[d + e*x])^(-1),x]

[Out]

-Log[a + c*Cot[(d + e*x)/2]]/(2*c*e)

Rule 3121

Int[(cos[(d_.) + (e_.)*(x_)]*(b_.) + (a_) + (c_.)*sin[(d_.) + (e_.)*(x_)])^(-1), x_Symbol] :> Module[{f = Free
Factors[Cot[(d + e*x)/2], x]}, -Dist[f/e, Subst[Int[1/(a + c*f*x), x], x, Cot[(d + e*x)/2]/f], x]] /; FreeQ[{a
, b, c, d, e}, x] && EqQ[a + b, 0]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rubi steps

\begin{align*} \int \frac{1}{2 a-2 a \cos (d+e x)+2 c \sin (d+e x)} \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{1}{2 a+2 c x} \, dx,x,\cot \left (\frac{1}{2} (d+e x)\right )\right )}{e}\\ &=-\frac{\log \left (a+c \cot \left (\frac{1}{2} (d+e x)\right )\right )}{2 c e}\\ \end{align*}

Mathematica [A]  time = 0.151511, size = 50, normalized size = 2. \[ \frac{\log \left (\sin \left (\frac{1}{2} (d+e x)\right )\right )-\log \left (a \sin \left (\frac{1}{2} (d+e x)\right )+c \cos \left (\frac{1}{2} (d+e x)\right )\right )}{2 c e} \]

Antiderivative was successfully verified.

[In]

Integrate[(2*a - 2*a*Cos[d + e*x] + 2*c*Sin[d + e*x])^(-1),x]

[Out]

(Log[Sin[(d + e*x)/2]] - Log[c*Cos[(d + e*x)/2] + a*Sin[(d + e*x)/2]])/(2*c*e)

________________________________________________________________________________________

Maple [A]  time = 0.1, size = 42, normalized size = 1.7 \begin{align*} -{\frac{1}{2\,ce}\ln \left ( c+a\tan \left ({\frac{d}{2}}+{\frac{ex}{2}} \right ) \right ) }+{\frac{1}{2\,ce}\ln \left ( \tan \left ({\frac{d}{2}}+{\frac{ex}{2}} \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(2*a-2*a*cos(e*x+d)+2*c*sin(e*x+d)),x)

[Out]

-1/2/e/c*ln(c+a*tan(1/2*d+1/2*e*x))+1/2/e/c*ln(tan(1/2*d+1/2*e*x))

________________________________________________________________________________________

Maxima [B]  time = 0.986877, size = 73, normalized size = 2.92 \begin{align*} -\frac{\frac{\log \left (c + \frac{a \sin \left (e x + d\right )}{\cos \left (e x + d\right ) + 1}\right )}{c} - \frac{\log \left (\frac{\sin \left (e x + d\right )}{\cos \left (e x + d\right ) + 1}\right )}{c}}{2 \, e} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(2*a-2*a*cos(e*x+d)+2*c*sin(e*x+d)),x, algorithm="maxima")

[Out]

-1/2*(log(c + a*sin(e*x + d)/(cos(e*x + d) + 1))/c - log(sin(e*x + d)/(cos(e*x + d) + 1))/c)/e

________________________________________________________________________________________

Fricas [B]  time = 2.13042, size = 159, normalized size = 6.36 \begin{align*} -\frac{\log \left (a c \sin \left (e x + d\right ) + \frac{1}{2} \, a^{2} + \frac{1}{2} \, c^{2} - \frac{1}{2} \,{\left (a^{2} - c^{2}\right )} \cos \left (e x + d\right )\right ) - \log \left (-\frac{1}{2} \, \cos \left (e x + d\right ) + \frac{1}{2}\right )}{4 \, c e} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(2*a-2*a*cos(e*x+d)+2*c*sin(e*x+d)),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 1.46485, size = 95, normalized size = 3.8 \begin{align*} \begin{cases} \frac{\tilde{\infty } x}{\sin{\left (d \right )}} & \text{for}\: a = 0 \wedge c = 0 \wedge e = 0 \\- \frac{1}{2 a e \tan{\left (\frac{d}{2} + \frac{e x}{2} \right )}} & \text{for}\: c = 0 \\\frac{\log{\left (\tan{\left (\frac{d}{2} + \frac{e x}{2} \right )} \right )}}{2 c e} & \text{for}\: a = 0 \\\frac{x}{- 2 a \cos{\left (d \right )} + 2 a + 2 c \sin{\left (d \right )}} & \text{for}\: e = 0 \\- \frac{\log{\left (\tan{\left (\frac{d}{2} + \frac{e x}{2} \right )} + \frac{c}{a} \right )}}{2 c e} + \frac{\log{\left (\tan{\left (\frac{d}{2} + \frac{e x}{2} \right )} \right )}}{2 c e} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(2*a-2*a*cos(e*x+d)+2*c*sin(e*x+d)),x)

[Out]

Piecewise((zoo*x/sin(d), Eq(a, 0) & Eq(c, 0) & Eq(e, 0)), (-1/(2*a*e*tan(d/2 + e*x/2)), Eq(c, 0)), (log(tan(d/
2 + e*x/2))/(2*c*e), Eq(a, 0)), (x/(-2*a*cos(d) + 2*a + 2*c*sin(d)), Eq(e, 0)), (-log(tan(d/2 + e*x/2) + c/a)/
(2*c*e) + log(tan(d/2 + e*x/2))/(2*c*e), True))

________________________________________________________________________________________

Giac [A]  time = 1.14731, size = 57, normalized size = 2.28 \begin{align*} -\frac{1}{2} \,{\left (\frac{\log \left ({\left | a \tan \left (\frac{1}{2} \, x e + \frac{1}{2} \, d\right ) + c \right |}\right )}{c} - \frac{\log \left ({\left | \tan \left (\frac{1}{2} \, x e + \frac{1}{2} \, d\right ) \right |}\right )}{c}\right )} e^{\left (-1\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(2*a-2*a*cos(e*x+d)+2*c*sin(e*x+d)),x, algorithm="giac")

[Out]

-1/2*(log(abs(a*tan(1/2*x*e + 1/2*d) + c))/c - log(abs(tan(1/2*x*e + 1/2*d)))/c)*e^(-1)