Optimal. Leaf size=48 \[ \frac{2 \tan ^{-1}\left (\frac{2 a \tan (c+d x)+b}{\sqrt{4 a^2-b^2}}\right )}{d \sqrt{4 a^2-b^2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0661284, antiderivative size = 48, 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 = {2666, 2660, 618, 204} \[ \frac{2 \tan ^{-1}\left (\frac{2 a \tan (c+d x)+b}{\sqrt{4 a^2-b^2}}\right )}{d \sqrt{4 a^2-b^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2666
Rule 2660
Rule 618
Rule 204
Rubi steps
\begin{align*} \int \frac{1}{a+b \cos (c+d x) \sin (c+d x)} \, dx &=\int \frac{1}{a+\frac{1}{2} b \sin (2 c+2 d x)} \, dx\\ &=\frac{\operatorname{Subst}\left (\int \frac{1}{a+b x+a x^2} \, dx,x,\tan \left (\frac{1}{2} (2 c+2 d x)\right )\right )}{d}\\ &=-\frac{2 \operatorname{Subst}\left (\int \frac{1}{-4 a^2+b^2-x^2} \, dx,x,b+2 a \tan \left (\frac{1}{2} (2 c+2 d x)\right )\right )}{d}\\ &=\frac{2 \tan ^{-1}\left (\frac{b+2 a \tan (c+d x)}{\sqrt{4 a^2-b^2}}\right )}{\sqrt{4 a^2-b^2} d}\\ \end{align*}
Mathematica [A] time = 0.0763346, size = 48, normalized size = 1. \[ \frac{2 \tan ^{-1}\left (\frac{2 a \tan (c+d x)+b}{\sqrt{4 a^2-b^2}}\right )}{d \sqrt{4 a^2-b^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.067, size = 45, normalized size = 0.9 \begin{align*} 2\,{\frac{1}{d\sqrt{4\,{a}^{2}-{b}^{2}}}\arctan \left ({\frac{b+2\,a\tan \left ( dx+c \right ) }{\sqrt{4\,{a}^{2}-{b}^{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 [A] time = 2.41256, size = 653, normalized size = 13.6 \begin{align*} \left [-\frac{\sqrt{-4 \, a^{2} + b^{2}} \log \left (-\frac{2 \,{\left (8 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{4} - 4 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 2 \,{\left (8 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + 2 \, a^{2} - b^{2} +{\left (2 \, b \cos \left (d x + c\right )^{2} + 4 \,{\left (2 \, a \cos \left (d x + c\right )^{3} - a \cos \left (d x + c\right )\right )} \sin \left (d x + c\right ) - b\right )} \sqrt{-4 \, a^{2} + b^{2}}}{b^{2} \cos \left (d x + c\right )^{4} - b^{2} \cos \left (d x + c\right )^{2} - 2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) - a^{2}}\right )}{2 \,{\left (4 \, a^{2} - b^{2}\right )} d}, -\frac{\arctan \left (-\frac{{\left (4 \, a \cos \left (d x + c\right ) \sin \left (d x + c\right ) + b\right )} \sqrt{4 \, a^{2} - b^{2}}}{2 \,{\left (4 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} - 4 \, a^{2} + b^{2}}\right )}{\sqrt{4 \, a^{2} - b^{2}} d}\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.13529, size = 82, normalized size = 1.71 \begin{align*} \frac{2 \,{\left (\pi \left \lfloor \frac{d x + c}{\pi } + \frac{1}{2} \right \rfloor \mathrm{sgn}\left (a\right ) + \arctan \left (\frac{2 \, a \tan \left (d x + c\right ) + b}{\sqrt{4 \, a^{2} - b^{2}}}\right )\right )}}{\sqrt{4 \, a^{2} - b^{2}} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]