3.303 \(\int e^{x^2} \cosh (a+c x^2) \, dx\)

Optimal. Leaf size=65 \[ \frac {\sqrt {\pi } e^{-a} \text {erfi}\left (\sqrt {1-c} x\right )}{4 \sqrt {1-c}}+\frac {\sqrt {\pi } e^a \text {erfi}\left (\sqrt {c+1} x\right )}{4 \sqrt {c+1}} \]

[Out]

1/4*erfi(x*(1-c)^(1/2))*Pi^(1/2)/exp(a)/(1-c)^(1/2)+1/4*exp(a)*erfi(x*(1+c)^(1/2))*Pi^(1/2)/(1+c)^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 65, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 2, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {5513, 2204} \[ \frac {\sqrt {\pi } e^{-a} \text {Erfi}\left (\sqrt {1-c} x\right )}{4 \sqrt {1-c}}+\frac {\sqrt {\pi } e^a \text {Erfi}\left (\sqrt {c+1} x\right )}{4 \sqrt {c+1}} \]

Antiderivative was successfully verified.

[In]

Int[E^x^2*Cosh[a + c*x^2],x]

[Out]

(Sqrt[Pi]*Erfi[Sqrt[1 - c]*x])/(4*Sqrt[1 - c]*E^a) + (E^a*Sqrt[Pi]*Erfi[Sqrt[1 + c]*x])/(4*Sqrt[1 + c])

Rule 2204

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erfi[(c + d*x)*Rt[b*Log[F], 2
]])/(2*d*Rt[b*Log[F], 2]), x] /; FreeQ[{F, a, b, c, d}, x] && PosQ[b]

Rule 5513

Int[Cosh[v_]^(n_.)*(F_)^(u_), x_Symbol] :> Int[ExpandTrigToExp[F^u, Cosh[v]^n, x], x] /; FreeQ[F, x] && (Linea
rQ[u, x] || PolyQ[u, x, 2]) && (LinearQ[v, x] || PolyQ[v, x, 2]) && IGtQ[n, 0]

Rubi steps

\begin {align*} \int e^{x^2} \cosh \left (a+c x^2\right ) \, dx &=\int \left (\frac {1}{2} e^{-a+(1-c) x^2}+\frac {1}{2} e^{a+(1+c) x^2}\right ) \, dx\\ &=\frac {1}{2} \int e^{-a+(1-c) x^2} \, dx+\frac {1}{2} \int e^{a+(1+c) x^2} \, dx\\ &=\frac {e^{-a} \sqrt {\pi } \text {erfi}\left (\sqrt {1-c} x\right )}{4 \sqrt {1-c}}+\frac {e^a \sqrt {\pi } \text {erfi}\left (\sqrt {1+c} x\right )}{4 \sqrt {1+c}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.10, size = 71, normalized size = 1.09 \[ \frac {\sqrt {\pi } \left (\sqrt {c-1} (c+1) (\cosh (a)-\sinh (a)) \text {erf}\left (\sqrt {c-1} x\right )+(c-1) \sqrt {c+1} (\sinh (a)+\cosh (a)) \text {erfi}\left (\sqrt {c+1} x\right )\right )}{4 \left (c^2-1\right )} \]

Antiderivative was successfully verified.

[In]

Integrate[E^x^2*Cosh[a + c*x^2],x]

[Out]

(Sqrt[Pi]*(Sqrt[-1 + c]*(1 + c)*Erf[Sqrt[-1 + c]*x]*(Cosh[a] - Sinh[a]) + (-1 + c)*Sqrt[1 + c]*Erfi[Sqrt[1 + c
]*x]*(Cosh[a] + Sinh[a])))/(4*(-1 + c^2))

________________________________________________________________________________________

fricas [A]  time = 0.63, size = 76, normalized size = 1.17 \[ \frac {\sqrt {\pi } {\left ({\left (c + 1\right )} \cosh \relax (a) - {\left (c + 1\right )} \sinh \relax (a)\right )} \sqrt {c - 1} \operatorname {erf}\left (\sqrt {c - 1} x\right ) - \sqrt {\pi } {\left ({\left (c - 1\right )} \cosh \relax (a) + {\left (c - 1\right )} \sinh \relax (a)\right )} \sqrt {-c - 1} \operatorname {erf}\left (\sqrt {-c - 1} x\right )}{4 \, {\left (c^{2} - 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(x^2)*cosh(c*x^2+a),x, algorithm="fricas")

[Out]

1/4*(sqrt(pi)*((c + 1)*cosh(a) - (c + 1)*sinh(a))*sqrt(c - 1)*erf(sqrt(c - 1)*x) - sqrt(pi)*((c - 1)*cosh(a) +
 (c - 1)*sinh(a))*sqrt(-c - 1)*erf(sqrt(-c - 1)*x))/(c^2 - 1)

________________________________________________________________________________________

giac [A]  time = 0.14, size = 49, normalized size = 0.75 \[ -\frac {\sqrt {\pi } \operatorname {erf}\left (-\sqrt {c - 1} x\right ) e^{\left (-a\right )}}{4 \, \sqrt {c - 1}} - \frac {\sqrt {\pi } \operatorname {erf}\left (-\sqrt {-c - 1} x\right ) e^{a}}{4 \, \sqrt {-c - 1}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(x^2)*cosh(c*x^2+a),x, algorithm="giac")

[Out]

-1/4*sqrt(pi)*erf(-sqrt(c - 1)*x)*e^(-a)/sqrt(c - 1) - 1/4*sqrt(pi)*erf(-sqrt(-c - 1)*x)*e^a/sqrt(-c - 1)

________________________________________________________________________________________

maple [A]  time = 0.74, size = 48, normalized size = 0.74 \[ \frac {\sqrt {\pi }\, {\mathrm e}^{-a} \erf \left (\sqrt {c -1}\, x \right )}{4 \sqrt {c -1}}+\frac {\sqrt {\pi }\, {\mathrm e}^{a} \erf \left (\sqrt {-1-c}\, x \right )}{4 \sqrt {-1-c}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(exp(x^2)*cosh(c*x^2+a),x)

[Out]

1/4*Pi^(1/2)*exp(-a)/(c-1)^(1/2)*erf((c-1)^(1/2)*x)+1/4*Pi^(1/2)*exp(a)/(-1-c)^(1/2)*erf((-1-c)^(1/2)*x)

________________________________________________________________________________________

maxima [A]  time = 0.32, size = 47, normalized size = 0.72 \[ \frac {\sqrt {\pi } \operatorname {erf}\left (\sqrt {c - 1} x\right ) e^{\left (-a\right )}}{4 \, \sqrt {c - 1}} + \frac {\sqrt {\pi } \operatorname {erf}\left (\sqrt {-c - 1} x\right ) e^{a}}{4 \, \sqrt {-c - 1}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(x^2)*cosh(c*x^2+a),x, algorithm="maxima")

[Out]

1/4*sqrt(pi)*erf(sqrt(c - 1)*x)*e^(-a)/sqrt(c - 1) + 1/4*sqrt(pi)*erf(sqrt(-c - 1)*x)*e^a/sqrt(-c - 1)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.02 \[ \int {\mathrm {e}}^{x^2}\,\mathrm {cosh}\left (c\,x^2+a\right ) \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(exp(x^2)*cosh(a + c*x^2),x)

[Out]

int(exp(x^2)*cosh(a + c*x^2), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int e^{x^{2}} \cosh {\left (a + c x^{2} \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(x**2)*cosh(c*x**2+a),x)

[Out]

Integral(exp(x**2)*cosh(a + c*x**2), x)

________________________________________________________________________________________