Optimal. Leaf size=116 \[ \frac {a f \tan ^{-1}\left (\frac {a \tan \left (\frac {1}{2} (c+d x)\right )+b}{\sqrt {a^2-b^2}}\right )}{b d^2 \left (a^2-b^2\right )^{3/2}}+\frac {f \cos (c+d x)}{2 d^2 \left (a^2-b^2\right ) (a+b \sin (c+d x))}-\frac {e+f x}{2 b d (a+b \sin (c+d x))^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.10, antiderivative size = 116, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {4422, 2664, 12, 2660, 618, 204} \[ \frac {a f \tan ^{-1}\left (\frac {a \tan \left (\frac {1}{2} (c+d x)\right )+b}{\sqrt {a^2-b^2}}\right )}{b d^2 \left (a^2-b^2\right )^{3/2}}+\frac {f \cos (c+d x)}{2 d^2 \left (a^2-b^2\right ) (a+b \sin (c+d x))}-\frac {e+f x}{2 b d (a+b \sin (c+d 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 {(e+f x) \cos (c+d x)}{(a+b \sin (c+d x))^3} \, dx &=-\frac {e+f x}{2 b d (a+b \sin (c+d x))^2}+\frac {f \int \frac {1}{(a+b \sin (c+d x))^2} \, dx}{2 b d}\\ &=-\frac {e+f x}{2 b d (a+b \sin (c+d x))^2}+\frac {f \cos (c+d x)}{2 \left (a^2-b^2\right ) d^2 (a+b \sin (c+d x))}+\frac {f \int \frac {a}{a+b \sin (c+d x)} \, dx}{2 b \left (a^2-b^2\right ) d}\\ &=-\frac {e+f x}{2 b d (a+b \sin (c+d x))^2}+\frac {f \cos (c+d x)}{2 \left (a^2-b^2\right ) d^2 (a+b \sin (c+d x))}+\frac {(a f) \int \frac {1}{a+b \sin (c+d x)} \, dx}{2 b \left (a^2-b^2\right ) d}\\ &=-\frac {e+f x}{2 b d (a+b \sin (c+d x))^2}+\frac {f \cos (c+d x)}{2 \left (a^2-b^2\right ) d^2 (a+b \sin (c+d x))}+\frac {(a f) \operatorname {Subst}\left (\int \frac {1}{a+2 b x+a x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{b \left (a^2-b^2\right ) d^2}\\ &=-\frac {e+f x}{2 b d (a+b \sin (c+d x))^2}+\frac {f \cos (c+d x)}{2 \left (a^2-b^2\right ) d^2 (a+b \sin (c+d x))}-\frac {(2 a f) \operatorname {Subst}\left (\int \frac {1}{-4 \left (a^2-b^2\right )-x^2} \, dx,x,2 b+2 a \tan \left (\frac {1}{2} (c+d x)\right )\right )}{b \left (a^2-b^2\right ) d^2}\\ &=\frac {a f \tan ^{-1}\left (\frac {b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{b \left (a^2-b^2\right )^{3/2} d^2}-\frac {e+f x}{2 b d (a+b \sin (c+d x))^2}+\frac {f \cos (c+d x)}{2 \left (a^2-b^2\right ) d^2 (a+b \sin (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.17, size = 112, normalized size = 0.97 \[ \frac {\frac {2 a f \tan ^{-1}\left (\frac {a \tan \left (\frac {1}{2} (c+d x)\right )+b}{\sqrt {a^2-b^2}}\right )}{b \left (a^2-b^2\right )^{3/2}}+\frac {\frac {f \cos (c+d x) (a+b \sin (c+d x))}{(a-b) (a+b)}-\frac {d (e+f x)}{b}}{(a+b \sin (c+d x))^2}}{2 d^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.50, size = 625, normalized size = 5.39 \[ \left [\frac {2 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} d f x - 2 \, {\left (a^{2} b^{2} - b^{4}\right )} f \cos \left (d x + c\right ) \sin \left (d x + c\right ) + 2 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} d e - 2 \, {\left (a^{3} b - a b^{3}\right )} f \cos \left (d x + c\right ) + {\left (a b^{2} f \cos \left (d x + c\right )^{2} - 2 \, a^{2} b f \sin \left (d x + c\right ) - {\left (a^{3} + a b^{2}\right )} f\right )} \sqrt {-a^{2} + b^{2}} \log \left (-\frac {{\left (2 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, a b \sin \left (d x + c\right ) - a^{2} - b^{2} - 2 \, {\left (a \cos \left (d x + c\right ) \sin \left (d x + c\right ) + b \cos \left (d x + c\right )\right )} \sqrt {-a^{2} + b^{2}}}{b^{2} \cos \left (d x + c\right )^{2} - 2 \, a b \sin \left (d x + c\right ) - a^{2} - b^{2}}\right )}{4 \, {\left ({\left (a^{4} b^{3} - 2 \, a^{2} b^{5} + b^{7}\right )} d^{2} \cos \left (d x + c\right )^{2} - 2 \, {\left (a^{5} b^{2} - 2 \, a^{3} b^{4} + a b^{6}\right )} d^{2} \sin \left (d x + c\right ) - {\left (a^{6} b - a^{4} b^{3} - a^{2} b^{5} + b^{7}\right )} d^{2}\right )}}, \frac {{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} d f x - {\left (a^{2} b^{2} - b^{4}\right )} f \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} d e - {\left (a^{3} b - a b^{3}\right )} f \cos \left (d x + c\right ) - {\left (a b^{2} f \cos \left (d x + c\right )^{2} - 2 \, a^{2} b f \sin \left (d x + c\right ) - {\left (a^{3} + a b^{2}\right )} f\right )} \sqrt {a^{2} - b^{2}} \arctan \left (-\frac {a \sin \left (d x + c\right ) + b}{\sqrt {a^{2} - b^{2}} \cos \left (d x + c\right )}\right )}{2 \, {\left ({\left (a^{4} b^{3} - 2 \, a^{2} b^{5} + b^{7}\right )} d^{2} \cos \left (d x + c\right )^{2} - 2 \, {\left (a^{5} b^{2} - 2 \, a^{3} b^{4} + a b^{6}\right )} d^{2} \sin \left (d x + c\right ) - {\left (a^{6} b - a^{4} b^{3} - a^{2} b^{5} + b^{7}\right )} d^{2}\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 {{\left (f x + e\right )} \cos \left (d x + c\right )}{{\left (b \sin \left (d x + c\right ) + a\right )}^{3}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 2.60, size = 349, normalized size = 3.01 \[ \frac {2 a^{2} d f x \,{\mathrm e}^{2 i \left (d x +c \right )}-2 b^{2} d f x \,{\mathrm e}^{2 i \left (d x +c \right )}+2 i a^{2} f \,{\mathrm e}^{2 i \left (d x +c \right )}+i b^{2} f \,{\mathrm e}^{2 i \left (d x +c \right )}+2 a^{2} d e \,{\mathrm e}^{2 i \left (d x +c \right )}+b a f \,{\mathrm e}^{3 i \left (d x +c \right )}-2 b^{2} d e \,{\mathrm e}^{2 i \left (d x +c \right )}-i b^{2} f -3 a b f \,{\mathrm e}^{i \left (d x +c \right )}}{\left (b \,{\mathrm e}^{2 i \left (d x +c \right )}-b +2 i a \,{\mathrm e}^{i \left (d x +c \right )}\right )^{2} d^{2} \left (a^{2}-b^{2}\right ) b}-\frac {f a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\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 ) d^{2} b}+\frac {f a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\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 ) d^{2} 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(-1)] time = 0.00, size = -1, normalized size = -0.01 \[ \text {Hanged} \]
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]
________________________________________________________________________________________