Optimal. Leaf size=85 \[ \frac {\sqrt {\pi } e^{a-\frac {1}{4 c}} \text {erfi}\left (\frac {2 c x+1}{2 \sqrt {c}}\right )}{4 \sqrt {c}}-\frac {\sqrt {\pi } e^{\frac {1}{4 c}-a} \text {erf}\left (\frac {1-2 c x}{2 \sqrt {c}}\right )}{4 \sqrt {c}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {5513, 2234, 2205, 2204} \[ \frac {\sqrt {\pi } e^{a-\frac {1}{4 c}} \text {Erfi}\left (\frac {2 c x+1}{2 \sqrt {c}}\right )}{4 \sqrt {c}}-\frac {\sqrt {\pi } e^{\frac {1}{4 c}-a} \text {Erf}\left (\frac {1-2 c x}{2 \sqrt {c}}\right )}{4 \sqrt {c}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2204
Rule 2205
Rule 2234
Rule 5513
Rubi steps
\begin {align*} \int e^x \cosh \left (a+c x^2\right ) \, dx &=\int \left (\frac {1}{2} e^{-a+x-c x^2}+\frac {1}{2} e^{a+x+c x^2}\right ) \, dx\\ &=\frac {1}{2} \int e^{-a+x-c x^2} \, dx+\frac {1}{2} \int e^{a+x+c x^2} \, dx\\ &=\frac {1}{2} e^{a-\frac {1}{4 c}} \int e^{\frac {(1+2 c x)^2}{4 c}} \, dx+\frac {1}{2} e^{-a+\frac {1}{4 c}} \int e^{-\frac {(1-2 c x)^2}{4 c}} \, dx\\ &=-\frac {e^{-a+\frac {1}{4 c}} \sqrt {\pi } \text {erf}\left (\frac {1-2 c x}{2 \sqrt {c}}\right )}{4 \sqrt {c}}+\frac {e^{a-\frac {1}{4 c}} \sqrt {\pi } \text {erfi}\left (\frac {1+2 c x}{2 \sqrt {c}}\right )}{4 \sqrt {c}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 79, normalized size = 0.93 \[ \frac {\sqrt {\pi } e^{\left .-\frac {1}{4}\right /c} \left (e^{\left .\frac {1}{2}\right /c} (\cosh (a)-\sinh (a)) \text {erf}\left (\frac {2 c x-1}{2 \sqrt {c}}\right )+(\sinh (a)+\cosh (a)) \text {erfi}\left (\frac {2 c x+1}{2 \sqrt {c}}\right )\right )}{4 \sqrt {c}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.58, size = 104, normalized size = 1.22 \[ -\frac {\sqrt {\pi } \sqrt {-c} {\left (\cosh \left (\frac {4 \, a c - 1}{4 \, c}\right ) + \sinh \left (\frac {4 \, a c - 1}{4 \, c}\right )\right )} \operatorname {erf}\left (\frac {{\left (2 \, c x + 1\right )} \sqrt {-c}}{2 \, c}\right ) - \sqrt {\pi } \sqrt {c} {\left (\cosh \left (\frac {4 \, a c - 1}{4 \, c}\right ) - \sinh \left (\frac {4 \, a c - 1}{4 \, c}\right )\right )} \operatorname {erf}\left (\frac {2 \, c x - 1}{2 \, \sqrt {c}}\right )}{4 \, c} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.14, size = 73, normalized size = 0.86 \[ -\frac {\sqrt {\pi } \operatorname {erf}\left (-\frac {1}{2} \, \sqrt {-c} {\left (2 \, x + \frac {1}{c}\right )}\right ) e^{\left (\frac {4 \, a c - 1}{4 \, c}\right )}}{4 \, \sqrt {-c}} - \frac {\sqrt {\pi } \operatorname {erf}\left (-\frac {1}{2} \, \sqrt {c} {\left (2 \, x - \frac {1}{c}\right )}\right ) e^{\left (-\frac {4 \, a c - 1}{4 \, c}\right )}}{4 \, \sqrt {c}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.23, size = 72, normalized size = 0.85 \[ \frac {\sqrt {\pi }\, {\mathrm e}^{-\frac {4 a c -1}{4 c}} \erf \left (\sqrt {c}\, x -\frac {1}{2 \sqrt {c}}\right )}{4 \sqrt {c}}+\frac {\sqrt {\pi }\, {\mathrm e}^{\frac {4 a c -1}{4 c}} \erf \left (\sqrt {-c}\, x -\frac {1}{2 \sqrt {-c}}\right )}{4 \sqrt {-c}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.31, size = 65, normalized size = 0.76 \[ \frac {\sqrt {\pi } \operatorname {erf}\left (\sqrt {-c} x - \frac {1}{2 \, \sqrt {-c}}\right ) e^{\left (a - \frac {1}{4 \, c}\right )}}{4 \, \sqrt {-c}} + \frac {\sqrt {\pi } \operatorname {erf}\left (\sqrt {c} x - \frac {1}{2 \, \sqrt {c}}\right ) e^{\left (-a + \frac {1}{4 \, c}\right )}}{4 \, \sqrt {c}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int {\mathrm {e}}^x\,\mathrm {cosh}\left (c\,x^2+a\right ) \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int e^{x} \cosh {\left (a + c x^{2} \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________