Optimal. Leaf size=71 \[ \frac {2 e^{-(a+b x)^2} \text {Erf}(a+b x)}{b \sqrt {\pi }}+\frac {(a+b x) \text {Erf}(a+b x)^2}{b}-\frac {\sqrt {\frac {2}{\pi }} \text {Erf}\left (\sqrt {2} (a+b x)\right )}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 71, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {6487, 6517,
2236} \begin {gather*} \frac {(a+b x) \text {Erf}(a+b x)^2}{b}+\frac {2 e^{-(a+b x)^2} \text {Erf}(a+b x)}{\sqrt {\pi } b}-\frac {\sqrt {\frac {2}{\pi }} \text {Erf}\left (\sqrt {2} (a+b x)\right )}{b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2236
Rule 6487
Rule 6517
Rubi steps
\begin {align*} \int \text {erf}(a+b x)^2 \, dx &=\frac {(a+b x) \text {erf}(a+b x)^2}{b}-\frac {4 \int e^{-(a+b x)^2} (a+b x) \text {erf}(a+b x) \, dx}{\sqrt {\pi }}\\ &=\frac {(a+b x) \text {erf}(a+b x)^2}{b}-\frac {4 \text {Subst}\left (\int e^{-x^2} x \text {erf}(x) \, dx,x,a+b x\right )}{b \sqrt {\pi }}\\ &=\frac {2 e^{-(a+b x)^2} \text {erf}(a+b x)}{b \sqrt {\pi }}+\frac {(a+b x) \text {erf}(a+b x)^2}{b}-\frac {4 \text {Subst}\left (\int e^{-2 x^2} \, dx,x,a+b x\right )}{b \pi }\\ &=\frac {2 e^{-(a+b x)^2} \text {erf}(a+b x)}{b \sqrt {\pi }}+\frac {(a+b x) \text {erf}(a+b x)^2}{b}-\frac {\sqrt {\frac {2}{\pi }} \text {erf}\left (\sqrt {2} (a+b x)\right )}{b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 66, normalized size = 0.93 \begin {gather*} \frac {\frac {2 e^{-(a+b x)^2} \text {Erf}(a+b x)}{\sqrt {\pi }}+(a+b x) \text {Erf}(a+b x)^2-\sqrt {\frac {2}{\pi }} \text {Erf}\left (\sqrt {2} (a+b x)\right )}{b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.26, size = 59, normalized size = 0.83
method | result | size |
derivativedivides | \(\frac {\erf \left (b x +a \right )^{2} \left (b x +a \right )+\frac {2 \erf \left (b x +a \right ) {\mathrm e}^{-\left (b x +a \right )^{2}}}{\sqrt {\pi }}-\frac {\sqrt {2}\, \erf \left (\left (b x +a \right ) \sqrt {2}\right )}{\sqrt {\pi }}}{b}\) | \(59\) |
default | \(\frac {\erf \left (b x +a \right )^{2} \left (b x +a \right )+\frac {2 \erf \left (b x +a \right ) {\mathrm e}^{-\left (b x +a \right )^{2}}}{\sqrt {\pi }}-\frac {\sqrt {2}\, \erf \left (\left (b x +a \right ) \sqrt {2}\right )}{\sqrt {\pi }}}{b}\) | \(59\) |
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.37, size = 91, normalized size = 1.28 \begin {gather*} \frac {2 \, \sqrt {\pi } b \operatorname {erf}\left (b x + a\right ) e^{\left (-b^{2} x^{2} - 2 \, a b x - a^{2}\right )} + {\left (\pi b^{2} x + \pi a b\right )} \operatorname {erf}\left (b x + a\right )^{2} - \sqrt {2} \sqrt {\pi } \sqrt {b^{2}} \operatorname {erf}\left (\frac {\sqrt {2} \sqrt {b^{2}} {\left (b x + a\right )}}{b}\right )}{\pi b^{2}} \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 \operatorname {erf}^{2}{\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 [B]
time = 0.13, size = 79, normalized size = 1.11 \begin {gather*} x\,{\mathrm {erf}\left (a+b\,x\right )}^2+\frac {a\,{\mathrm {erf}\left (a+b\,x\right )}^2}{b}-\frac {\sqrt {2}\,\mathrm {erf}\left (\sqrt {2}\,\left (a+b\,x\right )\right )}{b\,\sqrt {\pi }}+\frac {2\,\mathrm {erf}\left (a+b\,x\right )\,{\mathrm {e}}^{-a^2-2\,a\,b\,x-b^2\,x^2}}{b\,\sqrt {\pi }} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________