Optimal. Leaf size=18 \[ \frac{x \sin (\pi x)}{\pi }+\frac{\cos (\pi x)}{\pi ^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0125108, antiderivative size = 18, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 6, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {3296, 2638} \[ \frac{x \sin (\pi x)}{\pi }+\frac{\cos (\pi x)}{\pi ^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3296
Rule 2638
Rubi steps
\begin{align*} \int x \cos (\pi x) \, dx &=\frac{x \sin (\pi x)}{\pi }-\frac{\int \sin (\pi x) \, dx}{\pi }\\ &=\frac{\cos (\pi x)}{\pi ^2}+\frac{x \sin (\pi x)}{\pi }\\ \end{align*}
Mathematica [A] time = 0.0146212, size = 18, normalized size = 1. \[ \frac{x \sin (\pi x)}{\pi }+\frac{\cos (\pi x)}{\pi ^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.005, size = 17, normalized size = 0.9 \begin{align*}{\frac{\cos \left ( \pi \,x \right ) +x\pi \,\sin \left ( \pi \,x \right ) }{{\pi }^{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.935002, size = 22, normalized size = 1.22 \begin{align*} \frac{\pi x \sin \left (\pi x\right ) + \cos \left (\pi x\right )}{\pi ^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.56099, size = 47, normalized size = 2.61 \begin{align*} \frac{\pi x \sin \left (\pi x\right ) + \cos \left (\pi x\right )}{\pi ^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.216689, size = 15, normalized size = 0.83 \begin{align*} \frac{x \sin{\left (\pi x \right )}}{\pi } + \frac{\cos{\left (\pi x \right )}}{\pi ^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.05167, size = 24, normalized size = 1.33 \begin{align*} \frac{x \sin \left (\pi x\right )}{\pi } + \frac{\cos \left (\pi x\right )}{\pi ^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]