Optimal. Leaf size=63 \[ \frac {a^4 \cos (c+d x)}{3 d (a-a \sin (c+d x))^2}-\frac {5 a^2 \cos (c+d x)}{3 d (1-\sin (c+d x))}+a^2 x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.21, antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.138, Rules used = {2869, 2758, 2735, 2648} \[ \frac {a^4 \cos (c+d x)}{3 d (a-a \sin (c+d x))^2}-\frac {5 a^2 \cos (c+d x)}{3 d (1-\sin (c+d x))}+a^2 x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2648
Rule 2735
Rule 2758
Rule 2869
Rubi steps
\begin {align*} \int \sec ^2(c+d x) (a+a \sin (c+d x))^2 \tan ^2(c+d x) \, dx &=a^4 \int \frac {\sin ^2(c+d x)}{(a-a \sin (c+d x))^2} \, dx\\ &=\frac {a^4 \cos (c+d x)}{3 d (a-a \sin (c+d x))^2}+\frac {1}{3} a^2 \int \frac {-2 a-3 a \sin (c+d x)}{a-a \sin (c+d x)} \, dx\\ &=a^2 x+\frac {a^4 \cos (c+d x)}{3 d (a-a \sin (c+d x))^2}-\frac {1}{3} \left (5 a^3\right ) \int \frac {1}{a-a \sin (c+d x)} \, dx\\ &=a^2 x+\frac {a^4 \cos (c+d x)}{3 d (a-a \sin (c+d x))^2}-\frac {5 a^3 \cos (c+d x)}{3 d (a-a \sin (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.05, size = 79, normalized size = 1.25 \[ \frac {a^2 \tan ^{-1}(\tan (c+d x))}{d}+\frac {2 a^2 \tan ^3(c+d x)}{3 d}-\frac {a^2 \tan (c+d x)}{d}+\frac {2 a^2 \sec ^3(c+d x)}{3 d}-\frac {2 a^2 \sec (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.45, size = 141, normalized size = 2.24 \[ -\frac {6 \, a^{2} d x - {\left (3 \, a^{2} d x + 5 \, a^{2}\right )} \cos \left (d x + c\right )^{2} + a^{2} + {\left (3 \, a^{2} d x - 4 \, a^{2}\right )} \cos \left (d x + c\right ) - {\left (6 \, a^{2} d x - a^{2} + {\left (3 \, a^{2} d x - 5 \, a^{2}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{3 \, {\left (d \cos \left (d x + c\right )^{2} - d \cos \left (d x + c\right ) + {\left (d \cos \left (d x + c\right ) + 2 \, d\right )} \sin \left (d x + c\right ) - 2 \, d\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.21, size = 67, normalized size = 1.06 \[ \frac {3 \, {\left (d x + c\right )} a^{2} + \frac {2 \, {\left (3 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 9 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 4 \, a^{2}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}^{3}}}{3 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.40, size = 114, normalized size = 1.81 \[ \frac {a^{2} \left (\frac {\left (\tan ^{3}\left (d x +c \right )\right )}{3}-\tan \left (d x +c \right )+d x +c \right )+2 a^{2} \left (\frac {\sin ^{4}\left (d x +c \right )}{3 \cos \left (d x +c \right )^{3}}-\frac {\sin ^{4}\left (d x +c \right )}{3 \cos \left (d x +c \right )}-\frac {\left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )}{3}\right )+\frac {a^{2} \left (\sin ^{3}\left (d x +c \right )\right )}{3 \cos \left (d x +c \right )^{3}}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.42, size = 71, normalized size = 1.13 \[ \frac {a^{2} \tan \left (d x + c\right )^{3} + {\left (\tan \left (d x + c\right )^{3} + 3 \, d x + 3 \, c - 3 \, \tan \left (d x + c\right )\right )} a^{2} - \frac {2 \, {\left (3 \, \cos \left (d x + c\right )^{2} - 1\right )} a^{2}}{\cos \left (d x + c\right )^{3}}}{3 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 9.29, size = 102, normalized size = 1.62 \[ a^2\,x+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {a^2\,\left (9\,d\,x-18\right )}{3}-3\,a^2\,d\,x\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {a^2\,\left (9\,d\,x-6\right )}{3}-3\,a^2\,d\,x\right )-\frac {a^2\,\left (3\,d\,x-8\right )}{3}+a^2\,d\,x}{d\,{\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )}^3} \]
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]
________________________________________________________________________________________