Optimal. Leaf size=10 \[ \left (e^{x^2}+x\right ) \cos (x) \]
[Out]
________________________________________________________________________________________
Rubi [F]
time = 0.12, antiderivative size = 0, normalized size of antiderivative = 0.00, number of steps
used = 0, number of rules used = 0, integrand size = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {}
\begin {gather*} \int \left (\left (1+2 e^{x^2} x\right ) \cos (x)-\left (e^{x^2}+x\right ) \sin (x)\right ) \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
Rubi steps
\begin {gather*} \begin {aligned} \text {Integral} &=\int \left (1+2 e^{x^2} x\right ) \cos (x) \, dx-\int \left (e^{x^2}+x\right ) \sin (x) \, dx\\ &=\int \left (\cos (x)+2 e^{x^2} x \cos (x)\right ) \, dx-\int \left (e^{x^2} \sin (x)+x \sin (x)\right ) \, dx\\ &=2 \int e^{x^2} x \cos (x) \, dx+\int \cos (x) \, dx-\int e^{x^2} \sin (x) \, dx-\int x \sin (x) \, dx\\ &=x \cos (x)+\sin (x)+2 \int e^{x^2} x \cos (x) \, dx-\int \left (\frac {1}{2} i e^{-i x+x^2}-\frac {1}{2} i e^{i x+x^2}\right ) \, dx-\int \cos (x) \, dx\\ &=x \cos (x)-\frac {1}{2} i \int e^{-i x+x^2} \, dx+\frac {1}{2} i \int e^{i x+x^2} \, dx+2 \int e^{x^2} x \cos (x) \, dx\\ &=x \cos (x)+2 \int e^{x^2} x \cos (x) \, dx-\frac {1}{2} \left (i \sqrt [4]{e}\right ) \int e^{\frac {1}{4} (-i+2 x)^2} \, dx+\frac {1}{2} \left (i \sqrt [4]{e}\right ) \int e^{\frac {1}{4} (i+2 x)^2} \, dx\\ &=x \cos (x)-\frac {1}{4} i \sqrt [4]{e} \sqrt {\pi } \text {erfi}\left (\frac {1}{2} (-i+2 x)\right )+\frac {1}{4} i \sqrt [4]{e} \sqrt {\pi } \text {erfi}\left (\frac {1}{2} (i+2 x)\right )+2 \int e^{x^2} x \cos (x) \, dx\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.33, size = 27, normalized size = 2.70 \begin {gather*} \frac {1}{2} e^{-i x} \left (1+e^{2 i x}\right ) \left (e^{x^2}+x\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.20, size = 10, normalized size = 1.00
method | result | size |
parallelrisch | \(\left (x +{\mathrm e}^{x^{2}}\right ) \cos \left (x \right )\) | \(10\) |
risch | \(\frac {{\mathrm e}^{x \left (x -i\right )}}{2}+\frac {{\mathrm e}^{x \left (i+x \right )}}{2}+x \cos \left (x \right )\) | \(24\) |
norman | \(\frac {x -x \left (\tan ^{2}\left (\frac {x}{2}\right )\right )-{\mathrm e}^{x^{2}} \left (\tan ^{2}\left (\frac {x}{2}\right )\right )+{\mathrm e}^{x^{2}}}{1+\tan ^{2}\left (\frac {x}{2}\right )}\) | \(39\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.47, size = 473, normalized size = 47.30 \begin {gather*} -\frac {1}{4} \, \sqrt {\pi } {\left (\operatorname {erf}\left (i \, x + \frac {1}{2}\right ) - \operatorname {erf}\left (i \, x - \frac {1}{2}\right )\right )} e^{\frac {1}{4}} + x \cos \left (x\right ) + \frac {2 \, {\left (16 \, x^{4} + 8 \, x^{2} + 1\right )}^{\frac {1}{4}} {\left (e^{\left (x^{2} + i \, x - \frac {1}{4}\right )} + e^{\left (x^{2} - i \, x - \frac {1}{4}\right )} + e^{\left (\overline {x}^{2} + i \, \overline {x} - \frac {1}{4}\right )} + e^{\left (\overline {x}^{2} - i \, \overline {x} - \frac {1}{4}\right )}\right )} e^{\frac {1}{4}} - {\left ({\left (2 \, {\left (i \, \sqrt {\pi } {\left (\overline {\operatorname {erf}\left (\sqrt {-x^{2} + i \, x + \frac {1}{4}}\right )} - 1\right )} - i \, \sqrt {\pi } {\left (\overline {\operatorname {erf}\left (\sqrt {-x^{2} - i \, x + \frac {1}{4}}\right )} - 1\right )} - i \, \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {-x^{2} + i \, x + \frac {1}{4}}\right ) - 1\right )} + i \, \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {-x^{2} - i \, x + \frac {1}{4}}\right ) - 1\right )}\right )} x - \sqrt {\pi } {\left (\overline {\operatorname {erf}\left (\sqrt {-x^{2} + i \, x + \frac {1}{4}}\right )} - 1\right )} - \sqrt {\pi } {\left (\overline {\operatorname {erf}\left (\sqrt {-x^{2} - i \, x + \frac {1}{4}}\right )} - 1\right )} - \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {-x^{2} + i \, x + \frac {1}{4}}\right ) - 1\right )} - \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {-x^{2} - i \, x + \frac {1}{4}}\right ) - 1\right )}\right )} \cos \left (\frac {1}{2} \, \arctan \left (4 \, x, -4 \, x^{2} + 1\right )\right ) - {\left (2 \, {\left (\sqrt {\pi } {\left (\overline {\operatorname {erf}\left (\sqrt {-x^{2} + i \, x + \frac {1}{4}}\right )} - 1\right )} + \sqrt {\pi } {\left (\overline {\operatorname {erf}\left (\sqrt {-x^{2} - i \, x + \frac {1}{4}}\right )} - 1\right )} + \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {-x^{2} + i \, x + \frac {1}{4}}\right ) - 1\right )} + \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {-x^{2} - i \, x + \frac {1}{4}}\right ) - 1\right )}\right )} x + i \, \sqrt {\pi } {\left (\overline {\operatorname {erf}\left (\sqrt {-x^{2} + i \, x + \frac {1}{4}}\right )} - 1\right )} - i \, \sqrt {\pi } {\left (\overline {\operatorname {erf}\left (\sqrt {-x^{2} - i \, x + \frac {1}{4}}\right )} - 1\right )} - i \, \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {-x^{2} + i \, x + \frac {1}{4}}\right ) - 1\right )} + i \, \sqrt {\pi } {\left (\operatorname {erf}\left (\sqrt {-x^{2} - i \, x + \frac {1}{4}}\right ) - 1\right )}\right )} \sin \left (\frac {1}{2} \, \arctan \left (4 \, x, -4 \, x^{2} + 1\right )\right )\right )} e^{\frac {1}{4}}}{8 \, {\left (16 \, x^{4} + 8 \, x^{2} + 1\right )}^{\frac {1}{4}}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.61, size = 12, normalized size = 1.20 \begin {gather*} x \cos \left (x\right ) + \cos \left (x\right ) e^{\left (x^{2}\right )} \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 \left (- \left (x + e^{x^{2}}\right ) \sin {\left (x \right )} + \left (2 x e^{x^{2}} + 1\right ) \cos {\left (x \right )}\right )\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.42, size = 12, normalized size = 1.20 \begin {gather*} x \cos \left (x\right ) + \cos \left (x\right ) e^{\left (x^{2}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.07, size = 9, normalized size = 0.90 \begin {gather*} \cos \left (x\right )\,\left (x+{\mathrm {e}}^{x^2}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Chatgpt [F] Failed to verify
time = 1.00, size = 22, normalized size = 2.20 \begin {gather*} \frac {{\mathrm e}^{x^{2}} \sin \left (x \right )}{2}+\frac {\cos \left (x \right ) \left (2 x \,{\mathrm e}^{x^{2}}-1\right )}{2} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________