Optimal. Leaf size=47 \[ -\frac {\tanh ^{-1}\left (\frac {b \cos (c+d x)-a \sin (c+d x)}{\sqrt {a^2+b^2}}\right )}{d \sqrt {a^2+b^2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {3074, 206} \[ -\frac {\tanh ^{-1}\left (\frac {b \cos (c+d x)-a \sin (c+d x)}{\sqrt {a^2+b^2}}\right )}{d \sqrt {a^2+b^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 3074
Rubi steps
\begin {align*} \int \frac {1}{a \cos (c+d x)+b \sin (c+d x)} \, dx &=-\frac {\operatorname {Subst}\left (\int \frac {1}{a^2+b^2-x^2} \, dx,x,b \cos (c+d x)-a \sin (c+d x)\right )}{d}\\ &=-\frac {\tanh ^{-1}\left (\frac {b \cos (c+d x)-a \sin (c+d x)}{\sqrt {a^2+b^2}}\right )}{\sqrt {a^2+b^2} d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 45, normalized size = 0.96 \[ \frac {2 \tanh ^{-1}\left (\frac {a \tan \left (\frac {1}{2} (c+d x)\right )-b}{\sqrt {a^2+b^2}}\right )}{d \sqrt {a^2+b^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 1.74, size = 131, normalized size = 2.79 \[ \frac {\log \left (-\frac {2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, a^{2} - b^{2} + 2 \, \sqrt {a^{2} + b^{2}} {\left (b \cos \left (d x + c\right ) - a \sin \left (d x + c\right )\right )}}{2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}}\right )}{2 \, \sqrt {a^{2} + b^{2}} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.22, size = 74, normalized size = 1.57 \[ -\frac {\log \left (\frac {{\left | 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, b - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, b + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{\sqrt {a^{2} + b^{2}} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.40, size = 43, normalized size = 0.91 \[ \frac {2 \arctanh \left (\frac {2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a -2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{d \sqrt {a^{2}+b^{2}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.68, size = 80, normalized size = 1.70 \[ -\frac {\log \left (\frac {b - \frac {a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \sqrt {a^{2} + b^{2}}}{b - \frac {a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \sqrt {a^{2} + b^{2}}}\right )}{\sqrt {a^{2} + b^{2}} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.80, size = 39, normalized size = 0.83 \[ -\frac {2\,\mathrm {atanh}\left (\frac {b-a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\sqrt {a^2+b^2}}\right )}{d\,\sqrt {a^2+b^2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: AttributeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________