Optimal. Leaf size=74 \[ -\frac{A \tanh ^{-1}\left (\frac{c \cos (x)-b \sin (x)}{\sqrt{b^2+c^2}}\right )}{\sqrt{b^2+c^2}}+\frac{c C x}{b^2+c^2}-\frac{b C \log (b \cos (x)+c \sin (x))}{b^2+c^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0627072, antiderivative size = 74, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167, Rules used = {3137, 3074, 206} \[ -\frac{A \tanh ^{-1}\left (\frac{c \cos (x)-b \sin (x)}{\sqrt{b^2+c^2}}\right )}{\sqrt{b^2+c^2}}+\frac{c C x}{b^2+c^2}-\frac{b C \log (b \cos (x)+c \sin (x))}{b^2+c^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3137
Rule 3074
Rule 206
Rubi steps
\begin{align*} \int \frac{A+C \sin (x)}{b \cos (x)+c \sin (x)} \, dx &=\frac{c C x}{b^2+c^2}-\frac{b C \log (b \cos (x)+c \sin (x))}{b^2+c^2}+A \int \frac{1}{b \cos (x)+c \sin (x)} \, dx\\ &=\frac{c C x}{b^2+c^2}-\frac{b C \log (b \cos (x)+c \sin (x))}{b^2+c^2}-A \operatorname{Subst}\left (\int \frac{1}{b^2+c^2-x^2} \, dx,x,c \cos (x)-b \sin (x)\right )\\ &=\frac{c C x}{b^2+c^2}-\frac{A \tanh ^{-1}\left (\frac{c \cos (x)-b \sin (x)}{\sqrt{b^2+c^2}}\right )}{\sqrt{b^2+c^2}}-\frac{b C \log (b \cos (x)+c \sin (x))}{b^2+c^2}\\ \end{align*}
Mathematica [A] time = 0.186413, size = 68, normalized size = 0.92 \[ \frac{2 A \tanh ^{-1}\left (\frac{b \tan \left (\frac{x}{2}\right )-c}{\sqrt{b^2+c^2}}\right )}{\sqrt{b^2+c^2}}+\frac{C (c x-b \log (b \cos (x)+c \sin (x)))}{b^2+c^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.059, size = 150, normalized size = 2. \begin{align*} -{\frac{bC}{{b}^{2}+{c}^{2}}\ln \left ( b \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{2}-2\,c\tan \left ( x/2 \right ) -b \right ) }+2\,{\frac{A{b}^{2}}{ \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 ) }+2\,{\frac{A{c}^{2}}{ \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 ) }+{\frac{bC}{{b}^{2}+{c}^{2}}\ln \left ( 1+ \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{2} \right ) }+2\,{\frac{Cc\arctan \left ( \tan \left ( x/2 \right ) \right ) }{{b}^{2}+{c}^{2}}} \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.3812, size = 358, normalized size = 4.84 \begin{align*} \frac{2 \, C c x - C b \log \left (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 ) + \sqrt{b^{2} + c^{2}} A \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 (b^{2} + c^{2}\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.33327, size = 177, normalized size = 2.39 \begin{align*} \frac{C c x}{b^{2} + c^{2}} + \frac{C b \log \left (\tan \left (\frac{1}{2} \, x\right )^{2} + 1\right )}{b^{2} + c^{2}} - \frac{C b \log \left ({\left | b \tan \left (\frac{1}{2} \, x\right )^{2} - 2 \, c \tan \left (\frac{1}{2} \, x\right ) - b \right |}\right )}{b^{2} + c^{2}} - \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 )}{\sqrt{b^{2} + c^{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]