Optimal. Leaf size=91 \[ \frac {2 a^3 (2 A+3 B) \cos (c+d x)}{d}+\frac {a^3 (2 A+3 B) \sin (c+d x) \cos (c+d x)}{2 d}-\frac {3}{2} a^3 x (2 A+3 B)+\frac {(A+B) \sec (c+d x) (a \sin (c+d x)+a)^3}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.10, antiderivative size = 91, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.065, Rules used = {2855, 2644} \[ \frac {2 a^3 (2 A+3 B) \cos (c+d x)}{d}+\frac {a^3 (2 A+3 B) \sin (c+d x) \cos (c+d x)}{2 d}-\frac {3}{2} a^3 x (2 A+3 B)+\frac {(A+B) \sec (c+d x) (a \sin (c+d x)+a)^3}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2644
Rule 2855
Rubi steps
\begin {align*} \int \sec ^2(c+d x) (a+a \sin (c+d x))^3 (A+B \sin (c+d x)) \, dx &=\frac {(A+B) \sec (c+d x) (a+a \sin (c+d x))^3}{d}-(a (2 A+3 B)) \int (a+a \sin (c+d x))^2 \, dx\\ &=-\frac {3}{2} a^3 (2 A+3 B) x+\frac {2 a^3 (2 A+3 B) \cos (c+d x)}{d}+\frac {a^3 (2 A+3 B) \cos (c+d x) \sin (c+d x)}{2 d}+\frac {(A+B) \sec (c+d x) (a+a \sin (c+d x))^3}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.26, size = 82, normalized size = 0.90 \[ \frac {\sec (c+d x) \left (4 \sqrt {2} a^3 (2 A+3 B) \sqrt {\sin (c+d x)+1} \, _2F_1\left (-\frac {3}{2},-\frac {1}{2};\frac {1}{2};\frac {1}{2} (1-\sin (c+d x))\right )-B (a \sin (c+d x)+a)^3\right )}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.68, size = 173, normalized size = 1.90 \[ \frac {B a^{3} \cos \left (d x + c\right )^{3} - 3 \, {\left (2 \, A + 3 \, B\right )} a^{3} d x + 2 \, {\left (A + 3 \, B\right )} a^{3} \cos \left (d x + c\right )^{2} + 8 \, {\left (A + B\right )} a^{3} - {\left (3 \, {\left (2 \, A + 3 \, B\right )} a^{3} d x - {\left (10 \, A + 13 \, B\right )} a^{3}\right )} \cos \left (d x + c\right ) + {\left (3 \, {\left (2 \, A + 3 \, B\right )} a^{3} d x + B a^{3} \cos \left (d x + c\right )^{2} - {\left (2 \, A + 5 \, B\right )} a^{3} \cos \left (d x + c\right ) + 8 \, {\left (A + B\right )} a^{3}\right )} \sin \left (d x + c\right )}{2 \, {\left (d \cos \left (d x + c\right ) - d \sin \left (d x + c\right ) + d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.20, size = 147, normalized size = 1.62 \[ -\frac {3 \, {\left (2 \, A a^{3} + 3 \, B a^{3}\right )} {\left (d x + c\right )} + \frac {16 \, {\left (A a^{3} + B a^{3}\right )}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1} + \frac {2 \, {\left (B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 2 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 6 \, B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - B a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, A a^{3} - 6 \, B a^{3}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2}}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.68, size = 219, normalized size = 2.41 \[ \frac {a^{3} A \left (\frac {\sin ^{4}\left (d x +c \right )}{\cos \left (d x +c \right )}+\left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )\right )+B \,a^{3} \left (\frac {\sin ^{5}\left (d x +c \right )}{\cos \left (d x +c \right )}+\left (\sin ^{3}\left (d x +c \right )+\frac {3 \sin \left (d x +c \right )}{2}\right ) \cos \left (d x +c \right )-\frac {3 d x}{2}-\frac {3 c}{2}\right )+3 a^{3} A \left (\tan \left (d x +c \right )-d x -c \right )+3 B \,a^{3} \left (\frac {\sin ^{4}\left (d x +c \right )}{\cos \left (d x +c \right )}+\left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )\right )+\frac {3 a^{3} A}{\cos \left (d x +c \right )}+3 B \,a^{3} \left (\tan \left (d x +c \right )-d x -c \right )+a^{3} A \tan \left (d x +c \right )+\frac {B \,a^{3}}{\cos \left (d x +c \right )}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.41, size = 167, normalized size = 1.84 \[ -\frac {6 \, {\left (d x + c - \tan \left (d x + c\right )\right )} A a^{3} + {\left (3 \, d x + 3 \, c - \frac {\tan \left (d x + c\right )}{\tan \left (d x + c\right )^{2} + 1} - 2 \, \tan \left (d x + c\right )\right )} B a^{3} + 6 \, {\left (d x + c - \tan \left (d x + c\right )\right )} B a^{3} - 2 \, A a^{3} {\left (\frac {1}{\cos \left (d x + c\right )} + \cos \left (d x + c\right )\right )} - 6 \, B a^{3} {\left (\frac {1}{\cos \left (d x + c\right )} + \cos \left (d x + c\right )\right )} - 2 \, A a^{3} \tan \left (d x + c\right ) - \frac {6 \, A a^{3}}{\cos \left (d x + c\right )} - \frac {2 \, B a^{3}}{\cos \left (d x + c\right )}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 11.51, size = 234, normalized size = 2.57 \[ -\frac {10\,A\,a^3-\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (2\,A\,a^3+5\,B\,a^3\right )+14\,B\,a^3-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (2\,A\,a^3+7\,B\,a^3\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (8\,A\,a^3+9\,B\,a^3\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (18\,A\,a^3+21\,B\,a^3\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )}-\frac {3\,a^3\,\mathrm {atan}\left (\frac {3\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (2\,A+3\,B\right )}{6\,A\,a^3+9\,B\,a^3}\right )\,\left (2\,A+3\,B\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ a^{3} \left (\int A \sec ^{2}{\left (c + d x \right )}\, dx + \int 3 A \sin {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int 3 A \sin ^{2}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int A \sin ^{3}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int B \sin {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int 3 B \sin ^{2}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int 3 B \sin ^{3}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int B \sin ^{4}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________