Optimal. Leaf size=75 \[ \frac {2 (A-11 B) \sin (x)}{15 \left (a^3 \cos (x)+a^3\right )}+\frac {B \tanh ^{-1}(\sin (x))}{a^3}+\frac {(2 A-7 B) \sin (x)}{15 a (a \cos (x)+a)^2}+\frac {(A-B) \sin (x)}{5 (a \cos (x)+a)^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.31, antiderivative size = 75, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.267, Rules used = {2828, 2978, 12, 3770} \[ \frac {2 (A-11 B) \sin (x)}{15 \left (a^3 \cos (x)+a^3\right )}+\frac {B \tanh ^{-1}(\sin (x))}{a^3}+\frac {(2 A-7 B) \sin (x)}{15 a (a \cos (x)+a)^2}+\frac {(A-B) \sin (x)}{5 (a \cos (x)+a)^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 2828
Rule 2978
Rule 3770
Rubi steps
\begin {align*} \int \frac {A+B \sec (x)}{(a+a \cos (x))^3} \, dx &=\int \frac {(B+A \cos (x)) \sec (x)}{(a+a \cos (x))^3} \, dx\\ &=\frac {(A-B) \sin (x)}{5 (a+a \cos (x))^3}+\frac {\int \frac {(5 a B+2 a (A-B) \cos (x)) \sec (x)}{(a+a \cos (x))^2} \, dx}{5 a^2}\\ &=\frac {(A-B) \sin (x)}{5 (a+a \cos (x))^3}+\frac {(2 A-7 B) \sin (x)}{15 a (a+a \cos (x))^2}+\frac {\int \frac {\left (15 a^2 B+a^2 (2 A-7 B) \cos (x)\right ) \sec (x)}{a+a \cos (x)} \, dx}{15 a^4}\\ &=\frac {(A-B) \sin (x)}{5 (a+a \cos (x))^3}+\frac {(2 A-7 B) \sin (x)}{15 a (a+a \cos (x))^2}+\frac {2 (A-11 B) \sin (x)}{15 \left (a^3+a^3 \cos (x)\right )}+\frac {\int 15 a^3 B \sec (x) \, dx}{15 a^6}\\ &=\frac {(A-B) \sin (x)}{5 (a+a \cos (x))^3}+\frac {(2 A-7 B) \sin (x)}{15 a (a+a \cos (x))^2}+\frac {2 (A-11 B) \sin (x)}{15 \left (a^3+a^3 \cos (x)\right )}+\frac {B \int \sec (x) \, dx}{a^3}\\ &=\frac {B \tanh ^{-1}(\sin (x))}{a^3}+\frac {(A-B) \sin (x)}{5 (a+a \cos (x))^3}+\frac {(2 A-7 B) \sin (x)}{15 a (a+a \cos (x))^2}+\frac {2 (A-11 B) \sin (x)}{15 \left (a^3+a^3 \cos (x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.35, size = 88, normalized size = 1.17 \[ \frac {\sin (x) ((6 A-51 B) \cos (x)+(A-11 B) \cos (2 x)+8 A-43 B)-120 B \cos ^6\left (\frac {x}{2}\right ) \left (\log \left (\cos \left (\frac {x}{2}\right )-\sin \left (\frac {x}{2}\right )\right )-\log \left (\sin \left (\frac {x}{2}\right )+\cos \left (\frac {x}{2}\right )\right )\right )}{15 a^3 (\cos (x)+1)^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.74, size = 122, normalized size = 1.63 \[ \frac {15 \, {\left (B \cos \relax (x)^{3} + 3 \, B \cos \relax (x)^{2} + 3 \, B \cos \relax (x) + B\right )} \log \left (\sin \relax (x) + 1\right ) - 15 \, {\left (B \cos \relax (x)^{3} + 3 \, B \cos \relax (x)^{2} + 3 \, B \cos \relax (x) + B\right )} \log \left (-\sin \relax (x) + 1\right ) + 2 \, {\left (2 \, {\left (A - 11 \, B\right )} \cos \relax (x)^{2} + 3 \, {\left (2 \, A - 17 \, B\right )} \cos \relax (x) + 7 \, A - 32 \, B\right )} \sin \relax (x)}{30 \, {\left (a^{3} \cos \relax (x)^{3} + 3 \, a^{3} \cos \relax (x)^{2} + 3 \, a^{3} \cos \relax (x) + a^{3}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.16, size = 102, normalized size = 1.36 \[ \frac {B \log \left ({\left | \tan \left (\frac {1}{2} \, x\right ) + 1 \right |}\right )}{a^{3}} - \frac {B \log \left ({\left | \tan \left (\frac {1}{2} \, x\right ) - 1 \right |}\right )}{a^{3}} + \frac {3 \, A a^{12} \tan \left (\frac {1}{2} \, x\right )^{5} - 3 \, B a^{12} \tan \left (\frac {1}{2} \, x\right )^{5} + 10 \, A a^{12} \tan \left (\frac {1}{2} \, x\right )^{3} - 20 \, B a^{12} \tan \left (\frac {1}{2} \, x\right )^{3} + 15 \, A a^{12} \tan \left (\frac {1}{2} \, x\right ) - 105 \, B a^{12} \tan \left (\frac {1}{2} \, x\right )}{60 \, a^{15}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.10, size = 95, normalized size = 1.27 \[ \frac {\left (\tan ^{3}\left (\frac {x}{2}\right )\right ) A}{6 a^{3}}-\frac {\left (\tan ^{3}\left (\frac {x}{2}\right )\right ) B}{3 a^{3}}-\frac {B \ln \left (\tan \left (\frac {x}{2}\right )-1\right )}{a^{3}}+\frac {A \tan \left (\frac {x}{2}\right )}{4 a^{3}}-\frac {7 B \tan \left (\frac {x}{2}\right )}{4 a^{3}}+\frac {B \ln \left (1+\tan \left (\frac {x}{2}\right )\right )}{a^{3}}+\frac {\left (\tan ^{5}\left (\frac {x}{2}\right )\right ) A}{20 a^{3}}-\frac {\left (\tan ^{5}\left (\frac {x}{2}\right )\right ) B}{20 a^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.64, size = 119, normalized size = 1.59 \[ -\frac {1}{60} \, B {\left (\frac {\frac {105 \, \sin \relax (x)}{\cos \relax (x) + 1} + \frac {20 \, \sin \relax (x)^{3}}{{\left (\cos \relax (x) + 1\right )}^{3}} + \frac {3 \, \sin \relax (x)^{5}}{{\left (\cos \relax (x) + 1\right )}^{5}}}{a^{3}} - \frac {60 \, \log \left (\frac {\sin \relax (x)}{\cos \relax (x) + 1} + 1\right )}{a^{3}} + \frac {60 \, \log \left (\frac {\sin \relax (x)}{\cos \relax (x) + 1} - 1\right )}{a^{3}}\right )} + \frac {A {\left (\frac {15 \, \sin \relax (x)}{\cos \relax (x) + 1} + \frac {10 \, \sin \relax (x)^{3}}{{\left (\cos \relax (x) + 1\right )}^{3}} + \frac {3 \, \sin \relax (x)^{5}}{{\left (\cos \relax (x) + 1\right )}^{5}}\right )}}{60 \, a^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.37, size = 92, normalized size = 1.23 \[ {\mathrm {tan}\left (\frac {x}{2}\right )}^3\,\left (\frac {A-B}{12\,a^3}+\frac {A-3\,B}{12\,a^3}\right )+\mathrm {tan}\left (\frac {x}{2}\right )\,\left (\frac {A-B}{4\,a^3}+\frac {A-3\,B}{4\,a^3}-\frac {A+3\,B}{4\,a^3}\right )+\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^5\,\left (A-B\right )}{20\,a^3}+\frac {2\,B\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {x}{2}\right )\right )}{a^3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {A}{\cos ^{3}{\relax (x )} + 3 \cos ^{2}{\relax (x )} + 3 \cos {\relax (x )} + 1}\, dx + \int \frac {B \sec {\relax (x )}}{\cos ^{3}{\relax (x )} + 3 \cos ^{2}{\relax (x )} + 3 \cos {\relax (x )} + 1}\, dx}{a^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________