3.1.6 \(\int \frac {1}{5+3 \cos (x)+4 \sin (x)} \, dx\) [6]

Optimal. Leaf size=12 \[ -\frac {1}{2+\tan \left (\frac {x}{2}\right )} \]

[Out]

-1/(2+tan(1/2*x))

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 21, normalized size of antiderivative = 1.75, number of steps used = 1, number of rules used = 1, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {3193} \begin {gather*} -\frac {4-5 \sin (x)}{4 (4 \cos (x)-3 \sin (x))} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(5 + 3*Cos[x] + 4*Sin[x])^(-1),x]

[Out]

-1/4*(4 - 5*Sin[x])/(4*Cos[x] - 3*Sin[x])

Rule 3193

Int[(cos[(d_.) + (e_.)*(x_)]*(b_.) + (a_) + (c_.)*sin[(d_.) + (e_.)*(x_)])^(-1), x_Symbol] :> Simp[-(c - a*Sin
[d + e*x])/(c*e*(c*Cos[d + e*x] - b*Sin[d + e*x])), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[a^2 - b^2 - c^2, 0]

Rubi steps

\begin {align*} \int \frac {1}{5+3 \cos (x)+4 \sin (x)} \, dx &=-\frac {4-5 \sin (x)}{4 (4 \cos (x)-3 \sin (x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(26\) vs. \(2(12)=24\).
time = 0.02, size = 26, normalized size = 2.17 \begin {gather*} \frac {\sin \left (\frac {x}{2}\right )}{4 \cos \left (\frac {x}{2}\right )+2 \sin \left (\frac {x}{2}\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(5 + 3*Cos[x] + 4*Sin[x])^(-1),x]

[Out]

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

________________________________________________________________________________________

Mathics [A]
time = 1.74, size = 10, normalized size = 0.83 \begin {gather*} -\frac {1}{2+\text {Tan}\left [\frac {x}{2}\right ]} \end {gather*}

Antiderivative was successfully verified.

[In]

mathics('Integrate[1/(5 + 3*Cos[x] + 4*Sin[x]),x]')

[Out]

-1 / (2 + Tan[x / 2])

________________________________________________________________________________________

Maple [A]
time = 0.08, size = 11, normalized size = 0.92

method result size
default \(-\frac {1}{2+\tan \left (\frac {x}{2}\right )}\) \(11\)
norman \(-\frac {1}{2+\tan \left (\frac {x}{2}\right )}\) \(11\)
risch \(-\frac {8}{5 \left (5 \,{\mathrm e}^{i x}+3+4 i\right )}+\frac {6 i}{5 \left (5 \,{\mathrm e}^{i x}+3+4 i\right )}\) \(33\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(5+3*cos(x)+4*sin(x)),x,method=_RETURNVERBOSE)

[Out]

-1/(2+tan(1/2*x))

________________________________________________________________________________________

Maxima [A]
time = 0.25, size = 15, normalized size = 1.25 \begin {gather*} -\frac {1}{\frac {\sin \left (x\right )}{\cos \left (x\right ) + 1} + 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(5+3*cos(x)+4*sin(x)),x, algorithm="maxima")

[Out]

-1/(sin(x)/(cos(x) + 1) + 2)

________________________________________________________________________________________

Fricas [A]
time = 0.33, size = 20, normalized size = 1.67 \begin {gather*} -\frac {\cos \left (x\right ) - 2 \, \sin \left (x\right ) + 1}{5 \, {\left (2 \, \cos \left (x\right ) + \sin \left (x\right ) + 2\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(5+3*cos(x)+4*sin(x)),x, algorithm="fricas")

[Out]

-1/5*(cos(x) - 2*sin(x) + 1)/(2*cos(x) + sin(x) + 2)

________________________________________________________________________________________

Sympy [A]
time = 0.22, size = 8, normalized size = 0.67 \begin {gather*} - \frac {1}{\tan {\left (\frac {x}{2} \right )} + 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(5+3*cos(x)+4*sin(x)),x)

[Out]

-1/(tan(x/2) + 2)

________________________________________________________________________________________

Giac [A]
time = 0.00, size = 13, normalized size = 1.08 \begin {gather*} -\frac {2}{2 \left (\tan \left (\frac {x}{2}\right )+2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(5+3*cos(x)+4*sin(x)),x)

[Out]

-1/(tan(1/2*x) + 2)

________________________________________________________________________________________

Mupad [B]
time = 0.36, size = 10, normalized size = 0.83 \begin {gather*} -\frac {1}{\mathrm {tan}\left (\frac {x}{2}\right )+2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(3*cos(x) + 4*sin(x) + 5),x)

[Out]

-1/(tan(x/2) + 2)

________________________________________________________________________________________