Optimal. Leaf size=88 \[ \frac {\sin (x)}{2 \left (a^2-b^2\right ) (a+b \cos (x))}+\frac {x}{2 b (a+b \cos (x))^2}-\frac {a \tan ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {x}{2}\right )}{\sqrt {a+b}}\right )}{b (a-b)^{3/2} (a+b)^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.10, antiderivative size = 88, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.417, Rules used = {4423, 2664, 12, 2659, 205} \[ \frac {\sin (x)}{2 \left (a^2-b^2\right ) (a+b \cos (x))}+\frac {x}{2 b (a+b \cos (x))^2}-\frac {a \tan ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {x}{2}\right )}{\sqrt {a+b}}\right )}{b (a-b)^{3/2} (a+b)^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 205
Rule 2659
Rule 2664
Rule 4423
Rubi steps
\begin {align*} \int \frac {x \sin (x)}{(a+b \cos (x))^3} \, dx &=\frac {x}{2 b (a+b \cos (x))^2}-\frac {\int \frac {1}{(a+b \cos (x))^2} \, dx}{2 b}\\ &=\frac {x}{2 b (a+b \cos (x))^2}+\frac {\sin (x)}{2 \left (a^2-b^2\right ) (a+b \cos (x))}-\frac {\int \frac {a}{a+b \cos (x)} \, dx}{2 b \left (a^2-b^2\right )}\\ &=\frac {x}{2 b (a+b \cos (x))^2}+\frac {\sin (x)}{2 \left (a^2-b^2\right ) (a+b \cos (x))}-\frac {a \int \frac {1}{a+b \cos (x)} \, dx}{2 b \left (a^2-b^2\right )}\\ &=\frac {x}{2 b (a+b \cos (x))^2}+\frac {\sin (x)}{2 \left (a^2-b^2\right ) (a+b \cos (x))}-\frac {a \operatorname {Subst}\left (\int \frac {1}{a+b+(a-b) x^2} \, dx,x,\tan \left (\frac {x}{2}\right )\right )}{b \left (a^2-b^2\right )}\\ &=-\frac {a \tan ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {x}{2}\right )}{\sqrt {a+b}}\right )}{(a-b)^{3/2} b (a+b)^{3/2}}+\frac {x}{2 b (a+b \cos (x))^2}+\frac {\sin (x)}{2 \left (a^2-b^2\right ) (a+b \cos (x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.32, size = 85, normalized size = 0.97 \[ \frac {\frac {\sin (x) (a+b \cos (x))}{(a-b) (a+b)}+\frac {x}{b}}{2 (a+b \cos (x))^2}-\frac {a \tanh ^{-1}\left (\frac {(a-b) \tan \left (\frac {x}{2}\right )}{\sqrt {b^2-a^2}}\right )}{b \left (b^2-a^2\right )^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.66, size = 417, normalized size = 4.74 \[ \left [\frac {{\left (a b^{2} \cos \relax (x)^{2} + 2 \, a^{2} b \cos \relax (x) + a^{3}\right )} \sqrt {-a^{2} + b^{2}} \log \left (\frac {2 \, a b \cos \relax (x) + {\left (2 \, a^{2} - b^{2}\right )} \cos \relax (x)^{2} + 2 \, \sqrt {-a^{2} + b^{2}} {\left (a \cos \relax (x) + b\right )} \sin \relax (x) - a^{2} + 2 \, b^{2}}{b^{2} \cos \relax (x)^{2} + 2 \, a b \cos \relax (x) + a^{2}}\right ) + 2 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} x + 2 \, {\left (a^{3} b - a b^{3} + {\left (a^{2} b^{2} - b^{4}\right )} \cos \relax (x)\right )} \sin \relax (x)}{4 \, {\left (a^{6} b - 2 \, a^{4} b^{3} + a^{2} b^{5} + {\left (a^{4} b^{3} - 2 \, a^{2} b^{5} + b^{7}\right )} \cos \relax (x)^{2} + 2 \, {\left (a^{5} b^{2} - 2 \, a^{3} b^{4} + a b^{6}\right )} \cos \relax (x)\right )}}, -\frac {{\left (a b^{2} \cos \relax (x)^{2} + 2 \, a^{2} b \cos \relax (x) + a^{3}\right )} \sqrt {a^{2} - b^{2}} \arctan \left (-\frac {a \cos \relax (x) + b}{\sqrt {a^{2} - b^{2}} \sin \relax (x)}\right ) - {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} x - {\left (a^{3} b - a b^{3} + {\left (a^{2} b^{2} - b^{4}\right )} \cos \relax (x)\right )} \sin \relax (x)}{2 \, {\left (a^{6} b - 2 \, a^{4} b^{3} + a^{2} b^{5} + {\left (a^{4} b^{3} - 2 \, a^{2} b^{5} + b^{7}\right )} \cos \relax (x)^{2} + 2 \, {\left (a^{5} b^{2} - 2 \, a^{3} b^{4} + a b^{6}\right )} \cos \relax (x)\right )}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {x \sin \relax (x)}{{\left (b \cos \relax (x) + a\right )}^{3}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.44, size = 250, normalized size = 2.84 \[ \frac {i \left (-2 i a^{2} x \,{\mathrm e}^{2 i x}+2 i b^{2} x \,{\mathrm e}^{2 i x}+b a \,{\mathrm e}^{3 i x}+2 a^{2} {\mathrm e}^{2 i x}+b^{2} {\mathrm e}^{2 i x}+3 a b \,{\mathrm e}^{i x}+b^{2}\right )}{b \left (b \,{\mathrm e}^{2 i x}+2 a \,{\mathrm e}^{i x}+b \right )^{2} \left (a^{2}-b^{2}\right )}-\frac {i a \ln \left ({\mathrm e}^{i x}+\frac {a \sqrt {a^{2}-b^{2}}+a^{2}-b^{2}}{\sqrt {a^{2}-b^{2}}\, b}\right )}{2 \sqrt {a^{2}-b^{2}}\, \left (a +b \right ) \left (a -b \right ) b}+\frac {i a \ln \left ({\mathrm e}^{i x}+\frac {a \sqrt {a^{2}-b^{2}}-a^{2}+b^{2}}{\sqrt {a^{2}-b^{2}}\, b}\right )}{2 \sqrt {a^{2}-b^{2}}\, \left (a +b \right ) \left (a -b \right ) b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
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 {x\,\sin \relax (x)}{{\left (a+b\,\cos \relax (x)\right )}^3} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [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]
________________________________________________________________________________________