3.146 \(\int \frac {1}{(b \cos (x)+a \sin (x))^2} \, dx\)

Optimal. Leaf size=17 \[ \frac {\sin (x)}{b (a \sin (x)+b \cos (x))} \]

[Out]

sin(x)/b/(b*cos(x)+a*sin(x))

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 17, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {3075} \[ \frac {\sin (x)}{b (a \sin (x)+b \cos (x))} \]

Antiderivative was successfully verified.

[In]

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

[Out]

Sin[x]/(b*(b*Cos[x] + a*Sin[x]))

Rule 3075

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

Rubi steps

\begin {align*} \int \frac {1}{(b \cos (x)+a \sin (x))^2} \, dx &=\frac {\sin (x)}{b (b \cos (x)+a \sin (x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 17, normalized size = 1.00 \[ \frac {\sin (x)}{b (a \sin (x)+b \cos (x))} \]

Antiderivative was successfully verified.

[In]

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

[Out]

Sin[x]/(b*(b*Cos[x] + a*Sin[x]))

________________________________________________________________________________________

fricas [B]  time = 0.41, size = 39, normalized size = 2.29 \[ -\frac {a \cos \relax (x) - b \sin \relax (x)}{{\left (a^{2} b + b^{3}\right )} \cos \relax (x) + {\left (a^{3} + a b^{2}\right )} \sin \relax (x)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(a*cos(x) - b*sin(x))/((a^2*b + b^3)*cos(x) + (a^3 + a*b^2)*sin(x))

________________________________________________________________________________________

giac [A]  time = 0.02, size = 13, normalized size = 0.76 \[ -\frac {1}{{\left (a \tan \relax (x) + b\right )} a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/((a*tan(x) + b)*a)

________________________________________________________________________________________

maple [A]  time = 0.15, size = 14, normalized size = 0.82 \[ -\frac {1}{\left (a \tan \relax (x )+b \right ) a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(b*cos(x)+a*sin(x))^2,x)

[Out]

-1/a/(a*tan(x)+b)

________________________________________________________________________________________

maxima [A]  time = 0.57, size = 14, normalized size = 0.82 \[ -\frac {1}{a^{2} \tan \relax (x) + a b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/(a^2*tan(x) + a*b)

________________________________________________________________________________________

mupad [B]  time = 0.63, size = 29, normalized size = 1.71 \[ \frac {2\,\mathrm {tan}\left (\frac {x}{2}\right )}{b\,\left (-b\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2+2\,a\,\mathrm {tan}\left (\frac {x}{2}\right )+b\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(b*cos(x) + a*sin(x))^2,x)

[Out]

(2*tan(x/2))/(b*(b + 2*a*tan(x/2) - b*tan(x/2)^2))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{\left (a \sin {\relax (x )} + b \cos {\relax (x )}\right )^{2}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral((a*sin(x) + b*cos(x))**(-2), x)

________________________________________________________________________________________