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]
________________________________________________________________________________________
Rubi [A] time = 0.11, antiderivative size = 116, normalized size of antiderivative = 1.00, 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]
[Out]
Rule 206
Rule 3074
Rule 3153
Rule 3157
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.39, 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]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.92, size = 279, normalized size = 2.41 \[ -\frac {8 \, C b c^{2} \cos \relax (x)^{2} - 2 \, C b^{3} - 6 \, C b c^{2} - {\left (2 \, A b c \cos \relax (x) \sin \relax (x) + A c^{2} + {\left (A b^{2} - A c^{2}\right )} \cos \relax (x)^{2}\right )} \sqrt {b^{2} + c^{2}} \log \left (-\frac {2 \, b c \cos \relax (x) \sin \relax (x) + {\left (b^{2} - c^{2}\right )} \cos \relax (x)^{2} - 2 \, b^{2} - c^{2} + 2 \, \sqrt {b^{2} + c^{2}} {\left (c \cos \relax (x) - b \sin \relax (x)\right )}}{2 \, b c \cos \relax (x) \sin \relax (x) + {\left (b^{2} - c^{2}\right )} \cos \relax (x)^{2} + c^{2}}\right ) + 2 \, {\left (A b^{2} c + A c^{3}\right )} \cos \relax (x) - 2 \, {\left (A b^{3} + A b c^{2} + 2 \, {\left (C b^{2} c - C c^{3}\right )} \cos \relax (x)\right )} \sin \relax (x)}{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 \relax (x)^{2} + 2 \, {\left (b^{5} c + 2 \, b^{3} c^{3} + b c^{5}\right )} \cos \relax (x) \sin \relax (x)\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.24, size = 199, normalized size = 1.72 \[ \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}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.19, size = 177, normalized size = 1.53 \[ -\frac {2 \left (-\frac {A \left (b^{2}+2 c^{2}\right ) \left (\tan ^{3}\left (\frac {x}{2}\right )\right )}{2 \left (b^{2}+c^{2}\right ) b}-\frac {\left (A \,b^{2} c -2 A \,c^{3}+2 C \,b^{3}+2 C b \,c^{2}\right ) \left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{2 \left (b^{2}+c^{2}\right ) b^{2}}-\frac {A \left (b^{2}-2 c^{2}\right ) \tan \left (\frac {x}{2}\right )}{2 \left (b^{2}+c^{2}\right ) b}+\frac {A c}{2 b^{2}+2 c^{2}}\right )}{\left (b \left (\tan ^{2}\left (\frac {x}{2}\right )\right )-2 c \tan \left (\frac {x}{2}\right )-b \right )^{2}}+\frac {A \arctanh \left (\frac {2 b \tan \left (\frac {x}{2}\right )-2 c}{2 \sqrt {b^{2}+c^{2}}}\right )}{\left (b^{2}+c^{2}\right )^{\frac {3}{2}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.44, size = 338, normalized size = 2.91 \[ -\frac {1}{2} \, A {\left (\frac {2 \, {\left (b^{2} c - \frac {{\left (b^{3} - 2 \, b c^{2}\right )} \sin \relax (x)}{\cos \relax (x) + 1} - \frac {{\left (b^{2} c - 2 \, c^{3}\right )} \sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} - \frac {{\left (b^{3} + 2 \, b c^{2}\right )} \sin \relax (x)^{3}}{{\left (\cos \relax (x) + 1\right )}^{3}}\right )}}{b^{6} + b^{4} c^{2} + \frac {4 \, {\left (b^{5} c + b^{3} c^{3}\right )} \sin \relax (x)}{\cos \relax (x) + 1} - \frac {2 \, {\left (b^{6} - b^{4} c^{2} - 2 \, b^{2} c^{4}\right )} \sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} - \frac {4 \, {\left (b^{5} c + b^{3} c^{3}\right )} \sin \relax (x)^{3}}{{\left (\cos \relax (x) + 1\right )}^{3}} + \frac {{\left (b^{6} + b^{4} c^{2}\right )} \sin \relax (x)^{4}}{{\left (\cos \relax (x) + 1\right )}^{4}}} + \frac {\log \left (\frac {c - \frac {b \sin \relax (x)}{\cos \relax (x) + 1} + \sqrt {b^{2} + c^{2}}}{c - \frac {b \sin \relax (x)}{\cos \relax (x) + 1} - \sqrt {b^{2} + c^{2}}}\right )}{{\left (b^{2} + c^{2}\right )}^{\frac {3}{2}}}\right )} + \frac {2 \, C \sin \relax (x)^{2}}{{\left (b^{3} + \frac {4 \, b^{2} c \sin \relax (x)}{\cos \relax (x) + 1} - \frac {4 \, b^{2} c \sin \relax (x)^{3}}{{\left (\cos \relax (x) + 1\right )}^{3}} + \frac {b^{3} \sin \relax (x)^{4}}{{\left (\cos \relax (x) + 1\right )}^{4}} - \frac {2 \, {\left (b^{3} - 2 \, b c^{2}\right )} \sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}}\right )} {\left (\cos \relax (x) + 1\right )}^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.86, size = 227, normalized size = 1.96 \[ \frac {\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^3\,\left (A\,b^2+2\,A\,c^2\right )}{b\,\left (b^2+c^2\right )}-\frac {A\,c}{b^2+c^2}+\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^2\,\left (2\,C\,b^3+A\,b^2\,c+2\,C\,b\,c^2-2\,A\,c^3\right )}{b^2\,\left (b^2+c^2\right )}+\frac {\mathrm {tan}\left (\frac {x}{2}\right )\,\left (A\,b^2-2\,A\,c^2\right )}{b\,\left (b^2+c^2\right )}}{b^2-{\mathrm {tan}\left (\frac {x}{2}\right )}^2\,\left (2\,b^2-4\,c^2\right )+b^2\,{\mathrm {tan}\left (\frac {x}{2}\right )}^4+4\,b\,c\,\mathrm {tan}\left (\frac {x}{2}\right )-4\,b\,c\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3}+\frac {A\,\mathrm {atan}\left (\frac {b^2\,c\,1{}\mathrm {i}+c^3\,1{}\mathrm {i}-b\,\mathrm {tan}\left (\frac {x}{2}\right )\,\left (b^2+c^2\right )\,1{}\mathrm {i}}{{\left (b^2+c^2\right )}^{3/2}}\right )\,1{}\mathrm {i}}{{\left (b^2+c^2\right )}^{3/2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________