Optimal. Leaf size=101 \[ \frac {\sqrt {\pi } e^{a-\frac {(b+1)^2}{4 c}} \text {erfi}\left (\frac {b+2 c x+1}{2 \sqrt {c}}\right )}{4 \sqrt {c}}-\frac {\sqrt {\pi } e^{\frac {(1-b)^2}{4 c}-a} \text {erf}\left (\frac {-b-2 c x+1}{2 \sqrt {c}}\right )}{4 \sqrt {c}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.13, antiderivative size = 101, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.267, Rules used = {5513, 2234, 2205, 2204} \[ \frac {\sqrt {\pi } e^{a-\frac {(b+1)^2}{4 c}} \text {Erfi}\left (\frac {b+2 c x+1}{2 \sqrt {c}}\right )}{4 \sqrt {c}}-\frac {\sqrt {\pi } e^{\frac {(1-b)^2}{4 c}-a} \text {Erf}\left (\frac {-b-2 c x+1}{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+b x+c x^2\right ) \, dx &=\int \left (\frac {1}{2} e^{-a+(1-b) x-c x^2}+\frac {1}{2} e^{a+(1+b) x+c x^2}\right ) \, dx\\ &=\frac {1}{2} \int e^{-a+(1-b) x-c x^2} \, dx+\frac {1}{2} \int e^{a+(1+b) x+c x^2} \, dx\\ &=\frac {1}{2} e^{-a+\frac {(1-b)^2}{4 c}} \int e^{-\frac {(1-b-2 c x)^2}{4 c}} \, dx+\frac {1}{2} e^{a-\frac {(1+b)^2}{4 c}} \int e^{\frac {(1+b+2 c x)^2}{4 c}} \, dx\\ &=-\frac {e^{-a+\frac {(1-b)^2}{4 c}} \sqrt {\pi } \text {erf}\left (\frac {1-b-2 c x}{2 \sqrt {c}}\right )}{4 \sqrt {c}}+\frac {e^{a-\frac {(1+b)^2}{4 c}} \sqrt {\pi } \text {erfi}\left (\frac {1+b+2 c x}{2 \sqrt {c}}\right )}{4 \sqrt {c}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.15, size = 91, normalized size = 0.90 \[ \frac {\sqrt {\pi } e^{-\frac {(b+1)^2}{4 c}} \left (e^{\frac {b^2+1}{2 c}} (\cosh (a)-\sinh (a)) \text {erf}\left (\frac {b+2 c x-1}{2 \sqrt {c}}\right )+(\sinh (a)+\cosh (a)) \text {erfi}\left (\frac {b+2 c x+1}{2 \sqrt {c}}\right )\right )}{4 \sqrt {c}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.53, size = 130, normalized size = 1.29 \[ -\frac {\sqrt {\pi } \sqrt {-c} {\left (\cosh \left (-\frac {b^{2} - 4 \, a c + 2 \, b + 1}{4 \, c}\right ) + \sinh \left (-\frac {b^{2} - 4 \, a c + 2 \, b + 1}{4 \, c}\right )\right )} \operatorname {erf}\left (\frac {{\left (2 \, c x + b + 1\right )} \sqrt {-c}}{2 \, c}\right ) - \sqrt {\pi } \sqrt {c} {\left (\cosh \left (-\frac {b^{2} - 4 \, a c - 2 \, b + 1}{4 \, c}\right ) - \sinh \left (-\frac {b^{2} - 4 \, a c - 2 \, b + 1}{4 \, c}\right )\right )} \operatorname {erf}\left (\frac {2 \, c x + b - 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 = 91, normalized size = 0.90 \[ -\frac {\sqrt {\pi } \operatorname {erf}\left (-\frac {1}{2} \, \sqrt {-c} {\left (2 \, x + \frac {b + 1}{c}\right )}\right ) e^{\left (-\frac {b^{2} - 4 \, a c + 2 \, b + 1}{4 \, c}\right )}}{4 \, \sqrt {-c}} - \frac {\sqrt {\pi } \operatorname {erf}\left (-\frac {1}{2} \, \sqrt {c} {\left (2 \, x + \frac {b - 1}{c}\right )}\right ) e^{\left (\frac {b^{2} - 4 \, a c - 2 \, b + 1}{4 \, c}\right )}}{4 \, \sqrt {c}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.45, size = 97, normalized size = 0.96 \[ \frac {\sqrt {\pi }\, {\mathrm e}^{-\frac {4 a c -b^{2}+2 b -1}{4 c}} \erf \left (\sqrt {c}\, x -\frac {1-b}{2 \sqrt {c}}\right )}{4 \sqrt {c}}-\frac {\sqrt {\pi }\, {\mathrm e}^{\frac {4 a c -b^{2}-2 b -1}{4 c}} \erf \left (-\sqrt {-c}\, x +\frac {1+b}{2 \sqrt {-c}}\right )}{4 \sqrt {-c}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.32, size = 81, normalized size = 0.80 \[ \frac {\sqrt {\pi } \operatorname {erf}\left (\sqrt {-c} x - \frac {b + 1}{2 \, \sqrt {-c}}\right ) e^{\left (a - \frac {{\left (b + 1\right )}^{2}}{4 \, c}\right )}}{4 \, \sqrt {-c}} + \frac {\sqrt {\pi } \operatorname {erf}\left (\sqrt {c} x + \frac {b - 1}{2 \, \sqrt {c}}\right ) e^{\left (-a + \frac {{\left (b - 1\right )}^{2}}{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+b\,x+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 + b x + c x^{2} \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________