Optimal. Leaf size=72 \[ -\frac {a \cos (c+d x)}{d}+\frac {a \tan ^3(c+d x)}{3 d}-\frac {a \tan (c+d x)}{d}+\frac {a \sec ^3(c+d x)}{3 d}-\frac {2 a \sec (c+d x)}{d}+a x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.10, antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 5, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.263, Rules used = {2710, 3473, 8, 2590, 270} \[ -\frac {a \cos (c+d x)}{d}+\frac {a \tan ^3(c+d x)}{3 d}-\frac {a \tan (c+d x)}{d}+\frac {a \sec ^3(c+d x)}{3 d}-\frac {2 a \sec (c+d x)}{d}+a x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 270
Rule 2590
Rule 2710
Rule 3473
Rubi steps
\begin {align*} \int (a+a \sin (c+d x)) \tan ^4(c+d x) \, dx &=\int \left (a \tan ^4(c+d x)+a \sin (c+d x) \tan ^4(c+d x)\right ) \, dx\\ &=a \int \tan ^4(c+d x) \, dx+a \int \sin (c+d x) \tan ^4(c+d x) \, dx\\ &=\frac {a \tan ^3(c+d x)}{3 d}-a \int \tan ^2(c+d x) \, dx-\frac {a \operatorname {Subst}\left (\int \frac {\left (1-x^2\right )^2}{x^4} \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac {a \tan (c+d x)}{d}+\frac {a \tan ^3(c+d x)}{3 d}+a \int 1 \, dx-\frac {a \operatorname {Subst}\left (\int \left (1+\frac {1}{x^4}-\frac {2}{x^2}\right ) \, dx,x,\cos (c+d x)\right )}{d}\\ &=a x-\frac {a \cos (c+d x)}{d}-\frac {2 a \sec (c+d x)}{d}+\frac {a \sec ^3(c+d x)}{3 d}-\frac {a \tan (c+d x)}{d}+\frac {a \tan ^3(c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 81, normalized size = 1.12 \[ -\frac {a \cos (c+d x)}{d}+\frac {a \tan ^{-1}(\tan (c+d x))}{d}+\frac {a \tan ^3(c+d x)}{3 d}-\frac {a \tan (c+d x)}{d}+\frac {a \sec ^3(c+d x)}{3 d}-\frac {2 a \sec (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.48, size = 88, normalized size = 1.22 \[ -\frac {3 \, a d x \cos \left (d x + c\right ) - 7 \, a \cos \left (d x + c\right )^{2} - {\left (3 \, a d x \cos \left (d x + c\right ) - 3 \, a \cos \left (d x + c\right )^{2} - 2 \, a\right )} \sin \left (d x + c\right ) - a}{3 \, {\left (d \cos \left (d x + c\right ) \sin \left (d x + c\right ) - d \cos \left (d x + c\right )\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.19, size = 124, normalized size = 1.72 \[ \frac {6 \, {\left (d x + c\right )} a - \frac {3 \, {\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 4 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 5 \, a\right )}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1} + \frac {15 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 36 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 17 \, a}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}^{3}}}{6 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.36, size = 98, normalized size = 1.36 \[ \frac {a \left (\frac {\sin ^{6}\left (d x +c \right )}{3 \cos \left (d x +c \right )^{3}}-\frac {\sin ^{6}\left (d x +c \right )}{\cos \left (d x +c \right )}-\left (\frac {8}{3}+\sin ^{4}\left (d x +c \right )+\frac {4 \left (\sin ^{2}\left (d x +c \right )\right )}{3}\right ) \cos \left (d x +c \right )\right )+a \left (\frac {\left (\tan ^{3}\left (d x +c \right )\right )}{3}-\tan \left (d x +c \right )+d x +c \right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.42, size = 65, normalized size = 0.90 \[ \frac {{\left (\tan \left (d x + c\right )^{3} + 3 \, d x + 3 \, c - 3 \, \tan \left (d x + c\right )\right )} a - a {\left (\frac {6 \, \cos \left (d x + c\right )^{2} - 1}{\cos \left (d x + c\right )^{3}} + 3 \, \cos \left (d x + c\right )\right )}}{3 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 12.72, size = 185, normalized size = 2.57 \[ a\,x+\frac {\left (2\,a\,d\,x-\frac {a\,\left (6\,d\,x-6\right )}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (\frac {a\,\left (3\,d\,x-12\right )}{3}-a\,d\,x\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\frac {4\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{3}+\left (a\,d\,x-\frac {a\,\left (3\,d\,x-4\right )}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\left (\frac {a\,\left (6\,d\,x-26\right )}{3}-2\,a\,d\,x\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-\frac {a\,\left (3\,d\,x-16\right )}{3}+a\,d\,x}{d\,{\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )}^3\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \]
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]
________________________________________________________________________________________