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

Optimal. Leaf size=116 \[ \frac{A b \sin (x)-A c \cos (x)+b C}{2 \left (b^2+c^2\right ) (b \cos (x)+c \sin (x))^2}-\frac{A \tanh ^{-1}\left (\frac{c \cos (x)-b \sin (x)}{\sqrt{b^2+c^2}}\right )}{2 \left (b^2+c^2\right )^{3/2}}-\frac{c^2 C \cos (x)-b c C \sin (x)}{\left (b^2+c^2\right )^2 (b \cos (x)+c \sin (x))} \]

[Out]

-(A*ArcTanh[(c*Cos[x] - b*Sin[x])/Sqrt[b^2 + c^2]])/(2*(b^2 + c^2)^(3/2)) + (b*C - A*c*Cos[x] + A*b*Sin[x])/(2
*(b^2 + c^2)*(b*Cos[x] + c*Sin[x])^2) - (c^2*C*Cos[x] - b*c*C*Sin[x])/((b^2 + c^2)^2*(b*Cos[x] + c*Sin[x]))

________________________________________________________________________________________

Rubi [A]  time = 0.110397, antiderivative size = 116, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222, Rules used = {3157, 3153, 3074, 206} \[ \frac{A b \sin (x)-A c \cos (x)+b C}{2 \left (b^2+c^2\right ) (b \cos (x)+c \sin (x))^2}-\frac{A \tanh ^{-1}\left (\frac{c \cos (x)-b \sin (x)}{\sqrt{b^2+c^2}}\right )}{2 \left (b^2+c^2\right )^{3/2}}-\frac{c^2 C \cos (x)-b c C \sin (x)}{\left (b^2+c^2\right )^2 (b \cos (x)+c \sin (x))} \]

Antiderivative was successfully verified.

[In]

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

[Out]

-(A*ArcTanh[(c*Cos[x] - b*Sin[x])/Sqrt[b^2 + c^2]])/(2*(b^2 + c^2)^(3/2)) + (b*C - A*c*Cos[x] + A*b*Sin[x])/(2
*(b^2 + c^2)*(b*Cos[x] + c*Sin[x])^2) - (c^2*C*Cos[x] - b*c*C*Sin[x])/((b^2 + c^2)^2*(b*Cos[x] + c*Sin[x]))

Rule 3157

Int[((a_.) + cos[(d_.) + (e_.)*(x_)]*(b_.) + (c_.)*sin[(d_.) + (e_.)*(x_)])^(n_)*((A_.) + (C_.)*sin[(d_.) + (e
_.)*(x_)]), x_Symbol] :> Simp[((b*C + (a*C - c*A)*Cos[d + e*x] + 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 - c*C) - (n + 2)*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, C}, x] && LtQ[n, -1] && NeQ[a^2 - b^2 - c^2, 0] && NeQ[n, -2]

Rule 3153

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

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{A+C \sin (x)}{(b \cos (x)+c \sin (x))^3} \, dx &=\frac{b C-A c \cos (x)+A b \sin (x)}{2 \left (b^2+c^2\right ) (b \cos (x)+c \sin (x))^2}+\frac{\int \frac{2 c C+A b \cos (x)+A c \sin (x)}{(b \cos (x)+c \sin (x))^2} \, dx}{2 \left (b^2+c^2\right )}\\ &=\frac{b C-A c \cos (x)+A b \sin (x)}{2 \left (b^2+c^2\right ) (b \cos (x)+c \sin (x))^2}-\frac{c^2 C \cos (x)-b c C \sin (x)}{\left (b^2+c^2\right )^2 (b \cos (x)+c \sin (x))}+\frac{A \int \frac{1}{b \cos (x)+c \sin (x)} \, dx}{2 \left (b^2+c^2\right )}\\ &=\frac{b C-A c \cos (x)+A b \sin (x)}{2 \left (b^2+c^2\right ) (b \cos (x)+c \sin (x))^2}-\frac{c^2 C \cos (x)-b c C \sin (x)}{\left (b^2+c^2\right )^2 (b \cos (x)+c \sin (x))}-\frac{A \operatorname{Subst}\left (\int \frac{1}{b^2+c^2-x^2} \, dx,x,c \cos (x)-b \sin (x)\right )}{2 \left (b^2+c^2\right )}\\ &=-\frac{A \tanh ^{-1}\left (\frac{c \cos (x)-b \sin (x)}{\sqrt{b^2+c^2}}\right )}{2 \left (b^2+c^2\right )^{3/2}}+\frac{b C-A c \cos (x)+A b \sin (x)}{2 \left (b^2+c^2\right ) (b \cos (x)+c \sin (x))^2}-\frac{c^2 C \cos (x)-b c C \sin (x)}{\left (b^2+c^2\right )^2 (b \cos (x)+c \sin (x))}\\ \end{align*}

Mathematica [C]  time = 0.363374, size = 132, normalized size = 1.14 \[ \frac{\left (b^2+c^2\right ) \left (A b^2 \sin (x)-A b c \cos (x)+b C (b+c \sin (2 x))+2 c^2 C \sin ^2(x)\right )+2 A b \sqrt{b^2+c^2} (b \cos (x)+c \sin (x))^2 \tanh ^{-1}\left (\frac{b \tan \left (\frac{x}{2}\right )-c}{\sqrt{b^2+c^2}}\right )}{2 b (b-i c)^2 (b+i c)^2 (b \cos (x)+c \sin (x))^2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(2*A*b*Sqrt[b^2 + c^2]*ArcTanh[(-c + b*Tan[x/2])/Sqrt[b^2 + c^2]]*(b*Cos[x] + c*Sin[x])^2 + (b^2 + c^2)*(-(A*b
*c*Cos[x]) + A*b^2*Sin[x] + 2*c^2*C*Sin[x]^2 + b*C*(b + c*Sin[2*x])))/(2*b*(b - I*c)^2*(b + I*c)^2*(b*Cos[x] +
 c*Sin[x])^2)

________________________________________________________________________________________

Maple [A]  time = 0.104, size = 177, normalized size = 1.5 \begin{align*} -2\,{\frac{1}{ \left ( b \left ( \tan \left ( x/2 \right ) \right ) ^{2}-2\,c\tan \left ( x/2 \right ) -b \right ) ^{2}} \left ( -1/2\,{\frac{A \left ({b}^{2}+2\,{c}^{2} \right ) \left ( \tan \left ( x/2 \right ) \right ) ^{3}}{ \left ({b}^{2}+{c}^{2} \right ) b}}-1/2\,{\frac{ \left ( A{b}^{2}c-2\,A{c}^{3}+2\,C{b}^{3}+2\,Cb{c}^{2} \right ) \left ( \tan \left ( x/2 \right ) \right ) ^{2}}{ \left ({b}^{2}+{c}^{2} \right ){b}^{2}}}-1/2\,{\frac{A \left ({b}^{2}-2\,{c}^{2} \right ) \tan \left ( x/2 \right ) }{ \left ({b}^{2}+{c}^{2} \right ) b}}+1/2\,{\frac{Ac}{{b}^{2}+{c}^{2}}} \right ) }+{A{\it Artanh} \left ({\frac{1}{2} \left ( 2\,b\tan \left ( x/2 \right ) -2\,c \right ){\frac{1}{\sqrt{{b}^{2}+{c}^{2}}}}} \right ) \left ({b}^{2}+{c}^{2} \right ) ^{-{\frac{3}{2}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2*(-1/2*A*(b^2+2*c^2)/(b^2+c^2)/b*tan(1/2*x)^3-1/2*(A*b^2*c-2*A*c^3+2*C*b^3+2*C*b*c^2)/(b^2+c^2)/b^2*tan(1/2*
x)^2-1/2*A*(b^2-2*c^2)/(b^2+c^2)/b*tan(1/2*x)+1/2*A*c/(b^2+c^2))/(b*tan(1/2*x)^2-2*c*tan(1/2*x)-b)^2+A/(b^2+c^
2)^(3/2)*arctanh(1/2*(2*b*tan(1/2*x)-2*c)/(b^2+c^2)^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 2.49414, size = 659, normalized size = 5.68 \begin{align*} -\frac{8 \, C b c^{2} \cos \left (x\right )^{2} - 2 \, C b^{3} - 6 \, C b c^{2} -{\left (2 \, A b c \cos \left (x\right ) \sin \left (x\right ) + A c^{2} +{\left (A b^{2} - A c^{2}\right )} \cos \left (x\right )^{2}\right )} \sqrt{b^{2} + c^{2}} \log \left (-\frac{2 \, b c \cos \left (x\right ) \sin \left (x\right ) +{\left (b^{2} - c^{2}\right )} \cos \left (x\right )^{2} - 2 \, b^{2} - c^{2} + 2 \, \sqrt{b^{2} + c^{2}}{\left (c \cos \left (x\right ) - b \sin \left (x\right )\right )}}{2 \, b c \cos \left (x\right ) \sin \left (x\right ) +{\left (b^{2} - c^{2}\right )} \cos \left (x\right )^{2} + c^{2}}\right ) + 2 \,{\left (A b^{2} c + A c^{3}\right )} \cos \left (x\right ) - 2 \,{\left (A b^{3} + A b c^{2} + 2 \,{\left (C b^{2} c - C c^{3}\right )} \cos \left (x\right )\right )} \sin \left (x\right )}{4 \,{\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((A+C*sin(x))/(b*cos(x)+c*sin(x))^3,x, algorithm="fricas")

[Out]

-1/4*(8*C*b*c^2*cos(x)^2 - 2*C*b^3 - 6*C*b*c^2 - (2*A*b*c*cos(x)*sin(x) + A*c^2 + (A*b^2 - A*c^2)*cos(x)^2)*sq
rt(b^2 + c^2)*log(-(2*b*c*cos(x)*sin(x) + (b^2 - c^2)*cos(x)^2 - 2*b^2 - c^2 + 2*sqrt(b^2 + c^2)*(c*cos(x) - b
*sin(x)))/(2*b*c*cos(x)*sin(x) + (b^2 - c^2)*cos(x)^2 + c^2)) + 2*(A*b^2*c + A*c^3)*cos(x) - 2*(A*b^3 + A*b*c^
2 + 2*(C*b^2*c - 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((A+C*sin(x))/(b*cos(x)+c*sin(x))**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.31973, size = 269, normalized size = 2.32 \begin{align*} \frac{A \log \left (\frac{{\left | -2 \, b \tan \left (\frac{1}{2} \, x\right ) + 2 \, c - 2 \, \sqrt{b^{2} + c^{2}} \right |}}{{\left | -2 \, b \tan \left (\frac{1}{2} \, x\right ) + 2 \, c + 2 \, \sqrt{b^{2} + c^{2}} \right |}}\right )}{2 \,{\left (b^{2} + c^{2}\right )}^{\frac{3}{2}}} + \frac{A b^{3} \tan \left (\frac{1}{2} \, x\right )^{3} + 2 \, A b c^{2} \tan \left (\frac{1}{2} \, x\right )^{3} + 2 \, C b^{3} \tan \left (\frac{1}{2} \, x\right )^{2} + A b^{2} c \tan \left (\frac{1}{2} \, x\right )^{2} + 2 \, C b c^{2} \tan \left (\frac{1}{2} \, x\right )^{2} - 2 \, A c^{3} \tan \left (\frac{1}{2} \, x\right )^{2} + A b^{3} \tan \left (\frac{1}{2} \, x\right ) - 2 \, A b c^{2} \tan \left (\frac{1}{2} \, x\right ) - A b^{2} c}{{\left (b^{4} + b^{2} c^{2}\right )}{\left (b \tan \left (\frac{1}{2} \, x\right )^{2} - 2 \, c \tan \left (\frac{1}{2} \, x\right ) - b\right )}^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*A*log(abs(-2*b*tan(1/2*x) + 2*c - 2*sqrt(b^2 + c^2))/abs(-2*b*tan(1/2*x) + 2*c + 2*sqrt(b^2 + c^2)))/(b^2
+ c^2)^(3/2) + (A*b^3*tan(1/2*x)^3 + 2*A*b*c^2*tan(1/2*x)^3 + 2*C*b^3*tan(1/2*x)^2 + A*b^2*c*tan(1/2*x)^2 + 2*
C*b*c^2*tan(1/2*x)^2 - 2*A*c^3*tan(1/2*x)^2 + A*b^3*tan(1/2*x) - 2*A*b*c^2*tan(1/2*x) - A*b^2*c)/((b^4 + b^2*c
^2)*(b*tan(1/2*x)^2 - 2*c*tan(1/2*x) - b)^2)