### 3.221 $$\int \frac{1}{-4 \cos (x)+3 \sin (x)} \, dx$$

Optimal. Leaf size=18 $-\frac{1}{5} \tanh ^{-1}\left (\frac{1}{5} (4 \sin (x)+3 \cos (x))\right )$

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0120571, antiderivative size = 18, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 11, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.182, Rules used = {3074, 206} $-\frac{1}{5} \tanh ^{-1}\left (\frac{1}{5} (4 \sin (x)+3 \cos (x))\right )$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

Rule 3074

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

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
/; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{1}{-4 \cos (x)+3 \sin (x)} \, dx &=-\operatorname{Subst}\left (\int \frac{1}{25-x^2} \, dx,x,3 \cos (x)+4 \sin (x)\right )\\ &=-\frac{1}{5} \tanh ^{-1}\left (\frac{1}{5} (3 \cos (x)+4 \sin (x))\right )\\ \end{align*}

Mathematica [B]  time = 0.0166594, size = 41, normalized size = 2.28 $\frac{1}{5} \log \left (\cos \left (\frac{x}{2}\right )-2 \sin \left (\frac{x}{2}\right )\right )-\frac{1}{5} \log \left (\sin \left (\frac{x}{2}\right )+2 \cos \left (\frac{x}{2}\right )\right )$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

Log[Cos[x/2] - 2*Sin[x/2]]/5 - Log[2*Cos[x/2] + Sin[x/2]]/5

________________________________________________________________________________________

Maple [A]  time = 0.031, size = 22, normalized size = 1.2 \begin{align*} -{\frac{1}{5}\ln \left ( \tan \left ({\frac{x}{2}} \right ) +2 \right ) }+{\frac{1}{5}\ln \left ( 2\,\tan \left ( x/2 \right ) -1 \right ) } \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [B]  time = 0.936192, size = 41, normalized size = 2.28 \begin{align*} \frac{1}{5} \, \log \left (\frac{2 \, \sin \left (x\right )}{\cos \left (x\right ) + 1} - 1\right ) - \frac{1}{5} \, \log \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1} + 2\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [B]  time = 1.92764, size = 109, normalized size = 6.06 \begin{align*} -\frac{1}{10} \, \log \left (\frac{3}{2} \, \cos \left (x\right ) + 2 \, \sin \left (x\right ) + \frac{5}{2}\right ) + \frac{1}{10} \, \log \left (-\frac{3}{2} \, \cos \left (x\right ) - 2 \, \sin \left (x\right ) + \frac{5}{2}\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.250552, size = 20, normalized size = 1.11 \begin{align*} \frac{\log{\left (\tan{\left (\frac{x}{2} \right )} - \frac{1}{2} \right )}}{5} - \frac{\log{\left (\tan{\left (\frac{x}{2} \right )} + 2 \right )}}{5} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.07951, size = 31, normalized size = 1.72 \begin{align*} \frac{1}{5} \, \log \left ({\left | 2 \, \tan \left (\frac{1}{2} \, x\right ) - 1 \right |}\right ) - \frac{1}{5} \, \log \left ({\left | \tan \left (\frac{1}{2} \, x\right ) + 2 \right |}\right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/5*log(abs(2*tan(1/2*x) - 1)) - 1/5*log(abs(tan(1/2*x) + 2))