Optimal. Leaf size=72 \[ -\frac {b \left (3 a^2-b^2\right ) \log (\cos (c+d x))}{d}+a x \left (a^2-3 b^2\right )+\frac {2 a b^2 \tan (c+d x)}{d}+\frac {b (a+b \tan (c+d x))^2}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3086, 3482, 3525, 3475} \[ -\frac {b \left (3 a^2-b^2\right ) \log (\cos (c+d x))}{d}+a x \left (a^2-3 b^2\right )+\frac {2 a b^2 \tan (c+d x)}{d}+\frac {b (a+b \tan (c+d x))^2}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3086
Rule 3475
Rule 3482
Rule 3525
Rubi steps
\begin {align*} \int \sec ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^3 \, dx &=\int (a+b \tan (c+d x))^3 \, dx\\ &=\frac {b (a+b \tan (c+d x))^2}{2 d}+\int (a+b \tan (c+d x)) \left (a^2-b^2+2 a b \tan (c+d x)\right ) \, dx\\ &=a \left (a^2-3 b^2\right ) x+\frac {2 a b^2 \tan (c+d x)}{d}+\frac {b (a+b \tan (c+d x))^2}{2 d}+\left (b \left (3 a^2-b^2\right )\right ) \int \tan (c+d x) \, dx\\ &=a \left (a^2-3 b^2\right ) x-\frac {b \left (3 a^2-b^2\right ) \log (\cos (c+d x))}{d}+\frac {2 a b^2 \tan (c+d x)}{d}+\frac {b (a+b \tan (c+d x))^2}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.27, size = 79, normalized size = 1.10 \[ \frac {6 a b^2 \tan (c+d x)+(-b+i a)^3 \log (-\tan (c+d x)+i)-(b+i a)^3 \log (\tan (c+d x)+i)+b^3 \tan ^2(c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.72, size = 88, normalized size = 1.22 \[ \frac {2 \, {\left (a^{3} - 3 \, a b^{2}\right )} d x \cos \left (d x + c\right )^{2} + 6 \, a b^{2} \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 2 \, {\left (3 \, a^{2} b - b^{3}\right )} \cos \left (d x + c\right )^{2} \log \left (-\cos \left (d x + c\right )\right ) + b^{3}}{2 \, d \cos \left (d x + c\right )^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.32, size = 71, normalized size = 0.99 \[ \frac {b^{3} \tan \left (d x + c\right )^{2} + 6 \, a b^{2} \tan \left (d x + c\right ) + 2 \, {\left (a^{3} - 3 \, a b^{2}\right )} {\left (d x + c\right )} + {\left (3 \, a^{2} b - b^{3}\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 1.80, size = 93, normalized size = 1.29 \[ a^{3} x +\frac {a^{3} c}{d}-\frac {3 a^{2} b \ln \left (\cos \left (d x +c \right )\right )}{d}-3 a \,b^{2} x +\frac {3 a \,b^{2} \tan \left (d x +c \right )}{d}-\frac {3 a \,b^{2} c}{d}+\frac {b^{3} \left (\tan ^{2}\left (d x +c \right )\right )}{2 d}+\frac {b^{3} \ln \left (\cos \left (d x +c \right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.42, size = 85, normalized size = 1.18 \[ \frac {2 \, {\left (d x + c\right )} a^{3} - 6 \, {\left (d x + c - \tan \left (d x + c\right )\right )} a b^{2} - b^{3} {\left (\frac {1}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right )^{2} - 1\right )\right )} - 3 \, a^{2} b \log \left (-\sin \left (d x + c\right )^{2} + 1\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.86, size = 183, normalized size = 2.54 \[ \frac {2\,\left (\frac {b^3\,\ln \left (\frac {\cos \left (c+d\,x\right )}{\cos \left (c+d\,x\right )+1}\right )}{2}-\frac {b^3\,\ln \left (\frac {1}{{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}\right )}{2}+a^3\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )+\frac {3\,a^2\,b\,\ln \left (\frac {1}{{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}\right )}{2}-3\,a\,b^2\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )-\frac {3\,a^2\,b\,\ln \left (\frac {\cos \left (c+d\,x\right )}{\cos \left (c+d\,x\right )+1}\right )}{2}\right )}{d}+\frac {\frac {b^3}{2}+\frac {3\,a\,\sin \left (2\,c+2\,d\,x\right )\,b^2}{2}}{d\,\left (\frac {\cos \left (2\,c+2\,d\,x\right )}{2}+\frac {1}{2}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a \cos {\left (c + d x \right )} + b \sin {\left (c + d x \right )}\right )^{3} \sec ^{3}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________