3.302 \(\int e^{x^2} \cosh (a+b x) \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 65, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 3, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {5513, 2234, 2204} \[ \frac {1}{4} \sqrt {\pi } e^{-a-\frac {b^2}{4}} \text {Erfi}\left (\frac {1}{2} (2 x-b)\right )+\frac {1}{4} \sqrt {\pi } e^{a-\frac {b^2}{4}} \text {Erfi}\left (\frac {1}{2} (b+2 x)\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

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 2234

Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[F^(a - b^2/(4*c)), Int[F^((b + 2*c*x)^2/(4*c))
, x], x] /; FreeQ[{F, a, b, c}, x]

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 (a+b x) \, dx &=\int \left (\frac {1}{2} e^{-a-b x+x^2}+\frac {1}{2} e^{a+b x+x^2}\right ) \, dx\\ &=\frac {1}{2} \int e^{-a-b x+x^2} \, dx+\frac {1}{2} \int e^{a+b x+x^2} \, dx\\ &=\frac {1}{2} e^{-a-\frac {b^2}{4}} \int e^{\frac {1}{4} (-b+2 x)^2} \, dx+\frac {1}{2} e^{a-\frac {b^2}{4}} \int e^{\frac {1}{4} (b+2 x)^2} \, dx\\ &=\frac {1}{4} e^{-a-\frac {b^2}{4}} \sqrt {\pi } \text {erfi}\left (\frac {1}{2} (-b+2 x)\right )+\frac {1}{4} e^{a-\frac {b^2}{4}} \sqrt {\pi } \text {erfi}\left (\frac {1}{2} (b+2 x)\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.07, size = 51, normalized size = 0.78 \[ \frac {1}{4} \sqrt {\pi } e^{-\frac {b^2}{4}} \left ((\sinh (a)-\cosh (a)) \text {erfi}\left (\frac {b}{2}-x\right )+(\sinh (a)+\cosh (a)) \text {erfi}\left (\frac {b}{2}+x\right )\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

(Sqrt[Pi]*(Erfi[b/2 - x]*(-Cosh[a] + Sinh[a]) + Erfi[b/2 + x]*(Cosh[a] + Sinh[a])))/(4*E^(b^2/4))

________________________________________________________________________________________

fricas [A]  time = 0.53, size = 44, normalized size = 0.68 \[ \frac {1}{4} \, \sqrt {\pi } {\left (\operatorname {erfi}\left (\frac {1}{2} \, b + x\right ) e^{\left (\frac {1}{4} \, b^{2} + a\right )} + \operatorname {erfi}\left (-\frac {1}{2} \, b + x\right ) e^{\left (\frac {1}{4} \, b^{2} - a\right )}\right )} e^{\left (-\frac {1}{2} \, b^{2}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/4*sqrt(pi)*(erfi(1/2*b + x)*e^(1/4*b^2 + a) + erfi(-1/2*b + x)*e^(1/4*b^2 - a))*e^(-1/2*b^2)

________________________________________________________________________________________

giac [C]  time = 0.12, size = 45, normalized size = 0.69 \[ \frac {1}{4} i \, \sqrt {\pi } \operatorname {erf}\left (-\frac {1}{2} i \, b - i \, x\right ) e^{\left (-\frac {1}{4} \, b^{2} + a\right )} + \frac {1}{4} i \, \sqrt {\pi } \operatorname {erf}\left (\frac {1}{2} i \, b - i \, x\right ) e^{\left (-\frac {1}{4} \, b^{2} - a\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/4*I*sqrt(pi)*erf(-1/2*I*b - I*x)*e^(-1/4*b^2 + a) + 1/4*I*sqrt(pi)*erf(1/2*I*b - I*x)*e^(-1/4*b^2 - a)

________________________________________________________________________________________

maple [C]  time = 0.26, size = 52, normalized size = 0.80 \[ \frac {i \sqrt {\pi }\, {\mathrm e}^{-a -\frac {b^{2}}{4}} \erf \left (-i x +\frac {1}{2} i b \right )}{4}-\frac {i \sqrt {\pi }\, {\mathrm e}^{a -\frac {b^{2}}{4}} \erf \left (i x +\frac {1}{2} i b \right )}{4} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [C]  time = 0.32, size = 45, normalized size = 0.69 \[ -\frac {1}{4} i \, \sqrt {\pi } \operatorname {erf}\left (\frac {1}{2} i \, b + i \, x\right ) e^{\left (-\frac {1}{4} \, b^{2} + a\right )} - \frac {1}{4} i \, \sqrt {\pi } \operatorname {erf}\left (-\frac {1}{2} i \, b + i \, x\right ) e^{\left (-\frac {1}{4} \, b^{2} - a\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/4*I*sqrt(pi)*erf(1/2*I*b + I*x)*e^(-1/4*b^2 + a) - 1/4*I*sqrt(pi)*erf(-1/2*I*b + I*x)*e^(-1/4*b^2 - a)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________