Optimal. Leaf size=36 \[ -\frac{\tanh ^{-1}\left (\frac{a \cos (x)-b \sin (x)}{\sqrt{a^2+b^2}}\right )}{\sqrt{a^2+b^2}} \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.0412535, antiderivative size = 36, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.182 \[ -\frac{\tanh ^{-1}\left (\frac{a \cos (x)-b \sin (x)}{\sqrt{a^2+b^2}}\right )}{\sqrt{a^2+b^2}} \]
Antiderivative was successfully verified.
[In] Int[(b*Cos[x] + a*Sin[x])^(-1),x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [A] time = 2.18447, size = 32, normalized size = 0.89 \[ - \frac{\operatorname{atanh}{\left (\frac{a \cos{\left (x \right )} - b \sin{\left (x \right )}}{\sqrt{a^{2} + b^{2}}} \right )}}{\sqrt{a^{2} + b^{2}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate(1/(b*cos(x)+a*sin(x)),x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.0564802, size = 38, normalized size = 1.06 \[ \frac{2 \tanh ^{-1}\left (\frac{b \tan \left (\frac{x}{2}\right )-a}{\sqrt{a^2+b^2}}\right )}{\sqrt{a^2+b^2}} \]
Antiderivative was successfully verified.
[In] Integrate[(b*Cos[x] + a*Sin[x])^(-1),x]
[Out]
_______________________________________________________________________________________
Maple [A] time = 0.071, size = 35, normalized size = 1. \[ 2\,{\frac{1}{\sqrt{{a}^{2}+{b}^{2}}}{\it Artanh} \left ( 1/2\,{\frac{2\,b\tan \left ( x/2 \right ) -2\,a}{\sqrt{{a}^{2}+{b}^{2}}}} \right ) } \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int(1/(b*cos(x)+a*sin(x)),x)
[Out]
_______________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(1/(b*cos(x) + a*sin(x)),x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.234516, size = 154, normalized size = 4.28 \[ \frac{\log \left (-\frac{2 \,{\left (a^{3} + a b^{2}\right )} \cos \left (x\right ) - 2 \,{\left (a^{2} b + b^{3}\right )} \sin \left (x\right ) +{\left (2 \, a b \cos \left (x\right ) \sin \left (x\right ) -{\left (a^{2} - b^{2}\right )} \cos \left (x\right )^{2} - a^{2} - 2 \, b^{2}\right )} \sqrt{a^{2} + b^{2}}}{2 \, a b \cos \left (x\right ) \sin \left (x\right ) -{\left (a^{2} - b^{2}\right )} \cos \left (x\right )^{2} + a^{2}}\right )}{2 \, \sqrt{a^{2} + b^{2}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(1/(b*cos(x) + a*sin(x)),x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [F(-2)] time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: AttributeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(1/(b*cos(x)+a*sin(x)),x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [A] time = 0.224888, size = 82, normalized size = 2.28 \[ -\frac{{\rm ln}\left (\frac{{\left | 2 \, b \tan \left (\frac{1}{2} \, x\right ) - 2 \, a - 2 \, \sqrt{a^{2} + b^{2}} \right |}}{{\left | 2 \, b \tan \left (\frac{1}{2} \, x\right ) - 2 \, a + 2 \, \sqrt{a^{2} + b^{2}} \right |}}\right )}{\sqrt{a^{2} + b^{2}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(1/(b*cos(x) + a*sin(x)),x, algorithm="giac")
[Out]