Optimal. Leaf size=73 \[ -\frac {x^2}{4 b \pi }-\frac {S(b x)^2}{2 b^3 \pi }+\frac {x S(b x) \sin \left (\frac {1}{2} b^2 \pi x^2\right )}{b^2 \pi }+\frac {\sin \left (b^2 \pi x^2\right )}{4 b^3 \pi ^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 73, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {6597, 3460,
2714, 6575, 30} \begin {gather*} -\frac {S(b x)^2}{2 \pi b^3}+\frac {x S(b x) \sin \left (\frac {1}{2} \pi b^2 x^2\right )}{\pi b^2}+\frac {\sin \left (\pi b^2 x^2\right )}{4 \pi ^2 b^3}-\frac {x^2}{4 \pi b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2714
Rule 3460
Rule 6575
Rule 6597
Rubi steps
\begin {align*} \int x^2 \cos \left (\frac {1}{2} b^2 \pi x^2\right ) S(b x) \, dx &=\frac {x S(b x) \sin \left (\frac {1}{2} b^2 \pi x^2\right )}{b^2 \pi }-\frac {\int S(b x) \sin \left (\frac {1}{2} b^2 \pi x^2\right ) \, dx}{b^2 \pi }-\frac {\int x \sin ^2\left (\frac {1}{2} b^2 \pi x^2\right ) \, dx}{b \pi }\\ &=\frac {x S(b x) \sin \left (\frac {1}{2} b^2 \pi x^2\right )}{b^2 \pi }-\frac {\text {Subst}(\int x \, dx,x,S(b x))}{b^3 \pi }-\frac {\text {Subst}\left (\int \sin ^2\left (\frac {1}{2} b^2 \pi x\right ) \, dx,x,x^2\right )}{2 b \pi }\\ &=-\frac {x^2}{4 b \pi }-\frac {S(b x)^2}{2 b^3 \pi }+\frac {x S(b x) \sin \left (\frac {1}{2} b^2 \pi x^2\right )}{b^2 \pi }+\frac {\sin \left (b^2 \pi x^2\right )}{4 b^3 \pi ^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.00, size = 73, normalized size = 1.00 \begin {gather*} -\frac {x^2}{4 b \pi }-\frac {S(b x)^2}{2 b^3 \pi }+\frac {x S(b x) \sin \left (\frac {1}{2} b^2 \pi x^2\right )}{b^2 \pi }+\frac {\sin \left (b^2 \pi x^2\right )}{4 b^3 \pi ^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.21, size = 0, normalized size = 0.00 \[\int x^{2} \cos \left (\frac {b^{2} \pi \,x^{2}}{2}\right ) \mathrm {S}\left (b x \right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 58, normalized size = 0.79 \begin {gather*} -\frac {\pi b^{2} x^{2} + 2 \, \pi \operatorname {S}\left (b x\right )^{2} - 2 \, {\left (2 \, \pi b x \operatorname {S}\left (b x\right ) + \cos \left (\frac {1}{2} \, \pi b^{2} x^{2}\right )\right )} \sin \left (\frac {1}{2} \, \pi b^{2} x^{2}\right )}{4 \, \pi ^{2} b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.50, size = 114, normalized size = 1.56 \begin {gather*} \begin {cases} - \frac {x^{2} \sin ^{2}{\left (\frac {\pi b^{2} x^{2}}{2} \right )}}{4 \pi b} - \frac {x^{2} \cos ^{2}{\left (\frac {\pi b^{2} x^{2}}{2} \right )}}{4 \pi b} + \frac {x \sin {\left (\frac {\pi b^{2} x^{2}}{2} \right )} S\left (b x\right )}{\pi b^{2}} + \frac {\sin {\left (\frac {\pi b^{2} x^{2}}{2} \right )} \cos {\left (\frac {\pi b^{2} x^{2}}{2} \right )}}{2 \pi ^{2} b^{3}} - \frac {S^{2}\left (b x\right )}{2 \pi b^{3}} & \text {for}\: b \neq 0 \\0 & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int x^2\,\mathrm {FresnelS}\left (b\,x\right )\,\cos \left (\frac {\Pi \,b^2\,x^2}{2}\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________