Optimal. Leaf size=85 \[ \frac {a \tan ^{-1}\left (\frac {a \tan \left (\frac {x}{2}\right )+b}{\sqrt {a^2-b^2}}\right )}{b \left (a^2-b^2\right )^{3/2}}+\frac {\cos (x)}{2 \left (a^2-b^2\right ) (a+b \sin (x))}-\frac {x}{2 b (a+b \sin (x))^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.11, antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {4422, 2664, 12, 2660, 618, 204} \[ \frac {a \tan ^{-1}\left (\frac {a \tan \left (\frac {x}{2}\right )+b}{\sqrt {a^2-b^2}}\right )}{b \left (a^2-b^2\right )^{3/2}}+\frac {\cos (x)}{2 \left (a^2-b^2\right ) (a+b \sin (x))}-\frac {x}{2 b (a+b \sin (x))^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 204
Rule 618
Rule 2660
Rule 2664
Rule 4422
Rubi steps
\begin {align*} \int \frac {x \cos (x)}{(a+b \sin (x))^3} \, dx &=-\frac {x}{2 b (a+b \sin (x))^2}+\frac {\int \frac {1}{(a+b \sin (x))^2} \, dx}{2 b}\\ &=-\frac {x}{2 b (a+b \sin (x))^2}+\frac {\cos (x)}{2 \left (a^2-b^2\right ) (a+b \sin (x))}+\frac {\int \frac {a}{a+b \sin (x)} \, dx}{2 b \left (a^2-b^2\right )}\\ &=-\frac {x}{2 b (a+b \sin (x))^2}+\frac {\cos (x)}{2 \left (a^2-b^2\right ) (a+b \sin (x))}+\frac {a \int \frac {1}{a+b \sin (x)} \, dx}{2 b \left (a^2-b^2\right )}\\ &=-\frac {x}{2 b (a+b \sin (x))^2}+\frac {\cos (x)}{2 \left (a^2-b^2\right ) (a+b \sin (x))}+\frac {a \operatorname {Subst}\left (\int \frac {1}{a+2 b x+a x^2} \, dx,x,\tan \left (\frac {x}{2}\right )\right )}{b \left (a^2-b^2\right )}\\ &=-\frac {x}{2 b (a+b \sin (x))^2}+\frac {\cos (x)}{2 \left (a^2-b^2\right ) (a+b \sin (x))}-\frac {(2 a) \operatorname {Subst}\left (\int \frac {1}{-4 \left (a^2-b^2\right )-x^2} \, dx,x,2 b+2 a \tan \left (\frac {x}{2}\right )\right )}{b \left (a^2-b^2\right )}\\ &=\frac {a \tan ^{-1}\left (\frac {b+a \tan \left (\frac {x}{2}\right )}{\sqrt {a^2-b^2}}\right )}{b \left (a^2-b^2\right )^{3/2}}-\frac {x}{2 b (a+b \sin (x))^2}+\frac {\cos (x)}{2 \left (a^2-b^2\right ) (a+b \sin (x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.26, size = 84, normalized size = 0.99 \[ \frac {a \tan ^{-1}\left (\frac {a \tan \left (\frac {x}{2}\right )+b}{\sqrt {a^2-b^2}}\right )}{b \left (a^2-b^2\right )^{3/2}}+\frac {\frac {\cos (x) (a+b \sin (x))}{(a-b) (a+b)}-\frac {x}{b}}{2 (a+b \sin (x))^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.63, size = 459, normalized size = 5.40 \[ \left [\frac {2 \, {\left (a^{2} b^{2} - b^{4}\right )} \cos \relax (x) \sin \relax (x) - {\left (a b^{2} \cos \relax (x)^{2} - 2 \, a^{2} b \sin \relax (x) - a^{3} - a b^{2}\right )} \sqrt {-a^{2} + b^{2}} \log \left (-\frac {{\left (2 \, a^{2} - b^{2}\right )} \cos \relax (x)^{2} - 2 \, a b \sin \relax (x) - a^{2} - b^{2} - 2 \, {\left (a \cos \relax (x) \sin \relax (x) + b \cos \relax (x)\right )} \sqrt {-a^{2} + b^{2}}}{b^{2} \cos \relax (x)^{2} - 2 \, a b \sin \relax (x) - a^{2} - b^{2}}\right ) - 2 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} x + 2 \, {\left (a^{3} b - a b^{3}\right )} \cos \relax (x)}{4 \, {\left (a^{6} b - a^{4} b^{3} - a^{2} b^{5} + b^{7} - {\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 )} \sin \relax (x)\right )}}, \frac {{\left (a^{2} b^{2} - b^{4}\right )} \cos \relax (x) \sin \relax (x) + {\left (a b^{2} \cos \relax (x)^{2} - 2 \, a^{2} b \sin \relax (x) - a^{3} - a b^{2}\right )} \sqrt {a^{2} - b^{2}} \arctan \left (-\frac {a \sin \relax (x) + b}{\sqrt {a^{2} - b^{2}} \cos \relax (x)}\right ) - {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} x + {\left (a^{3} b - a b^{3}\right )} \cos \relax (x)}{2 \, {\left (a^{6} b - a^{4} b^{3} - a^{2} b^{5} + b^{7} - {\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 )} \sin \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 \cos \relax (x)}{{\left (b \sin \relax (x) + a\right )}^{3}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.83, size = 257, normalized size = 3.02 \[ \frac {2 i a^{2} {\mathrm e}^{2 i x}+i b^{2} {\mathrm e}^{2 i x}+2 x \,a^{2} {\mathrm e}^{2 i x}+b a \,{\mathrm e}^{3 i x}-2 b^{2} x \,{\mathrm e}^{2 i x}-i b^{2}-3 a b \,{\mathrm e}^{i x}}{\left (b \,{\mathrm e}^{2 i x}-b +2 i a \,{\mathrm e}^{i x}\right )^{2} \left (a^{2}-b^{2}\right ) b}-\frac {a \ln \left ({\mathrm e}^{i x}+\frac {i 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 {a \ln \left ({\mathrm e}^{i x}+\frac {i 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\,\cos \relax (x)}{{\left (a+b\,\sin \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]
________________________________________________________________________________________