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

Optimal. Leaf size=33 \[ \frac{\log \left (a+b \tan \left (\frac{d}{2}+\frac{e x}{2}+\frac{\pi }{4}\right )\right )}{2 b e} \]

[Out]

Log[a + b*Tan[d/2 + Pi/4 + (e*x)/2]]/(2*b*e)

________________________________________________________________________________________

Rubi [A]  time = 0.0217288, antiderivative size = 33, 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 = {3122, 31} \[ \frac{\log \left (a+b \tan \left (\frac{d}{2}+\frac{e x}{2}+\frac{\pi }{4}\right )\right )}{2 b e} \]

Antiderivative was successfully verified.

[In]

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

[Out]

Log[a + b*Tan[d/2 + Pi/4 + (e*x)/2]]/(2*b*e)

Rule 3122

Int[(cos[(d_.) + (e_.)*(x_)]*(b_.) + (a_) + (c_.)*sin[(d_.) + (e_.)*(x_)])^(-1), x_Symbol] :> Module[{f = Free
Factors[Tan[(d + e*x)/2 + Pi/4], x]}, Dist[f/e, Subst[Int[1/(a + b*f*x), x], x, Tan[(d + e*x)/2 + Pi/4]/f], x]
] /; FreeQ[{a, b, c, d, e}, x] && EqQ[a + c, 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 b \cos (d+e x)-2 a \sin (d+e x)} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{1}{2 a+2 b x} \, dx,x,\tan \left (\frac{\pi }{4}+\frac{1}{2} (d+e x)\right )\right )}{e}\\ &=\frac{\log \left (a+b \tan \left (\frac{d}{2}+\frac{\pi }{4}+\frac{e x}{2}\right )\right )}{2 b e}\\ \end{align*}

Mathematica [B]  time = 0.101587, size = 96, normalized size = 2.91 \[ \frac{\log \left (-a \sin \left (\frac{1}{2} (d+e x)\right )+a \cos \left (\frac{1}{2} (d+e x)\right )+b \sin \left (\frac{1}{2} (d+e x)\right )+b \cos \left (\frac{1}{2} (d+e x)\right )\right )}{2 b e}-\frac{\log \left (\cos \left (\frac{1}{2} (d+e x)\right )-\sin \left (\frac{1}{2} (d+e x)\right )\right )}{2 b e} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [B]  time = 0.1, size = 61, normalized size = 1.9 \begin{align*} -{\frac{1}{2\,be}\ln \left ( \tan \left ({\frac{d}{2}}+{\frac{ex}{2}} \right ) -1 \right ) }+{\frac{1}{2\,be}\ln \left ( a\tan \left ({\frac{d}{2}}+{\frac{ex}{2}} \right ) -b\tan \left ({\frac{d}{2}}+{\frac{ex}{2}} \right ) -a-b \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [B]  time = 1.19495, size = 101, normalized size = 3.06 \begin{align*} \frac{1}{2} \,{\left (\frac{{\left (a - b\right )} \log \left ({\left | a \tan \left (\frac{1}{2} \, x e + \frac{1}{2} \, d\right ) - b \tan \left (\frac{1}{2} \, x e + \frac{1}{2} \, d\right ) - a - b \right |}\right )}{a b - b^{2}} - \frac{\log \left ({\left | \tan \left (\frac{1}{2} \, x e + \frac{1}{2} \, d\right ) - 1 \right |}\right )}{b}\right )} e^{\left (-1\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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