3.384 \(\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 \cot \left (\frac{d}{2}+\frac{e x}{2}+\frac{\pi }{4}\right )\right )}{2 b e} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0217124, 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 = {3123, 31} \[ -\frac{\log \left (a+b \cot \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*Cot[d/2 + Pi/4 + (e*x)/2]]/(2*b*e)

Rule 3123

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

Mathematica [B]  time = 0.0701459, size = 93, normalized size = 2.82 \[ \frac{1}{2} \left (\frac{\log \left (\sin \left (\frac{1}{2} (d+e x)\right )+\cos \left (\frac{1}{2} (d+e x)\right )\right )}{b e}-\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 )}{b e}\right ) \]

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]]/(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]]/(b*e))/2

________________________________________________________________________________________

Maple [B]  time = 0.093, size = 104, normalized size = 3.2 \begin{align*}{\frac{1}{2\,be}\ln \left ( 1+\tan \left ({\frac{d}{2}}+{\frac{ex}{2}} \right ) \right ) }-{\frac{a}{2\,be \left ( a-b \right ) }\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 ) }+{\frac{1}{2\,e \left ( a-b \right ) }\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(1+tan(1/2*d+1/2*e*x))-1/2/e/b/(a-b)*ln(a*tan(1/2*d+1/2*e*x)-b*tan(1/2*d+1/2*e*x)+a+b)*a+1/2/e/(a-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.988727, size = 89, normalized size = 2.7 \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.11244, 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.5814, size = 107, normalized size = 3.24 \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.15237, size = 96, normalized size = 2.91 \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)