3.531 \(\int \frac{B \cos (x)+C \sin (x)}{(b \cos (x)+c \sin (x))^3} \, dx\)

Optimal. Leaf size=66 \[ \frac{\sin (x) (b B+c C)}{b \left (b^2+c^2\right ) (b \cos (x)+c \sin (x))}-\frac{B c-b C}{2 \left (b^2+c^2\right ) (b \cos (x)+c \sin (x))^2} \]

[Out]

-(B*c - b*C)/(2*(b^2 + c^2)*(b*Cos[x] + c*Sin[x])^2) + ((b*B + c*C)*Sin[x])/(b*(b^2 + c^2)*(b*Cos[x] + c*Sin[x
]))

________________________________________________________________________________________

Rubi [A]  time = 0.056569, antiderivative size = 66, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {3156, 12, 3075} \[ \frac{\sin (x) (b B+c C)}{b \left (b^2+c^2\right ) (b \cos (x)+c \sin (x))}-\frac{B c-b C}{2 \left (b^2+c^2\right ) (b \cos (x)+c \sin (x))^2} \]

Antiderivative was successfully verified.

[In]

Int[(B*Cos[x] + C*Sin[x])/(b*Cos[x] + c*Sin[x])^3,x]

[Out]

-(B*c - b*C)/(2*(b^2 + c^2)*(b*Cos[x] + c*Sin[x])^2) + ((b*B + c*C)*Sin[x])/(b*(b^2 + c^2)*(b*Cos[x] + c*Sin[x
]))

Rule 3156

Int[((a_.) + cos[(d_.) + (e_.)*(x_)]*(b_.) + (c_.)*sin[(d_.) + (e_.)*(x_)])^(n_)*((A_.) + cos[(d_.) + (e_.)*(x
_)]*(B_.) + (C_.)*sin[(d_.) + (e_.)*(x_)]), x_Symbol] :> -Simp[((c*B - b*C - (a*C - c*A)*Cos[d + e*x] + (a*B -
 b*A)*Sin[d + e*x])*(a + b*Cos[d + e*x] + c*Sin[d + e*x])^(n + 1))/(e*(n + 1)*(a^2 - b^2 - c^2)), x] + Dist[1/
((n + 1)*(a^2 - b^2 - c^2)), Int[(a + b*Cos[d + e*x] + c*Sin[d + e*x])^(n + 1)*Simp[(n + 1)*(a*A - b*B - c*C)
+ (n + 2)*(a*B - b*A)*Cos[d + e*x] + (n + 2)*(a*C - c*A)*Sin[d + e*x], x], x], x] /; FreeQ[{a, b, c, d, e, A,
B, C}, x] && LtQ[n, -1] && NeQ[a^2 - b^2 - c^2, 0] && NeQ[n, -2]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, 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{B \cos (x)+C \sin (x)}{(b \cos (x)+c \sin (x))^3} \, dx &=-\frac{B c-b C}{2 \left (b^2+c^2\right ) (b \cos (x)+c \sin (x))^2}+\frac{\int \frac{2 (b B+c C)}{(b \cos (x)+c \sin (x))^2} \, dx}{2 \left (b^2+c^2\right )}\\ &=-\frac{B c-b C}{2 \left (b^2+c^2\right ) (b \cos (x)+c \sin (x))^2}+\frac{(b B+c C) \int \frac{1}{(b \cos (x)+c \sin (x))^2} \, dx}{b^2+c^2}\\ &=-\frac{B c-b C}{2 \left (b^2+c^2\right ) (b \cos (x)+c \sin (x))^2}+\frac{(b B+c C) \sin (x)}{b \left (b^2+c^2\right ) (b \cos (x)+c \sin (x))}\\ \end{align*}

Mathematica [A]  time = 0.174264, size = 64, normalized size = 0.97 \[ \frac{C \left (b^2+c^2\right )+b \sin (2 x) (b B+c C)-c \cos (2 x) (b B+c C)}{2 b \left (b^2+c^2\right ) (b \cos (x)+c \sin (x))^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(B*Cos[x] + C*Sin[x])/(b*Cos[x] + c*Sin[x])^3,x]

[Out]

((b^2 + c^2)*C - c*(b*B + c*C)*Cos[2*x] + b*(b*B + c*C)*Sin[2*x])/(2*b*(b^2 + c^2)*(b*Cos[x] + c*Sin[x])^2)

________________________________________________________________________________________

Maple [A]  time = 0.098, size = 37, normalized size = 0.6 \begin{align*} -{\frac{C}{{c}^{2} \left ( c\tan \left ( x \right ) +b \right ) }}-{\frac{Bc-bC}{2\,{c}^{2} \left ( c\tan \left ( x \right ) +b \right ) ^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*cos(x)+C*sin(x))/(b*cos(x)+c*sin(x))^3,x)

[Out]

-C/c^2/(c*tan(x)+b)-1/2*(B*c-C*b)/c^2/(c*tan(x)+b)^2

________________________________________________________________________________________

Maxima [B]  time = 1.07834, size = 269, normalized size = 4.08 \begin{align*} \frac{2 \, B{\left (\frac{b \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac{c \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} - \frac{b \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}}\right )}}{b^{4} + \frac{4 \, b^{3} c \sin \left (x\right )}{\cos \left (x\right ) + 1} - \frac{4 \, b^{3} c \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}} + \frac{b^{4} \sin \left (x\right )^{4}}{{\left (\cos \left (x\right ) + 1\right )}^{4}} - \frac{2 \,{\left (b^{4} - 2 \, b^{2} c^{2}\right )} \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}}} + \frac{2 \, C \sin \left (x\right )^{2}}{{\left (b^{3} + \frac{4 \, b^{2} c \sin \left (x\right )}{\cos \left (x\right ) + 1} - \frac{4 \, b^{2} c \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}} + \frac{b^{3} \sin \left (x\right )^{4}}{{\left (\cos \left (x\right ) + 1\right )}^{4}} - \frac{2 \,{\left (b^{3} - 2 \, b c^{2}\right )} \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}}\right )}{\left (\cos \left (x\right ) + 1\right )}^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*cos(x)+C*sin(x))/(b*cos(x)+c*sin(x))^3,x, algorithm="maxima")

[Out]

2*B*(b*sin(x)/(cos(x) + 1) + c*sin(x)^2/(cos(x) + 1)^2 - b*sin(x)^3/(cos(x) + 1)^3)/(b^4 + 4*b^3*c*sin(x)/(cos
(x) + 1) - 4*b^3*c*sin(x)^3/(cos(x) + 1)^3 + b^4*sin(x)^4/(cos(x) + 1)^4 - 2*(b^4 - 2*b^2*c^2)*sin(x)^2/(cos(x
) + 1)^2) + 2*C*sin(x)^2/((b^3 + 4*b^2*c*sin(x)/(cos(x) + 1) - 4*b^2*c*sin(x)^3/(cos(x) + 1)^3 + b^3*sin(x)^4/
(cos(x) + 1)^4 - 2*(b^3 - 2*b*c^2)*sin(x)^2/(cos(x) + 1)^2)*(cos(x) + 1)^2)

________________________________________________________________________________________

Fricas [B]  time = 1.89731, size = 333, normalized size = 5.05 \begin{align*} \frac{C b^{3} + B b^{2} c + 3 \, C b c^{2} - B c^{3} - 4 \,{\left (B b^{2} c + C b c^{2}\right )} \cos \left (x\right )^{2} + 2 \,{\left (B b^{3} + C b^{2} c - B b c^{2} - C c^{3}\right )} \cos \left (x\right ) \sin \left (x\right )}{2 \,{\left (b^{4} c^{2} + 2 \, b^{2} c^{4} + c^{6} +{\left (b^{6} + b^{4} c^{2} - b^{2} c^{4} - c^{6}\right )} \cos \left (x\right )^{2} + 2 \,{\left (b^{5} c + 2 \, b^{3} c^{3} + b c^{5}\right )} \cos \left (x\right ) \sin \left (x\right )\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*cos(x)+C*sin(x))/(b*cos(x)+c*sin(x))^3,x, algorithm="fricas")

[Out]

1/2*(C*b^3 + B*b^2*c + 3*C*b*c^2 - B*c^3 - 4*(B*b^2*c + C*b*c^2)*cos(x)^2 + 2*(B*b^3 + C*b^2*c - B*b*c^2 - C*c
^3)*cos(x)*sin(x))/(b^4*c^2 + 2*b^2*c^4 + c^6 + (b^6 + b^4*c^2 - b^2*c^4 - c^6)*cos(x)^2 + 2*(b^5*c + 2*b^3*c^
3 + b*c^5)*cos(x)*sin(x))

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*cos(x)+C*sin(x))/(b*cos(x)+c*sin(x))**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.2102, size = 35, normalized size = 0.53 \begin{align*} -\frac{2 \, C c \tan \left (x\right ) + C b + B c}{2 \,{\left (c \tan \left (x\right ) + b\right )}^{2} c^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*cos(x)+C*sin(x))/(b*cos(x)+c*sin(x))^3,x, algorithm="giac")

[Out]

-1/2*(2*C*c*tan(x) + C*b + B*c)/((c*tan(x) + b)^2*c^2)