Optimal. Leaf size=74 \[ -\frac {B c-b C}{\left (b^2+c^2\right ) (b \cos (x)+c \sin (x))}-\frac {(b B+c C) \tanh ^{-1}\left (\frac {c \cos (x)-b \sin (x)}{\sqrt {b^2+c^2}}\right )}{\left (b^2+c^2\right )^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 74, normalized size of antiderivative = 1.00, 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 = {3153, 3074, 206} \[ -\frac {B c-b C}{\left (b^2+c^2\right ) (b \cos (x)+c \sin (x))}-\frac {(b B+c C) \tanh ^{-1}\left (\frac {c \cos (x)-b \sin (x)}{\sqrt {b^2+c^2}}\right )}{\left (b^2+c^2\right )^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 3074
Rule 3153
Rubi steps
\begin {align*} \int \frac {B \cos (x)+C \sin (x)}{(b \cos (x)+c \sin (x))^2} \, dx &=-\frac {B c-b C}{\left (b^2+c^2\right ) (b \cos (x)+c \sin (x))}+\frac {(b B+c C) \int \frac {1}{b \cos (x)+c \sin (x)} \, dx}{b^2+c^2}\\ &=-\frac {B c-b C}{\left (b^2+c^2\right ) (b \cos (x)+c \sin (x))}-\frac {(b B+c C) \operatorname {Subst}\left (\int \frac {1}{b^2+c^2-x^2} \, dx,x,c \cos (x)-b \sin (x)\right )}{b^2+c^2}\\ &=-\frac {(b B+c C) \tanh ^{-1}\left (\frac {c \cos (x)-b \sin (x)}{\sqrt {b^2+c^2}}\right )}{\left (b^2+c^2\right )^{3/2}}-\frac {B c-b C}{\left (b^2+c^2\right ) (b \cos (x)+c \sin (x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.24, size = 75, normalized size = 1.01 \[ \frac {b C-B c}{\left (b^2+c^2\right ) (b \cos (x)+c \sin (x))}+\frac {2 (b B+c C) \tanh ^{-1}\left (\frac {b \tan \left (\frac {x}{2}\right )-c}{\sqrt {b^2+c^2}}\right )}{\left (b^2+c^2\right )^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 1.63, size = 194, normalized size = 2.62 \[ \frac {2 \, C b^{3} - 2 \, B b^{2} c + 2 \, C b c^{2} - 2 \, B c^{3} + \sqrt {b^{2} + c^{2}} {\left ({\left (B b^{2} + C b c\right )} \cos \relax (x) + {\left (B b c + C c^{2}\right )} \sin \relax (x)\right )} \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 ({\left (b^{5} + 2 \, b^{3} c^{2} + b c^{4}\right )} \cos \relax (x) + {\left (b^{4} c + 2 \, b^{2} c^{3} + c^{5}\right )} \sin \relax (x)\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.24, size = 132, normalized size = 1.78 \[ -\frac {{\left (B b + C c\right )} \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 )}{{\left (b^{2} + c^{2}\right )}^{\frac {3}{2}}} - \frac {2 \, {\left (C b c \tan \left (\frac {1}{2} \, x\right ) - B c^{2} \tan \left (\frac {1}{2} \, x\right ) + C b^{2} - B b c\right )}}{{\left (b^{3} + b c^{2}\right )} {\left (b \tan \left (\frac {1}{2} \, x\right )^{2} - 2 \, c \tan \left (\frac {1}{2} \, x\right ) - b\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.17, size = 113, normalized size = 1.53 \[ -\frac {2 \left (-\frac {c \left (B c -b C \right ) \tan \left (\frac {x}{2}\right )}{b \left (b^{2}+c^{2}\right )}-\frac {B c -b C}{b^{2}+c^{2}}\right )}{b \left (\tan ^{2}\left (\frac {x}{2}\right )\right )-2 c \tan \left (\frac {x}{2}\right )-b}+\frac {2 \left (b B +C c \right ) \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.43, size = 271, normalized size = 3.66 \[ -B {\left (\frac {b \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}}} + \frac {2 \, {\left (b c + \frac {c^{2} \sin \relax (x)}{\cos \relax (x) + 1}\right )}}{b^{4} + b^{2} c^{2} + \frac {2 \, {\left (b^{3} c + b c^{3}\right )} \sin \relax (x)}{\cos \relax (x) + 1} - \frac {{\left (b^{4} + b^{2} c^{2}\right )} \sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}}}\right )} - C {\left (\frac {c \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}}} - \frac {2 \, {\left (b + \frac {c \sin \relax (x)}{\cos \relax (x) + 1}\right )}}{b^{3} + b c^{2} + \frac {2 \, {\left (b^{2} c + c^{3}\right )} \sin \relax (x)}{\cos \relax (x) + 1} - \frac {{\left (b^{3} + b c^{2}\right )} \sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}}}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.01, size = 129, normalized size = 1.74 \[ -\frac {\frac {2\,\left (B\,c-C\,b\right )}{b^2+c^2}+\frac {2\,c\,\mathrm {tan}\left (\frac {x}{2}\right )\,\left (B\,c-C\,b\right )}{b\,\left (b^2+c^2\right )}}{-b\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2+2\,c\,\mathrm {tan}\left (\frac {x}{2}\right )+b}+\frac {\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 )\,\left (B\,b+C\,c\right )\,2{}\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]
________________________________________________________________________________________