Optimal. Leaf size=92 \[ \frac {(A-5 B) \tanh ^{-1}\left (\frac {\sqrt {a} \sin (x)}{\sqrt {2} \sqrt {a \cos (x)+a}}\right )}{2 \sqrt {2} a^{3/2}}+\frac {2 B \tanh ^{-1}\left (\frac {\sqrt {a} \sin (x)}{\sqrt {a \cos (x)+a}}\right )}{a^{3/2}}+\frac {(A-B) \sin (x)}{2 (a \cos (x)+a)^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.34, antiderivative size = 92, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.353, Rules used = {2828, 2978, 2985, 2649, 206, 2773} \[ \frac {(A-5 B) \tanh ^{-1}\left (\frac {\sqrt {a} \sin (x)}{\sqrt {2} \sqrt {a \cos (x)+a}}\right )}{2 \sqrt {2} a^{3/2}}+\frac {2 B \tanh ^{-1}\left (\frac {\sqrt {a} \sin (x)}{\sqrt {a \cos (x)+a}}\right )}{a^{3/2}}+\frac {(A-B) \sin (x)}{2 (a \cos (x)+a)^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 2649
Rule 2773
Rule 2828
Rule 2978
Rule 2985
Rubi steps
\begin {align*} \int \frac {A+B \sec (x)}{(a+a \cos (x))^{3/2}} \, dx &=\int \frac {(B+A \cos (x)) \sec (x)}{(a+a \cos (x))^{3/2}} \, dx\\ &=\frac {(A-B) \sin (x)}{2 (a+a \cos (x))^{3/2}}+\frac {\int \frac {\left (2 a B+\frac {1}{2} a (A-B) \cos (x)\right ) \sec (x)}{\sqrt {a+a \cos (x)}} \, dx}{2 a^2}\\ &=\frac {(A-B) \sin (x)}{2 (a+a \cos (x))^{3/2}}+\frac {(A-5 B) \int \frac {1}{\sqrt {a+a \cos (x)}} \, dx}{4 a}+\frac {B \int \sqrt {a+a \cos (x)} \sec (x) \, dx}{a^2}\\ &=\frac {(A-B) \sin (x)}{2 (a+a \cos (x))^{3/2}}-\frac {(A-5 B) \operatorname {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,-\frac {a \sin (x)}{\sqrt {a+a \cos (x)}}\right )}{2 a}-\frac {(2 B) \operatorname {Subst}\left (\int \frac {1}{a-x^2} \, dx,x,-\frac {a \sin (x)}{\sqrt {a+a \cos (x)}}\right )}{a}\\ &=\frac {2 B \tanh ^{-1}\left (\frac {\sqrt {a} \sin (x)}{\sqrt {a+a \cos (x)}}\right )}{a^{3/2}}+\frac {(A-5 B) \tanh ^{-1}\left (\frac {\sqrt {a} \sin (x)}{\sqrt {2} \sqrt {a+a \cos (x)}}\right )}{2 \sqrt {2} a^{3/2}}+\frac {(A-B) \sin (x)}{2 (a+a \cos (x))^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.37, size = 73, normalized size = 0.79 \[ \frac {\frac {1}{2} (A-B) \sin (x)+(A-5 B) \cos ^3\left (\frac {x}{2}\right ) \tanh ^{-1}\left (\sin \left (\frac {x}{2}\right )\right )+4 \sqrt {2} B \cos ^3\left (\frac {x}{2}\right ) \tanh ^{-1}\left (\sqrt {2} \sin \left (\frac {x}{2}\right )\right )}{(a (\cos (x)+1))^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.70, size = 187, normalized size = 2.03 \[ -\frac {\sqrt {2} {\left ({\left (A - 5 \, B\right )} \cos \relax (x)^{2} + 2 \, {\left (A - 5 \, B\right )} \cos \relax (x) + A - 5 \, B\right )} \sqrt {a} \log \left (-\frac {a \cos \relax (x)^{2} + 2 \, \sqrt {2} \sqrt {a \cos \relax (x) + a} \sqrt {a} \sin \relax (x) - 2 \, a \cos \relax (x) - 3 \, a}{\cos \relax (x)^{2} + 2 \, \cos \relax (x) + 1}\right ) - 4 \, {\left (B \cos \relax (x)^{2} + 2 \, B \cos \relax (x) + B\right )} \sqrt {a} \log \left (\frac {a \cos \relax (x)^{3} - 7 \, a \cos \relax (x)^{2} - 4 \, \sqrt {a \cos \relax (x) + a} \sqrt {a} {\left (\cos \relax (x) - 2\right )} \sin \relax (x) + 8 \, a}{\cos \relax (x)^{3} + \cos \relax (x)^{2}}\right ) - 4 \, \sqrt {a \cos \relax (x) + a} {\left (A - B\right )} \sin \relax (x)}{8 \, {\left (a^{2} \cos \relax (x)^{2} + 2 \, a^{2} \cos \relax (x) + a^{2}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.76, size = 168, normalized size = 1.83 \[ -\frac {\sqrt {2} {\left (A \sqrt {a} - 5 \, B \sqrt {a}\right )} \log \left ({\left (\sqrt {a} \tan \left (\frac {1}{2} \, x\right ) - \sqrt {a \tan \left (\frac {1}{2} \, x\right )^{2} + a}\right )}^{2}\right )}{8 \, a^{2}} + \frac {B \log \left ({\left | {\left (\sqrt {a} \tan \left (\frac {1}{2} \, x\right ) - \sqrt {a \tan \left (\frac {1}{2} \, x\right )^{2} + a}\right )}^{2} - a {\left (2 \, \sqrt {2} + 3\right )} \right |}\right )}{a^{\frac {3}{2}}} - \frac {B \log \left ({\left | {\left (\sqrt {a} \tan \left (\frac {1}{2} \, x\right ) - \sqrt {a \tan \left (\frac {1}{2} \, x\right )^{2} + a}\right )}^{2} + a {\left (2 \, \sqrt {2} - 3\right )} \right |}\right )}{a^{\frac {3}{2}}} + \frac {\sqrt {a \tan \left (\frac {1}{2} \, x\right )^{2} + a} {\left (\sqrt {2} A a - \sqrt {2} B a\right )} \tan \left (\frac {1}{2} \, x\right )}{4 \, a^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.34, size = 270, normalized size = 2.93 \[ \frac {\sqrt {a \left (\sin ^{2}\left (\frac {x}{2}\right )\right )}\, \left (A \sqrt {2}\, \ln \left (\frac {4 \sqrt {a}\, \sqrt {a \left (\sin ^{2}\left (\frac {x}{2}\right )\right )}+4 a}{\cos \left (\frac {x}{2}\right )}\right ) \left (\cos ^{2}\left (\frac {x}{2}\right )\right ) a -5 B \sqrt {2}\, \ln \left (\frac {4 \sqrt {a}\, \sqrt {a \left (\sin ^{2}\left (\frac {x}{2}\right )\right )}+4 a}{\cos \left (\frac {x}{2}\right )}\right ) \left (\cos ^{2}\left (\frac {x}{2}\right )\right ) a +4 B \ln \left (\frac {4 a \sqrt {2}\, \cos \left (\frac {x}{2}\right )+4 \sqrt {a}\, \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {x}{2}\right )\right )}+8 a}{2 \cos \left (\frac {x}{2}\right )+\sqrt {2}}\right ) \left (\cos ^{2}\left (\frac {x}{2}\right )\right ) a +4 B \ln \left (-\frac {4 \left (a \sqrt {2}\, \cos \left (\frac {x}{2}\right )-\sqrt {a}\, \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {x}{2}\right )\right )}-2 a \right )}{2 \cos \left (\frac {x}{2}\right )-\sqrt {2}}\right ) \left (\cos ^{2}\left (\frac {x}{2}\right )\right ) a +A \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {x}{2}\right )\right )}\, \sqrt {a}-B \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {x}{2}\right )\right )}\, \sqrt {a}\right )}{4 a^{\frac {5}{2}} \cos \left (\frac {x}{2}\right ) \sin \left (\frac {x}{2}\right ) \sqrt {\left (\cos ^{2}\left (\frac {x}{2}\right )\right ) a}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {A+\frac {B}{\cos \relax (x)}}{{\left (a+a\,\cos \relax (x)\right )}^{3/2}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {A + B \sec {\relax (x )}}{\left (a \left (\cos {\relax (x )} + 1\right )\right )^{\frac {3}{2}}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________