Optimal. Leaf size=68 \[ \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 {a \sec (c+d x)}{d}-\frac {a \tanh ^{-1}(\cos (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 68, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {2838, 2622, 302, 207, 3767} \[ \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 {a \sec (c+d x)}{d}-\frac {a \tanh ^{-1}(\cos (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 207
Rule 302
Rule 2622
Rule 2838
Rule 3767
Rubi steps
\begin {align*} \int \csc (c+d x) \sec ^4(c+d x) (a+a \sin (c+d x)) \, dx &=a \int \sec ^4(c+d x) \, dx+a \int \csc (c+d x) \sec ^4(c+d x) \, dx\\ &=\frac {a \operatorname {Subst}\left (\int \frac {x^4}{-1+x^2} \, dx,x,\sec (c+d x)\right )}{d}-\frac {a \operatorname {Subst}\left (\int \left (1+x^2\right ) \, dx,x,-\tan (c+d x)\right )}{d}\\ &=\frac {a \tan (c+d x)}{d}+\frac {a \tan ^3(c+d x)}{3 d}+\frac {a \operatorname {Subst}\left (\int \left (1+x^2+\frac {1}{-1+x^2}\right ) \, dx,x,\sec (c+d x)\right )}{d}\\ &=\frac {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}+\frac {a \operatorname {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sec (c+d x)\right )}{d}\\ &=-\frac {a \tanh ^{-1}(\cos (c+d x))}{d}+\frac {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.12, size = 85, normalized size = 1.25 \[ \frac {a \left (\frac {1}{3} \tan ^3(c+d x)+\tan (c+d x)\right )}{d}+\frac {a \sec ^3(c+d x)}{3 d}+\frac {a \sec (c+d x)}{d}+\frac {a \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{d}-\frac {a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.48, size = 126, normalized size = 1.85 \[ -\frac {4 \, a \cos \left (d x + c\right )^{2} + 3 \, {\left (a \cos \left (d x + c\right ) \sin \left (d x + c\right ) - a \cos \left (d x + c\right )\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 3 \, {\left (a \cos \left (d x + c\right ) \sin \left (d x + c\right ) - a \cos \left (d x + c\right )\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 2 \, a \sin \left (d x + c\right ) + 4 \, a}{6 \, {\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.20, size = 81, normalized size = 1.19 \[ \frac {6 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + \frac {3 \, a}{\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} - 24 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 13 \, 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.43, size = 82, normalized size = 1.21 \[ \frac {2 a \tan \left (d x +c \right )}{3 d}+\frac {a \tan \left (d x +c \right ) \left (\sec ^{2}\left (d x +c \right )\right )}{3 d}+\frac {a}{3 d \cos \left (d x +c \right )^{3}}+\frac {a}{d \cos \left (d x +c \right )}+\frac {a \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.32, size = 73, normalized size = 1.07 \[ \frac {2 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} a + a {\left (\frac {2 \, {\left (3 \, \cos \left (d x + c\right )^{2} + 1\right )}}{\cos \left (d x + c\right )^{3}} - 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )}}{6 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 9.94, size = 90, normalized size = 1.32 \[ \frac {a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-\frac {10\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{3}+\frac {8\,a}{3}}{d\,\left ({\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 )-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]
________________________________________________________________________________________