Optimal. Leaf size=38 \[ \frac {x}{16}+\frac {1}{8} \sin (2 x)+\frac {3}{32} \sin (4 x)+\frac {1}{24} \sin (6 x)+\frac {1}{128} \sin (8 x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 2, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {4439, 2717}
\begin {gather*} \frac {x}{16}+\frac {1}{8} \sin (2 x)+\frac {3}{32} \sin (4 x)+\frac {1}{24} \sin (6 x)+\frac {1}{128} \sin (8 x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2717
Rule 4439
Rubi steps
\begin {align*} \int \cos ^4(x) \cos (4 x) \, dx &=\int \left (\frac {1}{16}+\frac {1}{4} \cos (2 x)+\frac {3}{8} \cos (4 x)+\frac {1}{4} \cos (6 x)+\frac {1}{16} \cos (8 x)\right ) \, dx\\ &=\frac {x}{16}+\frac {1}{16} \int \cos (8 x) \, dx+\frac {1}{4} \int \cos (2 x) \, dx+\frac {1}{4} \int \cos (6 x) \, dx+\frac {3}{8} \int \cos (4 x) \, dx\\ &=\frac {x}{16}+\frac {1}{8} \sin (2 x)+\frac {3}{32} \sin (4 x)+\frac {1}{24} \sin (6 x)+\frac {1}{128} \sin (8 x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 38, normalized size = 1.00 \begin {gather*} \frac {x}{16}+\frac {1}{8} \sin (2 x)+\frac {3}{32} \sin (4 x)+\frac {1}{24} \sin (6 x)+\frac {1}{128} \sin (8 x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.09, size = 29, normalized size = 0.76
method | result | size |
default | \(\frac {x}{16}+\frac {\sin \left (2 x \right )}{8}+\frac {3 \sin \left (4 x \right )}{32}+\frac {\sin \left (6 x \right )}{24}+\frac {\sin \left (8 x \right )}{128}\) | \(29\) |
risch | \(\frac {x}{16}+\frac {\sin \left (2 x \right )}{8}+\frac {3 \sin \left (4 x \right )}{32}+\frac {\sin \left (6 x \right )}{24}+\frac {\sin \left (8 x \right )}{128}\) | \(29\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 1.54, size = 30, normalized size = 0.79 \begin {gather*} -\frac {1}{6} \, \sin \left (2 \, x\right )^{3} + \frac {1}{16} \, x + \frac {1}{128} \, \sin \left (8 \, x\right ) + \frac {3}{32} \, \sin \left (4 \, x\right ) + \frac {1}{4} \, \sin \left (2 \, x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.11, size = 31, normalized size = 0.82 \begin {gather*} \frac {1}{48} \, {\left (48 \, \cos \left (x\right )^{7} - 8 \, \cos \left (x\right )^{5} + 2 \, \cos \left (x\right )^{3} + 3 \, \cos \left (x\right )\right )} \sin \left (x\right ) + \frac {1}{16} \, x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 139 vs.
\(2 (31) = 62\).
time = 2.24, size = 139, normalized size = 3.66 \begin {gather*} \frac {x \sin ^{4}{\left (x \right )} \cos {\left (4 x \right )}}{16} - \frac {x \sin ^{3}{\left (x \right )} \sin {\left (4 x \right )} \cos {\left (x \right )}}{4} - \frac {3 x \sin ^{2}{\left (x \right )} \cos ^{2}{\left (x \right )} \cos {\left (4 x \right )}}{8} + \frac {x \sin {\left (x \right )} \sin {\left (4 x \right )} \cos ^{3}{\left (x \right )}}{4} + \frac {x \cos ^{4}{\left (x \right )} \cos {\left (4 x \right )}}{16} - \frac {\sin ^{4}{\left (x \right )} \sin {\left (4 x \right )}}{24} - \frac {5 \sin ^{3}{\left (x \right )} \cos {\left (x \right )} \cos {\left (4 x \right )}}{48} - \frac {11 \sin {\left (x \right )} \cos ^{3}{\left (x \right )} \cos {\left (4 x \right )}}{48} + \frac {7 \sin {\left (4 x \right )} \cos ^{4}{\left (x \right )}}{24} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.86, size = 28, normalized size = 0.74 \begin {gather*} \frac {1}{16} \, x + \frac {1}{128} \, \sin \left (8 \, x\right ) + \frac {1}{24} \, \sin \left (6 \, x\right ) + \frac {3}{32} \, \sin \left (4 \, x\right ) + \frac {1}{8} \, \sin \left (2 \, x\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.30, size = 36, normalized size = 0.95 \begin {gather*} \frac {x}{16}+\frac {\frac {{\mathrm {tan}\left (x\right )}^7}{16}+\frac {11\,{\mathrm {tan}\left (x\right )}^5}{48}+\frac {5\,{\mathrm {tan}\left (x\right )}^3}{48}+\frac {15\,\mathrm {tan}\left (x\right )}{16}}{{\left ({\mathrm {tan}\left (x\right )}^2+1\right )}^4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________