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.0678324, antiderivative size = 74, 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 = {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 3153
Rule 3074
Rule 206
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.214847, 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]
________________________________________________________________________________________
Maple [A] time = 0.092, size = 113, normalized size = 1.5 \begin{align*} -2\,{\frac{1}{b \left ( \tan \left ( x/2 \right ) \right ) ^{2}-2\,c\tan \left ( x/2 \right ) -b} \left ( -{\frac{c \left ( Bc-bC \right ) \tan \left ( x/2 \right ) }{b \left ({b}^{2}+{c}^{2} \right ) }}-{\frac{Bc-bC}{{b}^{2}+{c}^{2}}} \right ) }+2\,{\frac{bB+Cc}{ \left ({b}^{2}+{c}^{2} \right ) ^{3/2}}{\it Artanh} \left ( 1/2\,{\frac{2\,b\tan \left ( x/2 \right ) -2\,c}{\sqrt{{b}^{2}+{c}^{2}}}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.03862, size = 466, normalized size = 6.3 \begin{align*} \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 \left (x\right ) +{\left (B b c + C c^{2}\right )} \sin \left (x\right )\right )} \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 ({\left (b^{5} + 2 \, b^{3} c^{2} + b c^{4}\right )} \cos \left (x\right ) +{\left (b^{4} c + 2 \, b^{2} c^{3} + c^{5}\right )} \sin \left (x\right )\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.19957, size = 178, normalized size = 2.41 \begin{align*} -\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 )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]