Optimal. Leaf size=96 \[ -\frac {a \cos \left (\frac {1}{2} \pi (a+b x)^2\right )}{b^2 \pi }+\frac {(a+b x) \cos \left (\frac {1}{2} \pi (a+b x)^2\right )}{2 b^2 \pi }-\frac {\text {FresnelC}(a+b x)}{2 b^2 \pi }-\frac {a^2 S(a+b x)}{2 b^2}+\frac {1}{2} x^2 S(a+b x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 96, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 7, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.875, Rules used = {6563, 3514,
3432, 3460, 2718, 3466, 3433} \begin {gather*} -\frac {a^2 S(a+b x)}{2 b^2}-\frac {\text {FresnelC}(a+b x)}{2 \pi b^2}-\frac {a \cos \left (\frac {1}{2} \pi (a+b x)^2\right )}{\pi b^2}+\frac {(a+b x) \cos \left (\frac {1}{2} \pi (a+b x)^2\right )}{2 \pi b^2}+\frac {1}{2} x^2 S(a+b x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2718
Rule 3432
Rule 3433
Rule 3460
Rule 3466
Rule 3514
Rule 6563
Rubi steps
\begin {align*} \int x S(a+b x) \, dx &=\frac {1}{2} x^2 S(a+b x)-\frac {1}{2} b \int x^2 \sin \left (\frac {1}{2} \pi (a+b x)^2\right ) \, dx\\ &=\frac {1}{2} x^2 S(a+b x)-\frac {\text {Subst}\left (\int \left (a^2 \sin \left (\frac {\pi x^2}{2}\right )-2 a x \sin \left (\frac {\pi x^2}{2}\right )+x^2 \sin \left (\frac {\pi x^2}{2}\right )\right ) \, dx,x,a+b x\right )}{2 b^2}\\ &=\frac {1}{2} x^2 S(a+b x)-\frac {\text {Subst}\left (\int x^2 \sin \left (\frac {\pi x^2}{2}\right ) \, dx,x,a+b x\right )}{2 b^2}+\frac {a \text {Subst}\left (\int x \sin \left (\frac {\pi x^2}{2}\right ) \, dx,x,a+b x\right )}{b^2}-\frac {a^2 \text {Subst}\left (\int \sin \left (\frac {\pi x^2}{2}\right ) \, dx,x,a+b x\right )}{2 b^2}\\ &=\frac {(a+b x) \cos \left (\frac {1}{2} \pi (a+b x)^2\right )}{2 b^2 \pi }-\frac {a^2 S(a+b x)}{2 b^2}+\frac {1}{2} x^2 S(a+b x)+\frac {a \text {Subst}\left (\int \sin \left (\frac {\pi x}{2}\right ) \, dx,x,(a+b x)^2\right )}{2 b^2}-\frac {\text {Subst}\left (\int \cos \left (\frac {\pi x^2}{2}\right ) \, dx,x,a+b x\right )}{2 b^2 \pi }\\ &=-\frac {a \cos \left (\frac {1}{2} \pi (a+b x)^2\right )}{b^2 \pi }+\frac {(a+b x) \cos \left (\frac {1}{2} \pi (a+b x)^2\right )}{2 b^2 \pi }-\frac {C(a+b x)}{2 b^2 \pi }-\frac {a^2 S(a+b x)}{2 b^2}+\frac {1}{2} x^2 S(a+b x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.12, size = 51, normalized size = 0.53 \begin {gather*} -\frac {\text {FresnelC}(a+b x)+(a-b x) \left (\cos \left (\frac {1}{2} \pi (a+b x)^2\right )+\pi (a+b x) S(a+b x)\right )}{2 b^2 \pi } \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.41, size = 80, normalized size = 0.83
method | result | size |
derivativedivides | \(\frac {\mathrm {S}\left (b x +a \right ) \left (-a \left (b x +a \right )+\frac {\left (b x +a \right )^{2}}{2}\right )-\frac {a \cos \left (\frac {\pi \left (b x +a \right )^{2}}{2}\right )}{\pi }+\frac {\left (b x +a \right ) \cos \left (\frac {\pi \left (b x +a \right )^{2}}{2}\right )}{2 \pi }-\frac {\FresnelC \left (b x +a \right )}{2 \pi }}{b^{2}}\) | \(80\) |
default | \(\frac {\mathrm {S}\left (b x +a \right ) \left (-a \left (b x +a \right )+\frac {\left (b x +a \right )^{2}}{2}\right )-\frac {a \cos \left (\frac {\pi \left (b x +a \right )^{2}}{2}\right )}{\pi }+\frac {\left (b x +a \right ) \cos \left (\frac {\pi \left (b x +a \right )^{2}}{2}\right )}{2 \pi }-\frac {\FresnelC \left (b x +a \right )}{2 \pi }}{b^{2}}\) | \(80\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] Result contains complex when optimal does not.
time = 0.84, size = 307, normalized size = 3.20 \begin {gather*} \frac {1}{2} \, x^{2} \operatorname {S}\left (b x + a\right ) - \frac {{\left (8 \, {\left (\pi e^{\left (\frac {1}{2} i \, \pi b^{2} x^{2} + i \, \pi a b x + \frac {1}{2} i \, \pi a^{2}\right )} + \pi e^{\left (-\frac {1}{2} i \, \pi b^{2} x^{2} - i \, \pi a b x - \frac {1}{2} i \, \pi a^{2}\right )}\right )} a b x + 8 \, {\left (\pi e^{\left (\frac {1}{2} i \, \pi b^{2} x^{2} + i \, \pi a b x + \frac {1}{2} i \, \pi a^{2}\right )} + \pi e^{\left (-\frac {1}{2} i \, \pi b^{2} x^{2} - i \, \pi a b x - \frac {1}{2} i \, \pi a^{2}\right )}\right )} a^{2} - \sqrt {2 \, \pi b^{2} x^{2} + 4 \, \pi a b x + 2 \, \pi a^{2}} {\left ({\left (-\left (i + 1\right ) \, \sqrt {2} \pi ^{\frac {3}{2}} {\left (\operatorname {erf}\left (\sqrt {\frac {1}{2} i \, \pi b^{2} x^{2} + i \, \pi a b x + \frac {1}{2} i \, \pi a^{2}}\right ) - 1\right )} + \left (i - 1\right ) \, \sqrt {2} \pi ^{\frac {3}{2}} {\left (\operatorname {erf}\left (\sqrt {-\frac {1}{2} i \, \pi b^{2} x^{2} - i \, \pi a b x - \frac {1}{2} i \, \pi a^{2}}\right ) - 1\right )}\right )} a^{2} - \left (2 i - 2\right ) \, \sqrt {2} \Gamma \left (\frac {3}{2}, \frac {1}{2} i \, \pi b^{2} x^{2} + i \, \pi a b x + \frac {1}{2} i \, \pi a^{2}\right ) + \left (2 i + 2\right ) \, \sqrt {2} \Gamma \left (\frac {3}{2}, -\frac {1}{2} i \, \pi b^{2} x^{2} - i \, \pi a b x - \frac {1}{2} i \, \pi a^{2}\right )\right )}\right )} b}{16 \, {\left (\pi ^{2} b^{4} x + \pi ^{2} a b^{3}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 104, normalized size = 1.08 \begin {gather*} \frac {\pi b^{3} x^{2} \operatorname {S}\left (b x + a\right ) - \pi a^{2} \sqrt {b^{2}} \operatorname {S}\left (\frac {\sqrt {b^{2}} {\left (b x + a\right )}}{b}\right ) + {\left (b^{2} x - a b\right )} \cos \left (\frac {1}{2} \, \pi b^{2} x^{2} + \pi a b x + \frac {1}{2} \, \pi a^{2}\right ) - \sqrt {b^{2}} \operatorname {C}\left (\frac {\sqrt {b^{2}} {\left (b x + a\right )}}{b}\right )}{2 \, \pi b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int x S\left (a + b x\right )\, dx \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\,\mathrm {FresnelS}\left (a+b\,x\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________